WORKAROUND: TrueNAS SCALE Bluefin - Significant samba bug with macOS clients - too many open files.

HJD

Dabbler
Joined
Dec 23, 2018
Messages
12
I've seen a couple of threads here and elsewhere - there's a bug in Samba that manifests on macOS, but it's unclear to me if the bug is SCALE-specific or not.

The first sign of trouble is seeing "too many open files" errors on macOS (Ventura in my case) in apps that are making extensive use of SMB (Plex and Channels DVR in my case).

I traced this down through googling and the process of elimination. I've tried adjust the Samba-specific max open files setting...that seems to be a dead end for this particular issue, and doesn't resolve the problem.

A little lsof magic and you see:

65968 smbd

That's a lot of open files...but smbstatus doesn't show more than a handful of files open at a time.

Searching around, I eventually came across:


So I gave it a try...and disabled the Enable Apple SMB2/3 Protocol Extensions setting in the Samba settings after disabling my Time Machine shares.

That seems to have resolved the issue - but it seems there's quite a glaring file descriptor leak going on somewhere in vfs_fruit land...

Welcome any additional insights or perspective, but wanted to call it out for others. It's not a perfect fix (lack of Time Machine shares working), but it does get you up and running.

@anados - Is this a known issue?
 

blckdvc

Cadet
Joined
Mar 31, 2023
Messages
5
Thanks for your post.

I have the same issue while doing large data transfers (well large for me might be small for you), randomly earlier or later within the copy/move process (crashed between 20gb and 70gb over 390gb)

Tweaking the max open files value to the threshold helped me to workaround and copy my files.
If I encounter again this error I will use FTP as an alternative to deal with "large" data....so I can keep TimeMachine..meanwhile a solution is provided
 

blckdvc

Cadet
Joined
Mar 31, 2023
Messages
5
i mean large in terms of nb of files...i had lots of small files.
 

moodx

Cadet
Joined
Feb 19, 2023
Messages
9
I have the same issue while trying to move 1TB folder. I get error 42 from Mac OS finder.

Disabling "Enable Apple SMB2/3 Protocol Extensions" didn't work for me.


Client: Mac OS Montery 12.6.5
Server: TrueNAS-SCALE-22.12.1
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,553
There's a leak related to ADS opens (when xattr doesn't exist) that's being fixed in 22.12.3, probably fruit is tickling it.

Though in the future, it's generally better for everyone if you can file bug reports with solid details on how to reproduce rather than posting work arounds :)
 

blckdvc

Cadet
Joined
Mar 31, 2023
Messages
5
I have the same issue while trying to move 1TB folder. I get error 42 from Mac OS finder.

Disabling "Enable Apple SMB2/3 Protocol Extensions" didn't work for me.


Client: Mac OS Montery 12.6.5
Server: TrueNAS-SCALE-22.12.1
I had success by tweaking the max open files value
 

blckdvc

Cadet
Joined
Mar 31, 2023
Messages
5
There's a leak related to ADS opens (when xattr doesn't exist) that's being fixed in 22.12.3, probably fruit is tickling it.

Though in the future, it's generally better for everyone if you can file bug reports with solid details on how to reproduce rather than posting work arounds :)
Sorry didn't see your post, i will report a bug
 

blckdvc

Cadet
Joined
Mar 31, 2023
Messages
5
How do you tweak the max open files value? Any recommended values?
This value was successful for me with my setup, see the SMB service configuration, down below add the following :
1684927018780.png
 
Top