[Samba] Samba 4.7.6-ubuntu taking 100% CPU
lists at marzocchi.net
Fri Apr 2 21:47:59 UTC 2021
Il 02/04/2021 23:33, Jeremy Allison ha scritto:
>>>> The issue manifests itself as following: when I try to open some
>>>> files (not all of them) from any SMB share (I tried two different
>>>> Windows 10 machines and one macOS 10.14), the smb3 process takes
>>>> 100% CPU, it doesn't seem to retrieve the file, and I have to kill
>>>> it "-9", the hard way. I found that, sometimes, after I kill smbd3
>>>> Windows gets the file I tried to open, but it's not a way that
>>>> always works: sometimes it's corrupted (cut too short).
>>>> I tested locally from ssh and the same files have no issues
>>>> whatsoever, it's not a hardware issue. I can read and copy them
>>>> without problems.
>>> Use strace -p <spinning process id> to get system call
>>> traces to see what is going on.
>> Thanks for the reply!
>> I tried just now:
>> sendfile(36, 30, , 262144) = -1 EAGAIN (Resource
>> temporarily unavailable)
>> I disabled sendfile and the issue is solved.
>> I'm very thankful for the help!
>> I tried transferring some big files and I still saturate gigabit,
>> while smaller files are disk-limited anyway. It doesn't look like I
>> actually need sendfile active.
>> I'll investigate the sendfile issue with recent ZFS and if needed I'll
>> report it on their mailing list.
> Hmmm. That may be an old bug (Samba 4.7.6 is quite old
> now) when using sendfile() with non-blocking sockets.
> It might not be sendfile, but Samba here. I'd advise
> trying a later Samba version.
I could compile it, it's indeed relatively easy, but right now I don't
have time for it, unless an issue stops me from working.
I'll jump to 22.xx LTS in 2023 anyway, then I'll get the current release.
It's a home server, no real security risk either, and I don't plan to
try 10 GbE for another couple of years anyway, so some more CPU use
More information about the samba