Issue 6898 - libldap_r lockup
Summary: libldap_r lockup
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: 2.4.25
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-08 18:09 UTC by Quanah Gibson-Mount
Modified: 2014-08-01 21:04 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Quanah Gibson-Mount 2011-04-08 18:09:42 UTC
Full_Name: Quanah Gibson-Mount
Version: 2.4.25
OS: Linux 2.6
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (75.111.45.108)


In the past, libldap_r was safe to use as a replacement for libldap.  With a
current OpenLDAP release, however, it locks up.  This can be trivially
triggered:

zimbra@zre-ldap002:~$ LD_PRELOAD=/opt/zimbra/openldap/lib/libldap_r-2.4.so.2
/opt/zimbra/openldap/bin/ldapsearch -x -H ldap://zre-ldap002.eng.vmware.com -s
base -b ""


^C
zimbra@zre-ldap002:~$ ^C
zimbra@zre-ldap002:~$ /opt/zimbra/openldap/bin/ldapsearch -x -H
ldap://zre-ldap002.eng.vmware.com -s base -b ""
# extended LDIF
#
Comment 1 tgates81@gmail.com 2011-04-09 01:25:25 UTC
I can confirm this is happening too, since 2.4.24. It was working in
2.4.21, not sure about anything in between.

Comment 2 Quanah Gibson-Mount 2011-04-09 19:55:49 UTC
--On Friday, April 08, 2011 9:25 PM -0400 Tyler Gates <tgates81@gmail.com> 
wrote:

> I can confirm this is happening too, since 2.4.24. It was working in
> 2.4.21, not sure about anything in between.

>From the debian list:

I've checked it with gdb too, and it locks at 
libraries/libldap/options.c:455
That is in the function ldap_set_option, still no clue why it is locking 
there.


--Quanah

--

Quanah Gibson-Mount
Sr. Member of Technical Staff
Zimbra, Inc
A Division of VMware, Inc.
--------------------
Zimbra ::  the leader in open source messaging and collaboration

Comment 3 Quanah Gibson-Mount 2011-04-09 20:56:20 UTC
--On Saturday, April 09, 2011 7:56 PM +0000 quanah@zimbra.com wrote:

> --On Friday, April 08, 2011 9:25 PM -0400 Tyler Gates
> <tgates81@gmail.com>  wrote:
>
>> I can confirm this is happening too, since 2.4.24. It was working in
>> 2.4.21, not sure about anything in between.
>
>> From the debian list:
>
> I've checked it with gdb too, and it locks at
> libraries/libldap/options.c:455
> That is in the function ldap_set_option, still no clue why it is locking
> there.

Full backtrace:

(gdb) thr apply all bt

Thread 1 (Thread 0x7f34820c4700 (LWP 26379)):
#0  0x00007f34803d6464 in __lll_lock_wait () from /lib/libpthread.so.0
#1  0x00007f34803d15d9 in _L_lock_953 () from /lib/libpthread.so.0
#2  0x00007f34803d13fb in pthread_mutex_lock () from /lib/libpthread.so.0
#3  0x00007f3481c62ff5 in ldap_pvt_thread_mutex_lock (mutex=0x1cac2a0) at 
thr_posix.c:296
#4  0x00007f3481c87fb9 in ldap_set_option (ld=0x1cab030, option=17, 
invalue=0x6164a8) at options.c:455
#5  0x000000000040ad83 in tool_conn_setup (dont=0, private_setup=0x405367 
<private_conn_setup>) at common.c:1347
#6  0x00000000004059c7 in main (argc=8, argv=0x7fff16202148) at 
ldapsearch.c:906


--Quanah


--

Quanah Gibson-Mount
Sr. Member of Technical Staff
Zimbra, Inc
A Division of VMware, Inc.
--------------------
Zimbra ::  the leader in open source messaging and collaboration

Comment 4 Howard Chu 2011-04-09 23:56:09 UTC
changed notes
changed state Open to Test
moved from Incoming to Software Bugs
Comment 5 Quanah Gibson-Mount 2011-06-08 22:16:16 UTC
changed notes
changed state Test to Release
Comment 6 Quanah Gibson-Mount 2011-07-18 19:53:14 UTC
changed notes
changed state Release to Closed
Comment 7 OpenLDAP project 2014-08-01 21:04:35 UTC
fixed in HEAD
Fixed in RE24