samba pdc trusting windows domain, winbindd deadlock
Peter H. Ganten
ganten at univention.de
Mon Jan 26 23:58:11 GMT 2004
Hello all,
Am Sa, 2004-01-24 um 00.48 schrieb Volker.Lendecke at SerNet.DE:
> [2004/01/23 11:41:20, 4] lib/smbldap.c:smbldap_open(838)
> The LDAP server is succesful connected
> [2004/01/23 11:41:30, 5] lib/util_sock.c:print_socket_options(105)
> socket option SO_KEEPALIVE = 1
I have been digging a little bit more into the problem. Now I think, the
reason for the deadlock is the following:
1/ samba is waiting for a connection
2/ winbindd is starting and connecting to the local samba server. Before
it connects, it successfully acquires a mutex with
secrets_named_mutex ( "TSERV", WINBIND_SERVER_MUTEX_WAIT_TIME ), which
calls tdb_lock ( "secrets.tdb", BUCKET(tdb_hash(&"TSERV")), F_WRLCK).
This leads to the following syscall:
fcntl64(<fd of secrets.tdb>, F_SETLKW64, {type=F_WRLCK, whence=SEEK_SET,
start=280, len=1}, 0xbfffea00) = 0
3/ when winbindd connects to samba, smbd starts a new process and
initializes LDAP. During this initialization, it retrieves the domain
SID from LDAP and after that from the secrets.tdb, to compare both
values (line 2360 of passdb/pdb_ldap.c). Retrieving the domain SID from
LDAP involves locking the key SECRETS/SID/WOOGA in secrets.tdb. This
also leads to the following syscall:
fcntl64(<fd of secrets.tdb>, F_SETLKW64, {type=F_RDLCK, whence=SEEK_SET,
start=280, len=1}
4/ the last call locks smbd until winbindd is giving up and releasing
its own lock.
Of cause, I would be happy about any hints.
Greetings,
Peter
--
Peter H. Ganten <ganten at univention.de> fon: +49 421 22 08 114
Geschäftsführer Linux for Your Business fax: +49 421 22 08 115
Univention GmbH http://www.univention.de/ mobil: +49 170 47 25 652
More information about the samba-technical
mailing list