System stalls when copying large files (8GB+) to my samba share

This is a repost of the following report that got sadly closed immediately:

Setting any kind of vm.dirty_background_ratio or vm.dirty_background_bytes does not fix the problem.

Description

I am using Syncthing to synchronize files between my NAS, Desktop and Smartphone and this in itself works fine, but there is an weird issue on my desktop.

When I copy a large file from a smb share on my NAS to my desktop, everything is fine. But when I copy the file back to the smb share in a different folder, the desktop completely stalls (Desktop clock stops, mouse cursor cannot be moved) till the copy operation finished. This only happens with smb shares, nfs shares are unaffected. Another interesting thing is, that this behaviour is not triggered, when the smb share is mounted graphically via the file manager, but when using the fstab or an systemd mount (I use such a mount).

All syncthing folders are located on the device directly, so they are not on any network storage device and should not interfere in any way.

I am sure this is caused by syncthing as removing the config folder and/or disabling syncthing fixes the issue. Syncthing without configured folders does not trigger the issue.

I already created a bugreport at the redhat bugzilla some time ago suspecting an issue with samba, but this seems not to be a samba issue: 2165393 – Desktop completly freezes when copying data from the home directory to the samba share

Does your log mention database corruption?

No, it does not.

Steps to Reproduce

  1. Create a systemd mount unit for the smb share.
  2. Start the mount unit to mount the smb share.
  3. Open a graphical file manager like nautilus.
  4. Select a file on the share that has at least 8GB in size and was not used/referenced/copied already in the current session. If it was, reboot the system if the specific file should be used.
  5. Copy this file from the smb share to an location on the desktop accessible to the user.
  6. Copy this file now to a different location on the NAS. It should be a location where this file never was before.
  7. Wait while the file gets copied.
  8. Often, after 4-6GB being copied, the desktop will freeze till the copy operation is finished.

Expected Result

The desktop should not freeze when a large file is copied to an smb share.

Observed Result

The desktop freezes when a large file is copied to an smb share.

Setup Information

Desktop PC

OS: Fedora 38 Desktop: Gnome 44.2 File Manager: Nautilus Syncthing Version: 1.23.5 Browser: Firefox 114.0.2 Network Card: Chelsio T540 LP-CR

NAS

OS: Openmediavault 6.4.5 (based on Debian 11) Syncthing Version: 1.23.5 (Docker Container) Network Card: Asus XG-C100F

Smartphone

Device: Realme 6 OS: Android 11 Syncthing Version: 1.23.5 (App) Network Connection: Wifi

I found the issue! I installed the extension TopHat for the Gnome Shell. After disabling it, everything works as expected. Sorry for the commotion!

In general, applications should not be able to freeze computers, that’s usually an issue with the os/kernel/drivers, and not really in syncthings control. Not using smb and using a real filesystem would be one way to fix that.

Yes, that should not be possible, but sadly, this is the case. And I use a real filesystem for syncthing, not smb or cifs, as stated above. But in the end a different application was the culprit. I opened a bugreport for it. Lets see, if the culprit can be found and properly fixed.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.