[Samba] Samba spawning excessive smbd processes.

Marco van Putten Marco.vanPutten at tudelft.nl
Sun Nov 9 17:46:26 GMT 2008



Jeremy Allison wrote:
> On Sat, Nov 08, 2008 at 06:28:42PM +0100, Marco van Putten wrote:
>> Hi,
>>
>> We're running Samba (3.0.28-1.el5_2.1) on a Redhat (5.2) server using  
>> winbind to authenticate against a Windows AD.
>>
>> This all worked fine for a while. But now we have the problem that  
>> (some) users coming from Linux clients cause an excessive amount of smbd  
>> processes. We had 1 user who had more than 1700 smbd processes all  
>> coming from the same client. While on the client side there where only a  
>> few cifs processes running.
>>
>> All these processes are not responding to a normal kill. They have no  
>> more connection to the client what so ever and have to be killed with a  
>> kill -9.
> 
> Attach to these processes using strace -p <pid> and find out what
> they're up to. Also try attaching with gdb <attach> command and
> get a back trace. Don't forget to load the symbol tables also.
> 
> This should give some clue as to what is going on.
> 
> Jeremy.

Thanks for your reply Jeremy.

These are the outputs I got from gdb and strace. It looks like there is 
not very much going on... Hopefully it makes some sense to you.

# gdb smbd 32717
(gdb) bt
#0  0x00002b55a75a9ddf in fcntl () from /lib64/libpthread.so.0
#1  0x00002b55a5e60256 in tdb_brlock () from /usr/sbin/smbd
#2  0x00002b55a5e60065 in tdb_lock () from /usr/sbin/smbd
#3  0x00002b55a5e601c0 in tdb_chainlock () from /usr/sbin/smbd
#4  0x00002b55a5dfa380 in is_locked () from /usr/sbin/smbd
#5  0x00002b55a5df9e38 in is_locked () from /usr/sbin/smbd
#6  0x00002b55a5cc5c11 in reply_write_and_X () from /usr/sbin/smbd
#7  0x00002b55a5cfda14 in schedule_deferred_open_smb_message () from 
/usr/sbin/smbd
#8  0x00002b55a5cfe9c1 in smbd_process () from /usr/sbin/smbd
#9  0x00002b55a5f00d00 in main () from /usr/sbin/smbd


# strace -p 32717
fcntl(10, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start=15032, len=1}


 From a netstat these processes are in a CLOSE_WAIT or a TIME_WAIT status.

Bye,
Marco.


More information about the samba mailing list