[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
LDAP client (2.1.30) with gnuTLS (1.0.16) dies in glibc mutex
Hi there,
I tracked down a very strange problem with my Cyrus-Imap sever to a
deadlock in libldap, which is used by the ldapdb SASL auxprop. The LDAP
client attempts to establish an SSL connection using ldaps://. The
system uses ldap_nss (#22 in backlog) for id lookup, also using ldaps://
but no SASL, i.e. no ldpadb. However, id or ldapwhoami works. The
strange thing is characterised as follows:
1) If I use plain imap for connect, e.g. telnet mail imap, everything
works fine.
2) If I use imaps for connect, e.g. openssl s_client -connect
mail:imaps, everything works fine, if the authentication fails, i.e. if
I supply a wrong password.
3) If however I supply the correct password, libldap hangs in a glibc
mutex forever eating CPU.
I have attached a backlog of the issue, which is 100% deterministic on
my system (Debian Sarge, with current updates). The system had worked
before a major update (some 120 MB, so I don't know what was affected,
but I belive there was a new glibc and ldap_nss involved) beginning of
May 2005. The last library before glibc is libldap (#4), probably as a
callback from gnutls, initated from libldap_r (#14) - but this is my
speculation and actually, what my question is about.
Would somebody with deeper knowledge of libldap (2.1.30) internals be so
kind to help me to put this backlog into a context, in order to be able
to trace the issue to whatever connection state may be relevant? In
particular I want to find some criteria to narrow the search to a
particular sub-system, but currently the issue is rather blowing in
complexity than shrinking.
Thanks for your help,
- lars.
The backlog:
#0 0x416cc436 in __lll_mutex_lock_wait () from /lib/tls/libpthread.so.0
#1 0x416c9893 in _L_mutex_lock_26 () from /lib/tls/libpthread.so.0
#2 0x402b1844 in mallopt () from /lib/tls/libc.so.6
#3 0x403231af in pthread_mutex_lock () from /lib/tls/libc.so.6
#4 0x404bdca1 in ldap_start_tls_s () from /usr/lib/libldap.so.2
#5 0x40580d03 in gcry_sexp_canon_len () from /usr/lib/libgcrypt.so.11
#6 0x40580e41 in gcry_sexp_canon_len () from /usr/lib/libgcrypt.so.11
#7 0x4058db5e in gcry_randomize () from /usr/lib/libgcrypt.so.11
#8 0x405896c5 in gcry_md_algo_name () from /usr/lib/libgcrypt.so.11
#9 0x405897c2 in gcry_md_open () from /usr/lib/libgcrypt.so.11
#10 0x4051ffbc in _gnutls_hash_init () from /usr/lib/libgnutls.so.11
#11 0x405197b1 in gnutls_handshake () from /usr/lib/libgnutls.so.11
#12 0x416bacb5 in gnutls_SSL_free () from /usr/lib/libldap_r.so.2
#13 0x416badda in gnutls_SSL_connect () from /usr/lib/libldap_r.so.2
#14 0x416b868e in ldap_pvt_tls_init_def_ctx () from /usr/lib/libldap_r.so.2
#15 0x416b9696 in ldap_int_tls_start () from /usr/lib/libldap_r.so.2
#16 0x416994a7 in ldap_int_open_connection () from /usr/lib/libldap_r.so.2
#17 0x416ab299 in ldap_new_connection () from /usr/lib/libldap_r.so.2
#18 0x41698f11 in ldap_open_defconn () from /usr/lib/libldap_r.so.2
#19 0x416aae0f in ldap_send_initial_request () from /usr/lib/libldap_r.so.2
#20 0x416a1137 in ldap_sasl_bind () from /usr/lib/libldap_r.so.2
#21 0x416a1b50 in ldap_simple_bind () from /usr/lib/libldap_r.so.2
#22 0x41675974 in ?? () from /lib/libnss_ldap.so.2
#23 0x0815e460 in ?? ()
#24 0x00000000 in ?? ()
#25 0x00000000 in ?? ()
#26 0x416c2734 in ?? () from /usr/lib/libldap_r.so.2
#27 0x00005005 in ?? ()
#28 0x0815e464 in ?? ()
#29 0xbfffe068 in ?? ()
#30 0x416b12f8 in ldap_set_option () from /usr/lib/libldap_r.so.2
#31 0x4167558d in ?? () from /lib/libnss_ldap.so.2
#32 0x0815e460 in ?? ()
#33 0x0000001e in ?? ()
#34 0x00000000 in ?? ()
#35 0x00000000 in ?? ()
#36 0x00000000 in ?? ()
#37 0x08178120 in ?? ()
#38 0x0815ffc0 in ?? ()
#39 0x00000200 in ?? ()
#40 0x0000001e in ?? ()
#41 0x00000000 in ?? ()
#42 0x00000000 in ?? ()
#43 0x41682888 in ?? () from /lib/libnss_ldap.so.2
#44 0x40378060 in ?? ()
#45 0xbfffe9b0 in ?? ()
#46 0xbfffe0b8 in ?? ()
#47 0x41674fae in ?? () from /lib/libnss_ldap.so.2
#48 0x0000cf3c in ?? ()
#49 0x41682888 in ?? () from /lib/libnss_ldap.so.2
#50 0xbfffe918 in ?? ()
#51 0x416769ea in ?? () from /lib/libnss_ldap.so.2
#52 0x001e0021 in ?? ()
#53 0x00000006 in ?? ()
#54 0x00000034 in ?? ()
#55 0x00000034 in ?? ()
#56 0x00000034 in ?? ()
#57 0x00000100 in ?? ()
#58 0x00000100 in ?? ()
#59 0x00000005 in ?? ()
#60 0x00000004 in ?? ()
#61 0x00000003 in ?? ()
#62 0x0000bd13 in ?? ()
#63 0x0000bd13 in ?? ()
#64 0x00000000 in ?? ()
#65 0x00000013 in ?? ()
#66 0x00000013 in ?? ()
#67 0x00000004 in ?? ()
#68 0x00000001 in ?? ()
#69 0x00000001 in ?? ()
#70 0x00000000 in ?? ()
#71 0x00000000 in ?? ()
#72 0x00000000 in ?? ()
#73 0x0000bf04 in ?? ()
#74 0x40016bc0 in ?? () from /lib/ld-linux.so.2
#75 0xbfffe61c in ?? ()
#76 0x405c9c98 in ?? () from /usr/lib/libz.so.1
#77 0xbfffe140 in ?? ()
#78 0x4000aa19 in _dl_relocate_object () from /lib/ld-linux.so.2