[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
New sigsegv - this one with heimdal - 2.1.5 only (was: Re: Slapd SIGSEGV during ldapsearch -Y gssapi (ITS#2101))
"Kurt D. Zeilenga" <Kurt@OpenLDAP.org> writes:
> compile OpenLDAP --without-threads or don't use MIT Kerberos libraries.
I have used heimdal after your sugestion (linked libgssapiv2.so, and
OpenLDAP binaries with heimdal - checked with ldd(1) and nm(1) - there
is no MIT libs linked there). On the first tests it worked with
gssapi. I started 80 simultaneous connections to slapd(8) on
PIII/500Mhz with X server and X apps, load average 38 - slapd(8) has
*not* died _here_ this time.
This time situation is opposite, ldapsearch(1) is working for big and
long searches, but this one:
/usr/local/test/bin/ldapsearch -Y gssapi -X "u:mvz" -ZZ -LLL "(uid=mvz)" userPassword
is giving segfault - after I get correct ldif(5) output (see end of my
mail for trace and comparations with 2.1.4).
but this one:
/usr/local/test/bin/ldapsearch -Y gssapi -ZZ -LLL "(uid=mvz)" userPassword
... this one (without `-X "u:mvz"') is not triggering segfault. `-X "u:mvz"'
was staled in command line from tests with DIGEST-MD5 before (later)
GSSAPI tests.
>>If not, where should I send this bug report and trace?
>>To MIT people or cyrus-sasl mailing list?
> Likely the MIT folks will say "MIT Kerberos libraries are
> not thread safe" and Cyrus folks will say "Use thread
> safe Kerberos libraries"...
And what OpenLDAP folks will say ? :-)
OK here is gdb(1) post-mortem output ...
--------------------------------------------------------------------------
(root){anthea}[opt]# gdb /usr/local/test/libexec/slapd core.29213
GNU gdb Red Hat Linux (5.1.90CVS-5)
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...(no debugging symbols found)...
Core was generated by `/usr/local/test/libexec/slapd -4 -h ldap://127.0.0.1 ldaps://127.0.0.1 ldap://1'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libresolv.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/libresolv.so.2
Reading symbols from /lib/libcrypto.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/libcrypto.so.2
Reading symbols from /usr/local/test/lib/libsasl2.so.2...done.
Loaded symbols for /usr/local/test/lib/libsasl2.so.2
Reading symbols from /lib/libssl.so.2...done.
Loaded symbols for /lib/libssl.so.2
Reading symbols from /lib/libcrypt.so.1...done.
Loaded symbols for /lib/libcrypt.so.1
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/libnsl.so.1...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /lib/libpthread.so.0...done.
Loaded symbols for /lib/libpthread.so.0
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /lib/libnss_files.so.2...done.
Loaded symbols for /lib/libnss_files.so.2
Reading symbols from /usr/local/test/lib/sasl2/libsasldb.so.2...done.
Loaded symbols for /usr/local/test/lib/sasl2/libsasldb.so.2
Reading symbols from /usr/local/test/lib/sasl2/libcrammd5.so.2...done.
Loaded symbols for /usr/local/test/lib/sasl2/libcrammd5.so.2
Reading symbols from /usr/local/test/lib/sasl2/libdigestmd5.so.2...done.
Loaded symbols for /usr/local/test/lib/sasl2/libdigestmd5.so.2
Reading symbols from /usr/local/test/lib/sasl2/libotp.so.2...done.
Loaded symbols for /usr/local/test/lib/sasl2/libotp.so.2
Reading symbols from /usr/local/test/lib/sasl2/libgssapiv2.so.2...done.
Loaded symbols for /usr/local/test/lib/sasl2/libgssapiv2.so.2
Reading symbols from /opt/heimdal/lib/libgssapi.so.1...done.
Loaded symbols for /opt/heimdal/lib/libgssapi.so.1
Reading symbols from /opt/heimdal/lib/libkrb5.so.17...done.
Loaded symbols for /opt/heimdal/lib/libkrb5.so.17
Reading symbols from /opt/heimdal/lib/libdes.so.3...done.
Loaded symbols for /opt/heimdal/lib/libdes.so.3
Reading symbols from /opt/heimdal/lib/libasn1.so.6...done.
Loaded symbols for /opt/heimdal/lib/libasn1.so.6
Reading symbols from /opt/heimdal/lib/libroken.so.16...done.
Loaded symbols for /opt/heimdal/lib/libroken.so.16
Reading symbols from /opt/heimdal/lib/libcom_err.so.1...done.
Loaded symbols for /opt/heimdal/lib/libcom_err.so.1
Reading symbols from /usr/local/test/lib/sasl2/libplain.so.2...done.
Loaded symbols for /usr/local/test/lib/sasl2/libplain.so.2
Reading symbols from /usr/local/test/lib/sasl2/libanonymous.so.2...done.
Loaded symbols for /usr/local/test/lib/sasl2/libanonymous.so.2
Reading symbols from /lib/libnss_dns.so.2...done.
Loaded symbols for /lib/libnss_dns.so.2
Reading symbols from /lib/libnss_ldap.so.2...done.
Loaded symbols for /lib/libnss_ldap.so.2
#0 0x400a7d62 in i2d_ASN1_OBJECT () from /lib/libcrypto.so.2
(gdb) bt
#0 0x400a7d62 in i2d_ASN1_OBJECT () from /lib/libcrypto.so.2
#1 0x400adcf3 in i2d_X509_ALGOR () from /lib/libcrypto.so.2
#2 0x400b06f4 in i2d_X509_CINF () from /lib/libcrypto.so.2
#3 0x400b10cf in i2d_X509 () from /lib/libcrypto.so.2
#4 0x400ac5a4 in ASN1_digest () from /lib/libcrypto.so.2
#5 0x400cbf8e in X509_digest () from /lib/libcrypto.so.2
#6 0x400d6398 in x509v3_cache_extensions () from /lib/libcrypto.so.2
#7 0x400d6946 in X509_check_issued () from /lib/libcrypto.so.2
#8 0x400c78c4 in check_issued () from /lib/libcrypto.so.2
#9 0x400c7871 in find_issuer () from /lib/libcrypto.so.2
#10 0x400c7489 in X509_verify_cert () from /lib/libcrypto.so.2
#11 0x40131ba9 in ssl_verify_cert_chain () from /lib/libssl.so.2
#12 0x40124582 in ssl3_get_client_certificate () from /lib/libssl.so.2
#13 0x40122539 in ssl3_accept () from /lib/libssl.so.2
#14 0x4012f400 in SSL_accept () from /lib/libssl.so.2
#15 0x080d49f0 in strcpy ()
#16 0x0805322c in strcpy ()
#17 0x08051241 in strcpy ()
#18 0x4018bf77 in pthread_start_thread () from /lib/libpthread.so.0
------------------------------------------------------------------------
Here is another one (from another core dump - same user action)
------------------------------------------------------------------------
(gdb) bt
#0 0x4020f7b9 in chunk_free () from /lib/libc.so.6
#1 0x4020f548 in free () from /lib/libc.so.6
#2 0x40022ad3 in sasl_gss_free_context_contents (text=0x8379a48) at gssapi.c:548
#3 0x40022af8 in gssapi_common_mech_dispose (conn_context=0x8379a48, utils=0x836cb28) at gssapi.c:556
#4 0x4010dab3 in server_dispose (pconn=0x8258d40) at server.c:219
#5 0x40109b57 in sasl_dispose (pconn=0xbf3ffa3c) at common.c:449
#6 0x0807e929 in strcpy ()
#7 0x080524d5 in strcpy ()
#8 0x08052924 in strcpy ()
#9 0x080539d8 in strcpy ()
#10 0x08053079 in strcpy ()
#11 0x080be3cc in strcpy ()
#12 0x4018bf77 in pthread_start_thread () from /lib/libpthread.so.0
------------------------------------------------------------------------
Let's try OL 2.1.4 ... gcc ... (30 minutes later) hmmm it works where 2.1.5
fails - tried 30 times with ldapsearch(1) + `-Y gssapi -X "u:mvz" -ZZ -LLL'!
_Notice_; I'm using OpenLDAP for 1 year (from >= 2.0.7) on
RedHat Linux under glibc 2.2.2, 2.2.4 and 2.2.5 compiled with
pthreads. I had _never_ expirienced slapd(8) core dumps on production
or on test machines, this is only with OL 2.1.5. IMO - maybe *something*
in OpenLDAP 2.1.5 code is triggering some bugs in other software?
--
Miroslav Zubcic