VFS and tdb_lock

Brad Sahr bsahr at macromedia.com
Fri Sep 29 00:48:18 GMT 2000


When I run multiple SMB clients through my VFS, I get multiple smbd
processes hanging in tdb_lock(). Sound familiar to anyone? I'm running with
source from the head branch about 3 weeks ago.

I've also come across what I thought was an interesting use of a file's dev
and ino fields - as unique keys used by tdb (if I follow correctly).

Here are two stack traces of two different smbd processes that demonstrate
what I'm running into. Please let me know if there's anything else that I
can supply for information. From the VFS perspective, the last thing it sees
from Samba is a call to stat(). From the SMB client perspective, the SMB
client app (MS Explorer) simply hangs. On the Samba box, I see the client
start up a new smbd every minute or so - with each smbd ending up in the
same situation.

Brad


Attaching to Pid 20088
(gdb) bt
#0  0x40114ce4 in ?? ()
#1  0x8107dd8 in tdb_lock (tdb=0x817c878, list=116, locktype=1)
    at tdb/tdb.c:128
#2  0x810970e in tdb_lockchain (tdb=0x817c878, key={dptr = 0x816673c "xN",
      dsize = 12}) at tdb/tdb.c:1314
#3  0x80ea3cd in lock_share_entry (conn=0x819fbc0, dev=20088, inode=2)
    at locking/locking.c:277
#4  0x8088b67 in open_file_shared (conn=0x819fbc0,
    fname=0xbffff8f8 "It's All Been Done.mp3", share_mode=32832, ofun=1,
    mode=484, oplock_request=3, Access=0xbffff890, action=0xbffff894)
    at smbd/open.c:644
#5  0x8074c34 in reply_ntcreate_and_X (conn=0x819fbc0, inbuf=0x817dea1 "",
    outbuf=0x818e2a9 "", length=111, bufsize=65535) at smbd/nttrans.c:819
#6  0x808ef92 in switch_message (type=162, inbuf=0x817dea1 "",
    outbuf=0x818e2a9 "", size=111, bufsize=65535) at smbd/process.c:577
#7  0x808f050 in construct_reply (inbuf=0x817dea1 "", outbuf=0x818e2a9 "",
    size=111, bufsize=65535) at smbd/process.c:611
#8  0x808f1fe in process_smb (inbuf=0x817dea1 "", outbuf=0x818e2a9 "")
    at smbd/process.c:676
#9  0x808fa48 in smbd_process () at smbd/process.c:1063
#10 0x80627e8 in main (argc=1, argv=0xbffffe74) at smbd/server.c:764
(gdb) detach
Detaching from program: , Pid 20088
(gdb) attach 20092
Attaching to Pid 20092
0x40114ce4 in ?? ()
(gdb) bt
#0  0x40114ce4 in ?? ()
#1  0x8107dd8 in tdb_lock (tdb=0x817c878, list=86, locktype=0) at
tdb/tdb.c:128
#2  0x81088f9 in tdb_fetch (tdb=0x817c878, key={dptr = 0x816673c "\b\b",
      dsize = 12}) at tdb/tdb.c:695
#3  0x80ea73f in set_share_mode (fsp=0x81a6768, port=1074, op_type=3)
    at locking/locking.c:404
#4  0x8088e5b in open_file_shared (conn=0x819fbc0,
    fname=0xbffff8f8 "Never is Enough.mp3", share_mode=32832, ofun=1,
    mode=484, oplock_request=3, Access=0xbffff890, action=0xbffff894)
    at smbd/open.c:772
#5  0x8074c34 in reply_ntcreate_and_X (conn=0x819fbc0, inbuf=0x817dea1 "",
    outbuf=0x818e2a9 "", length=108, bufsize=65535) at smbd/nttrans.c:819
#6  0x808ef92 in switch_message (type=162, inbuf=0x817dea1 "",
    outbuf=0x818e2a9 "", size=108, bufsize=65535) at smbd/process.c:577
#7  0x808f050 in construct_reply (inbuf=0x817dea1 "", outbuf=0x818e2a9 "",
    size=108, bufsize=65535) at smbd/process.c:611
#8  0x808f1fe in process_smb (inbuf=0x817dea1 "", outbuf=0x818e2a9 "")
    at smbd/process.c:676
#9  0x808fa48 in smbd_process () at smbd/process.c:1063
#10 0x80627e8 in main (argc=1, argv=0xbffffe74) at smbd/server.c:764





More information about the samba-technical mailing list