Samba server and Windows clients getting stuck

This is not a question. It’s a problem I solved and wanted to share.

The problem was that my Windows clients connecting to my NAS (Fedora Linux 32) would sometimes stop being able to read files and directories. They would just hang. I’d look on the server and smbd is just sitting there at 0% usage.

After lots of investigation with strace and lsof I discovered that if Windows ever accessed a directory that had a “fifo” aka “pipe” file in it, that connection would freeze up trying to read from the pipe, and never getting any data. Windows seems to have a limit on how many simultaneous SMB connections are allowed and once all of those are frozen it is game over.

So for those who want to know the fix, it was adding the
hide special files = yes
option on the shares in smb.conf on the Samba server.

4 Likes

Old post I know, but I had to sign up just to tell you thank you! I have been fighting a long hang after starting windows because of a mounted SMB share through an OMV server. Oddly enough it only started after updating to Windows 11. Maybe not exactly related to your problem but Google seemed to think this post matched my search query. Again, thank you!

1 Like