Hi I'm running samba 3.4.0 on SuSE Linux 11.1 x86_64 under xinetd. Every couple of days smbd starts to use 100% cpu for no apparent reason and cannot be killed. I have tried removing printer support with "load printers = no" in smb.conf but to no avail. I have also tried using samba 4 but within an hour or so the samba daemon randomly starts to use 100% cpu and cannot be killed. I can't provide much more info because when this happens it is almost impossible to do anything except reboot ... although I have managed to run top to show that it is samba that is using 100% cpu. (Also samba 4 does not seem to update unix file permissions correctly ... so for example setting a file to be read only via windows does not set the unix permissions to 444 as I expected???) I would be very grateful for any help as I have had to turn off samba ... and life without it is very hard. Thanks Mark
My guess is it's this bug: https://bugzilla.samba.org/show_bug.cgi?id=6476 which was fixed post 3.4.0 and is in the current 3.4.1 code branch. Are you able to compile from source to test this version ? Jeremy.
(In reply to comment #1) > My guess is it's this bug: > https://bugzilla.samba.org/show_bug.cgi?id=6476 > which was fixed post 3.4.0 and is in the current 3.4.1 code branch. Are you > able to compile from source to test this version ? > Jeremy. I just checked the 3.4.0 source that I build from and the patch (for source3/smbd/server.c) that you suggest already seems to be included. I do not have lots of zombie processes ... just one smbd process using 100% cpu.
Ok, then I'm going to need more help in tracking this down. I need a gdb backtrace from the spinning smbd - make sure it's built with -g for symbols. Try and get a couple of backtraces at different points so I can see where it's spinning, also an strace would help. Jeremy.
Can you try upgrading your kernel? There have been reports where the linux kernel inotify implementation is buggy, leading to this behaviour. As a quick measure, please try "kernel change notify = false" Please tell us if this helped. Thanks, Volker
(In reply to comment #4) > Can you try upgrading your kernel? There have been reports where the linux > kernel inotify implementation is buggy, leading to this behaviour. > As a quick measure, please try "kernel change notify = false" > Please tell us if this helped. > Thanks, > Volker I've added "kernel change notify = no" to my smb.conf file and I'm running strace on the smbd daemon to try to catch it when it starts using 100% cpu ... I'll let you know what happens ...
(In reply to comment #5) > I've added "kernel change notify = no" to my smb.conf file and I'm running > strace on the smbd daemon to try to catch it when it starts using 100% > cpu ... I'll let you know what happens ... So far so good ... however several things have changed ... - above change to smb.conf - reconfigured samba build with CFLAGS=-g - continuously tracing smbd with strace - running another unrelated process with very high cpu usage ... I'll continue to watch for the bug ...
Any news? Volker
(In reply to comment #7) > Any news? > Volker Still running okay ... I'll let you know if it hangs again.
Lowering severity as this is not a showstopper for 3.4.1.
... samba still running okay ... I've finally stopped running the other process with high CPU-usage a couple of days ago and it seems to make no difference ... looks like it is inotify that was the problem ... I'll stop tracing smbd and re-build samba without the -g flag as soon as I get a minute to see if that makes any difference ...
Closing as WORKSFORME. Please re-open if you can reproduce this with kernel oplocks off. Thanks, Volker