Hi, A day or so after starting samba, some daemons (diferent forks) begin to hang. Then, the WinXP clients hang too completely. When I try to figure out what is happen, I see that smbd daemons hangs always in a fcntl64() call: # strace -p 6414 Process 6414 attached - interrupt to quit fcntl64(14, F_SETLKW64, {type=F_WRLCK, whence=SEEK_SET, start=3684, len=1} <unfinished ...> Process 6414 detached # The file descriptor 14 corresponds to /var/lib/samba/locking.tdb file. A backtrace using gdb from one stalled daemon: (gdb) bt #0 0x00faf402 in __kernel_vsyscall () #1 0x003dbd7a in fcntl () from /lib/libc.so.6 #2 0x008e50eb in tdb_set_lock_alarm () from /usr/sbin/smbd #3 0x008e5307 in tdb_set_lock_alarm () from /usr/sbin/smbd #4 0x008e5868 in tdb_chainlock () from /usr/sbin/smbd #5 0x00880da8 in get_share_mode_lock () from /usr/sbin/smbd #6 0x00881677 in get_delete_on_close_flag () from /usr/sbin/smbd #7 0x007718fb in reply_trans2 () from /usr/sbin/smbd #8 0x007906bc in smb_fn_name () from /usr/sbin/smbd #9 0x007913c4 in process_smb () from /usr/sbin/smbd #10 0x00791899 in smbd_process () from /usr/sbin/smbd #11 0x0096c5c0 in main () from /usr/sbin/smbd (gdb) A backtrace from another stalled daemon: (gdb) bt #0 0x00faf402 in __kernel_vsyscall () #1 0x003dbd7a in fcntl () from /lib/libc.so.6 #2 0x008e50eb in tdb_set_lock_alarm () from /usr/sbin/smbd #3 0x008e5307 in tdb_set_lock_alarm () from /usr/sbin/smbd #4 0x008e5868 in tdb_chainlock () from /usr/sbin/smbd #5 0x00880da8 in get_share_mode_lock () from /usr/sbin/smbd #6 0x0077ab8b in open_file_ntcreate () from /usr/sbin/smbd #7 0x0074a922 in reply_ntcreate_and_X () from /usr/sbin/smbd #8 0x007906bc in smb_fn_name () from /usr/sbin/smbd #9 0x007913c4 in process_smb () from /usr/sbin/smbd #10 0x00791899 in smbd_process () from /usr/sbin/smbd #11 0x0096c5c0 in main () from /usr/sbin/smbd (gdb) The number of smbd daemons stalled increases in time. I'm using FC4 with last updates installed and samba 3.0.21a. Maybe is a kernel related problem with file locking? Thanx in advance! -- Fermin Molina Ibarz T?cnic sistemes - ASIC Universitat de Lleida Tel: +34 973 702151 GPG: 0x060F857A
Jeremy Allison
2006-Jan-26 20:24 UTC
[Samba] Samba daemons hang trying to lock locking.tdb
On Wed, Jan 25, 2006 at 04:11:33PM +0100, Fermin Molina wrote:> Hi, > > A day or so after starting samba, some daemons (diferent forks) begin to > hang. Then, the WinXP clients hang too completely. > > When I try to figure out what is happen, I see that smbd daemons hangs > always in a fcntl64() call: > > # strace -p 6414 > Process 6414 attached - interrupt to quit > fcntl64(14, F_SETLKW64, {type=F_WRLCK, whence=SEEK_SET, start=3684, len=1} <unfinished ...> > Process 6414 detached > # > > The file descriptor 14 corresponds to /var/lib/samba/locking.tdb file. > A backtrace using gdb from one stalled daemon:Known bug we fixed with 3.0.21a (in fact this was the *reason* for 3.0.21a... :-). Jeremy.
On Fri, 2006-01-27 at 07:52 +0100, Masopust, Christian wrote:> Hi, > > I had a similar behaviour on my RHEL 4 system (with the only difference > that smbds did the fcntl64 to secrets.tdb). > > I changed "machine password timeout = 0" in my smb.conf and the problem > had gone away (do you have any messages in your logs pointing out that > server password could not be changed?)With this option set to 0, I think the password is never updated, then, secrets.tdb file is never used (I read in man.conf(5) that this is only needed when using security=domain, not my case because I use security=user). But in my case, locking.tdb is used a lot (using strace, when the system works well, I see a lot of fcntl64 calls using the locking.tdb file descriptor). Thanx for the answer! /Fermin> > -----Original Message----- > > From: > > samba-bounces+christian.masopust=siemens.com@lists.samba.org > > [mailto:samba-bounces+christian.masopust=siemens.com@lists.sam > > ba.org] On Behalf Of Fermin Molina > > Sent: Thursday, January 26, 2006 11:58 PM > > To: Jeremy Allison > > Cc: samba@lists.samba.org > > Subject: Re: [Samba] Samba daemons hang trying to lock locking.tdb > > > > On Thu, 2006-01-26 at 12:23 -0800, Jeremy Allison wrote: > > > On Wed, Jan 25, 2006 at 04:11:33PM +0100, Fermin Molina wrote: > > > > Hi, > > > > > > > > A day or so after starting samba, some daemons (diferent > > forks) begin to > > > > hang. Then, the WinXP clients hang too completely. > > > > > > > > When I try to figure out what is happen, I see that smbd > > daemons hangs > > > > always in a fcntl64() call: > > > > > > > > # strace -p 6414 > > > > Process 6414 attached - interrupt to quit > > > > fcntl64(14, F_SETLKW64, {type=F_WRLCK, whence=SEEK_SET, > > start=3684, len=1} <unfinished ...> > > > > Process 6414 detached > > > > # > > > > > > > > The file descriptor 14 corresponds to > > /var/lib/samba/locking.tdb file. > > > > A backtrace using gdb from one stalled daemon: > > > > > > Known bug we fixed with 3.0.21a (in fact this was the *reason* > > > for 3.0.21a... :-). > > > > > > Errr... well, please, read at end of my email :-) > > > > ------- > > The number of smbd daemons stalled increases in time. > > I'm using FC4 with last updates installed and samba 3.0.21a. > > > > Maybe is a kernel related problem with file locking? > > > > Thanx in advance! > > ------- > > > > The fact is that I have installed 3.0.21a samba version. > > FC4's RPMs from > > samba.org web, and I get the same behaviour. > > > > Thanx in advance! > > > > -- > > Fermin Molina Ibarz > > T?cnic sistemes - ASIC > > Universitat de Lleida > > Tel: +34 973 702151 > > GPG: 0x060F857A > > > > > > -- > > To unsubscribe from this list go to the following URL and read the > > instructions: https://lists.samba.org/mailman/listinfo/samba > >-- Fermin Molina Ibarz T?cnic sistemes - ASIC Universitat de Lleida Tel: +34 973 702151 GPG: 0x060F857A
Hi, After upgrade to samba 3.0.21b, the behaviour is the same. I think the problem must be related to TDB (Trivial DB) code. The call fcntl64() is trying to lock for write the file /var/cache/locking.tdb, but with the F_SETLKW file control command. This control command waits if the file is blocked. If another process locks for write this file, can we get a deadlock? The fact is that some hours after start samba, some smbd daemons hangs waiting to get a write lock to locking.tdb file. The windows clients associated with these smbd daemons get stalled and the user must to reset the machine (or I kill -9 these daemons). Any clue? Thanks in advance. On Wed, 2006-01-25 at 16:11 +0100, Fermin Molina wrote:> Hi, > > A day or so after starting samba, some daemons (diferent forks) begin to > hang. Then, the WinXP clients hang too completely. > > When I try to figure out what is happen, I see that smbd daemons hangs > always in a fcntl64() call: > > # strace -p 6414 > Process 6414 attached - interrupt to quit > fcntl64(14, F_SETLKW64, {type=F_WRLCK, whence=SEEK_SET, start=3684, len=1} <unfinished ...> > Process 6414 detached > # > > The file descriptor 14 corresponds to /var/lib/samba/locking.tdb file. > A backtrace using gdb from one stalled daemon: > > (gdb) bt > #0 0x00faf402 in __kernel_vsyscall () > #1 0x003dbd7a in fcntl () from /lib/libc.so.6 > #2 0x008e50eb in tdb_set_lock_alarm () from /usr/sbin/smbd > #3 0x008e5307 in tdb_set_lock_alarm () from /usr/sbin/smbd > #4 0x008e5868 in tdb_chainlock () from /usr/sbin/smbd > #5 0x00880da8 in get_share_mode_lock () from /usr/sbin/smbd > #6 0x00881677 in get_delete_on_close_flag () from /usr/sbin/smbd > #7 0x007718fb in reply_trans2 () from /usr/sbin/smbd > #8 0x007906bc in smb_fn_name () from /usr/sbin/smbd > #9 0x007913c4 in process_smb () from /usr/sbin/smbd > #10 0x00791899 in smbd_process () from /usr/sbin/smbd > #11 0x0096c5c0 in main () from /usr/sbin/smbd > (gdb) > > > A backtrace from another stalled daemon: > > > (gdb) bt > #0 0x00faf402 in __kernel_vsyscall () > #1 0x003dbd7a in fcntl () from /lib/libc.so.6 > #2 0x008e50eb in tdb_set_lock_alarm () from /usr/sbin/smbd > #3 0x008e5307 in tdb_set_lock_alarm () from /usr/sbin/smbd > #4 0x008e5868 in tdb_chainlock () from /usr/sbin/smbd > #5 0x00880da8 in get_share_mode_lock () from /usr/sbin/smbd > #6 0x0077ab8b in open_file_ntcreate () from /usr/sbin/smbd > #7 0x0074a922 in reply_ntcreate_and_X () from /usr/sbin/smbd > #8 0x007906bc in smb_fn_name () from /usr/sbin/smbd > #9 0x007913c4 in process_smb () from /usr/sbin/smbd > #10 0x00791899 in smbd_process () from /usr/sbin/smbd > #11 0x0096c5c0 in main () from /usr/sbin/smbd > (gdb) > > > The number of smbd daemons stalled increases in time. > I'm using FC4 with last updates installed and samba 3.0.21a. > > Maybe is a kernel related problem with file locking? > > Thanx in advance! > > -- > Fermin Molina Ibarz > T?cnic sistemes - ASIC > Universitat de Lleida > Tel: +34 973 702151 > GPG: 0x060F857A > >-- Fermin Molina Ibarz T?cnic sistemes - ASIC Universitat de Lleida Tel: +34 973 702151 GPG: 0x060F857A