[Date Prev][Date Next] [Chronological] [Thread] [Top]

Bind call deadlocks when LDAP server does not respond (ITS#1593)



Full_Name: Rick Renshaw
Version: 2.0.12
OS: Windows 2000
URL: 
Submission from: (NULL) (136.2.1.101)


I have the following code as a method inside a COM object.  When I throw a large
load at the COM object (16 threads each making 200 queries) eventually the COM
object will deadlock in ldap_simple_bind_s.  I did a network trace and found
that the LDAP server (Netscape Directory Server) fails to respond to the last
BindRequest.  I would expect the bind to timeout, but it doesn't.  I have
changed to using an asynchronous bind, and abandoning the connection if it
doesn't complete, and this is working; but I still wanted to report the bug.

const int timelimit=60;
ldap_set_option(NULL,LDAP_OPT_TIMELIMIT,(void *)&timelimit);
ldap=ldap_init(servername,ServerPort)
err=ldap_simple_bind_s(ldap,user,password)