Hello, I build openldap 2.4.7 a few weeks ago, and 2.4.9 yesterday, with 2.4.7 and 2.4.9, without any my patches, just a clean build. After adding my custom schema, uploading my data from production version, and indexing, I still have it crash with some specific search - I was hoping 2.4.9 have this resolved, seems not, so posting this.
I distracted example search which always causes segfault, each time, 100% reproductible.
Have nice reading.. :) I'd be glad to report I replaced my production with 2.4.x series, thanx upwards for any hint :) Should I perform some gdb-enabled build, and post some core? I'm currently ahead to do this.
Details:
============== ============== slapd.conf:
include /etc/ldap/schema/core.schema include /etc/ldap/schema/cosine.schema include /etc/ldap/schema/nis.schema include /etc/ldap/schema/inetorgperson.schema include /etc/ldap/schema/dnsdomain2.schema include /etc/ldap/schema/sendmail.pw.schema include /etc/ldap/schema/misc.schema include /etc/ldap/schema/ISPEnv2.schema include /etc/ldap/schema/mod_vhost_ldap.schema include /etc/ldap/schema/local.schema include /etc/ldap/schema/hpl.schema include /etc/ldap/schema/apache_ext.schema include /etc/ldap/schema/apache_alias.schema include /etc/ldap/schema/autofs.schema pidfile /var/run/slapd/slapd.pid argsfile /var/run/slapd/slapd.args modulepath /usr/lib/ldap moduleload back_bdb backend bdb loglevel 0 database bdb cachesize 300000 concurrency 256 threads 32 lastmod on suffix "dc=ROOT" checkpoint 128 60 directory "/var/lib/ldap" sizelimit unlimited timelimit 16 include /etc/ldap/indexes rootdn "cn=Directory Manager,dc=ROOT"
access to * by dn="cn=Read Only,dc=ROOT" read by * auth
access to attrs=userPassword by anonymous auth by self write by * auth
access to dn.base="dc=ROOT" by * auth
access to dn.base="" by * auth
============== ==============
/var/lib/ldap/DB_CONFIG is as follows:
set_cachesize 0 2097152 0 set_lg_regionmax 1048576 set_lg_max 1048576 set_lk_max_objects 5000 set_lk_max_locks 5000 set_lk_max_lockers 5000
============== ============== the database is loaded with slapadd (no -q) just before search, and after indexing, with or without any changes before fatal search slapd is started as follows:
root@gnp34:~# slaptest config file testing succeeded
root@gnp34:~# slapd -u root -g root \ -h ldap://192.168.0.221:389/ ldapi:/// \ -d $((1+2+4+8+16+32+64+128+256+512+1024+2048+4096+8192+16384))
============== ==============
the search parameters are:
root@gnp34:~# ldapsearch -vvv -xh 192.168.0.221 \ -WD "cn=Directory Manager,dc=ROOT" -b "dc=dns,dc=nameservers,dc=ROOT" '(&(objectClass=dNSDomain)(associatedDomain=*fakedomain.com)(customerID=10125)(SOARecord=*)(NSRecord=*)(topLevelDomain=TRUE))' ldap_initialize( ldap://192.168.0.221 )
Enter LDAP Password:
# extended LDIF # # LDAPv3 # base <dc=dns,dc=nameservers,dc=ROOT> with scope subtree # filter: (&(objectClass=dNSDomain)(associatedDomain=*fakedomain.com)(customerID=10125)(SOARecord=*)(NSRecord=*)(topLevelDomain=TRUE)) # requesting: ALL #
ldap_result: Can't contact LDAP server (-1)
================================================================== The same search on 2.3.x (production, old stable) with the same data, same indexing, same DB_CONFIG etc. returns the following object: (all my custom attributes are SUP of some standard text/bool attrs, no custom syntaxes nor other advanced customizing )
# fakedomain.com.dns.nameservers.ROOT dn: dc=fakedomain.com,dc=dns,dc=nameservers,dc=ROOT objectClass: top objectClass: dNSDomain objectClass: domainRelatedObject objectClass: managedAccessObject associatedDomain: fakedomain.com dc: fakedomain.com aRecord: AA.BB.CC.DD nSRecord: ns0.otherfakedomain.com nSRecord: ns1.otherfakedomain.com sOARecord: ns0.otherfakedomain.com hostmaster.otherfakedomain.com 2008011307 300 150 2592000 300 mXRecord: 10 mx10.fakedomain.com mXRecord: 20 mx20.fakedomain.com mXRecord: 30 mx10.otherfakedomain.com mXRecord: 40 mx20.otherfakedomain.com customerID: 10125 topLevelDomain: TRUE isActive: TRUE isBlocked: FALSE
# search result search: 2 result: 0 Success
# numResponses: 2 # numEntries: 1
==================== ====================
build configuration is:
--prefix=/usr --libexecdir='${prefix}/lib' --sysconfdir=/etc --localstatedir=/var --mandir='${prefix}/share/man' --enable-debug --enable-dynamic --enable-syslog --enable-proctitle --enable-ipv6 --enable-local --enable-slapd --enable-aci --enable-cleartext --enable-crypt --disable-lmpasswd --enable-spasswd --enable-modules --enable-rewrite --enable-rlookups --enable-slapi --enable-slp --enable-wrappers --enable-backends=mod --enable-ldbm=no --enable-overlays=mod --with-subdir=ldap --with-cyrus-sasl --with-threads --with-tls=gnutls --with-odbc=unixodbc
==================== ====================
and finally debug log collected contains (1000+ lines of initialization skipped ) as follows:
slapd starting daemon: added 4r listener=(nil) daemon: added 7r listener=0x8199078 daemon: epoll: listen=7 active_threads=0 tvp=zero daemon: activity on 1 descriptor daemon: activity on: daemon: epoll: listen=7 active_threads=0 tvp=zero daemon: activity on 1 descriptor daemon: activity on: slap_listener_activate(7): daemon: epoll: listen=7 busy
slap_listener(ldap://192.168.0.221:389/)
daemon: listen=7, new connection on 12 daemon: activity on 1 descriptor daemon: activity on: daemon: epoll: listen=7 active_threads=0 tvp=zero daemon: added 12r (active) listener=(nil) daemon: activity on 1 descriptor conn=0 fd=12 ACCEPT from IP=XX.YY.ZZ.MM:53598 (IP=192.168.0.221:389) daemon: activity on: 12r daemon: read active on 12 connection_get(12) daemon: epoll: listen=7 active_threads=0 tvp=zero daemon: activity on 1 descriptor daemon: activity on: daemon: epoll: listen=7 active_threads=0 tvp=zero connection_get(12): got connid=0 connection_read(12): checking for input on id=0 ber_get_next ldap_read: want=8, got=8 0000: 30 30 02 01 01 60 2b 02 00...`+. ldap_read: want=42, got=42 0000: 01 03 04 1c 63 6e 3d 44 69 72 65 63 74 6f 72 79 ....cn=Directory 0010: 20 4d 61 6e 61 67 65 72 2c 64 63 3d 52 4f 4f 54 Manager,dc=ROOT 0020: 80 08 6b 7a 64 70 6d 31 6f 75 ..SECRET ber_get_next: tag 0x30 len 48 contents: ber_dump: buf=0x8263190 ptr=0x8263190 end=0x82631c0 len=48 0000: 02 01 01 60 2b 02 01 03 04 1c 63 6e 3d 44 69 72 ...`+.....cn=Dir 0010: 65 63 74 6f 72 79 20 4d 61 6e 61 67 65 72 2c 64 ectory Manager,d 0020: 63 3d 52 4f 4f 54 80 08 6b 7a 64 70 6d 31 6f 75 c=ROOT..SECRET ber_get_next ldap_read: want=8 error=Resource temporarily unavailable daemon: activity on 1 descriptor daemon: activity on: daemon: epoll: listen=7 active_threads=0 tvp=zero conn=0 op=0 do_bind ber_scanf fmt ({imt) ber: ber_dump: buf=0x8263190 ptr=0x8263193 end=0x82631c0 len=45 0000: 60 2b 02 01 03 04 1c 63 6e 3d 44 69 72 65 63 74 `+.....cn=Direct 0010: 6f 72 79 20 4d 61 6e 61 67 65 72 2c 64 63 3d 52 ory Manager,dc=R 0020: 4f 4f 54 80 08 6b 7a 64 70 6d 31 6f 75 OOT..SECRET ber_scanf fmt (m}) ber: ber_dump: buf=0x8263190 ptr=0x82631b6 end=0x82631c0 len=10 0000: 00 08 6b 7a 64 70 6d 31 6f 75 ..SECRET
dnPrettyNormal: <cn=Directory Manager,dc=ROOT>
=> ldap_bv2dn(cn=Directory Manager,dc=ROOT,0) <= ldap_bv2dn(cn=Directory Manager,dc=ROOT)=0 => ldap_dn2bv(272) <= ldap_dn2bv(cn=Directory Manager,dc=ROOT)=0 => ldap_dn2bv(272) <= ldap_dn2bv(cn=directory manager,dc=root)=0 <<< dnPrettyNormal: <cn=Directory Manager,dc=ROOT>, <cn=directory manager,dc=root> conn=0 op=0 BIND dn="cn=Directory Manager,dc=ROOT" method=128 do_bind: version=3 dn="cn=Directory Manager,dc=ROOT" method=128 ==> bdb_bind: dn: cn=Directory Manager,dc=ROOT bdb_dn2entry("cn=directory manager,dc=root") => bdb_dn2id("dc=root") <= bdb_dn2id: got id=0x1 => bdb_dn2id("cn=directory manager,dc=root") <= bdb_dn2id: got id=0x2 entry_decode: "cn=Directory Manager,dc=ROOT" <= entry_decode(cn=Directory Manager,dc=ROOT) => access_allowed: auth access to "cn=Directory Manager,dc=ROOT" "userPassword" requested => acl_get: [1] attr userPassword => slap_access_allowed: result not in cache (userPassword) => acl_mask: access to entry "cn=Directory Manager,dc=ROOT", attr "userPassword" requested => acl_mask: to value by "", (=0) <= check a_dn_pat: cn=nobody,dc=root <= check a_dn_pat: * <= acl_mask: [2] applying auth(=xd) (stop) <= acl_mask: [2] mask: auth(=xd) => slap_access_allowed: auth access granted by auth(=xd) => access_allowed: auth access granted by auth(=xd) conn=0 op=0 BIND dn="cn=Directory Manager,dc=ROOT" mech=SIMPLE ssf=0 do_bind: v3 bind: "cn=Directory Manager,dc=ROOT" to "cn=Directory Manager,dc=ROOT" send_ldap_result: conn=0 op=0 p=3 send_ldap_result: err=0 matched="" text="" send_ldap_response: msgid=1 tag=97 err=0 ber_flush2: 14 bytes to sd 12 0000: 30 0c 02 01 01 61 07 0a 01 00 04 00 04 00 0....a........ daemon: activity on 1 descriptor daemon: activity on: 12r daemon: read active on 12 daemon: epoll: listen=7 active_threads=0 tvp=zero ldap_write: want=14, written=14 0000: 30 0c 02 01 01 61 07 0a 01 00 04 00 04 00 0....a........ conn=0 op=0 RESULT tag=97 err=0 text= connection_get(12) connection_get(12): got connid=0 connection_read(12): checking for input on id=0 ber_get_next ldap_read: want=8, got=8 0000: 30 81 b7 02 01 02 63 81 0.....c. ldap_read: want=178, got=178 0000: b1 04 1d 64 63 3d 64 6e 73 2c 64 63 3d 6e 61 6d ...dc=dns,dc=nam 0010: 65 73 65 72 76 65 72 73 2c 64 63 3d 52 4f 4f 54 eservers,dc=ROOT 0020: 0a 01 02 0a 01 03 02 01 00 02 01 00 01 01 00 a0 ................ 0030: 7f a3 18 04 0b 6f 62 6a 65 63 74 43 6c 61 73 73 .....objectClass 0040: 04 09 64 4e 53 44 6f 6d 61 69 6e a4 21 04 10 61 ..dNSDomain.!..a 0050: 73 73 6f 63 69 61 74 65 64 44 6f 6d 61 69 6e 30 ssociatedDomain0 0060: 0d 82 0b 63 6f 72 73 61 72 69 6f 2e 70 6c a3 13 ...fakedomain.com.. 0070: 04 0a 63 75 73 74 6f 6d 65 72 49 44 04 05 31 30 ..customerID..10 0080: 31 32 35 87 09 53 4f 41 52 65 63 6f 72 64 87 08 125..SOARecord.. 0090: 4e 53 52 65 63 6f 72 64 a3 16 04 0e 74 6f 70 4c NSRecord....topL 00a0: 65 76 65 6c 44 6f 6d 61 69 6e 04 04 54 52 55 45 evelDomain..TRUE 00b0: 30 00 0. ber_get_next: tag 0x30 len 183 contents: ber_dump: buf=0x8273e80 ptr=0x8273e80 end=0x8273f37 len=183 0000: 02 01 02 63 81 b1 04 1d 64 63 3d 64 6e 73 2c 64 ...c....dc=dns,d 0010: 63 3d 6e 61 6d 65 73 65 72 76 65 72 73 2c 64 63 c=nameservers,dc 0020: 3d 52 4f 4f 54 0a 01 02 0a 01 03 02 01 00 02 01 =ROOT........... 0030: 00 01 01 00 a0 7f a3 18 04 0b 6f 62 6a 65 63 74 ..........object 0040: 43 6c 61 73 73 04 09 64 4e 53 44 6f 6d 61 69 6e Class..dNSDomain 0050: a4 21 04 10 61 73 73 6f 63 69 61 74 65 64 44 6f .!..associatedDo 0060: 6d 61 69 6e 30 0d 82 0b 63 6f 72 73 61 72 69 6f main0...corsario 0070: 2e 70 6c a3 13 04 0a 63 75 73 74 6f 6d 65 72 49 .pl....customerI 0080: 44 04 05 31 30 31 32 35 87 09 53 4f 41 52 65 63 D..10125..SOARec 0090: 6f 72 64 87 08 4e 53 52 65 63 6f 72 64 a3 16 04 ord..NSRecord... 00a0: 0e 74 6f 70 4c 65 76 65 6c 44 6f 6d 61 69 6e 04 .topLevelDomain. 00b0: 04 54 52 55 45 30 00 .TRUE0. ber_get_next ldap_read: want=8 error=Resource temporarily unavailable daemon: activity on 1 descriptor daemon: activity on: daemon: epoll: listen=7 active_threads=0 tvp=zero conn=0 op=1 do_search ber_scanf fmt ({miiiib) ber: ber_dump: buf=0x8273e80 ptr=0x8273e83 end=0x8273f37 len=180 0000: 63 81 b1 04 1d 64 63 3d 64 6e 73 2c 64 63 3d 6e c....dc=dns,dc=n 0010: 61 6d 65 73 65 72 76 65 72 73 2c 64 63 3d 52 4f ameservers,dc=RO 0020: 4f 54 0a 01 02 0a 01 03 02 01 00 02 01 00 01 01 OT.............. 0030: 00 a0 7f a3 18 04 0b 6f 62 6a 65 63 74 43 6c 61 .......objectCla 0040: 73 73 04 09 64 4e 53 44 6f 6d 61 69 6e a4 21 04 ss..dNSDomain.!. 0050: 10 61 73 73 6f 63 69 61 74 65 64 44 6f 6d 61 69 .associatedDomai 0060: 6e 30 0d 82 0b 63 6f 72 73 61 72 69 6f 2e 70 6c n0...fakedomain.com 0070: a3 13 04 0a 63 75 73 74 6f 6d 65 72 49 44 04 05 ....customerID.. 0080: 31 30 31 32 35 87 09 53 4f 41 52 65 63 6f 72 64 10125..SOARecord 0090: 87 08 4e 53 52 65 63 6f 72 64 a3 16 04 0e 74 6f ..NSRecord....to 00a0: 70 4c 65 76 65 6c 44 6f 6d 61 69 6e 04 04 54 52 pLevelDomain..TR 00b0: 55 45 30 00 UE0.
dnPrettyNormal: <dc=dns,dc=nameservers,dc=ROOT>
=> ldap_bv2dn(dc=dns,dc=nameservers,dc=ROOT,0) <= ldap_bv2dn(dc=dns,dc=nameservers,dc=ROOT)=0 => ldap_dn2bv(272) <= ldap_dn2bv(dc=dns,dc=nameservers,dc=ROOT)=0 => ldap_dn2bv(272) <= ldap_dn2bv(dc=dns,dc=nameservers,dc=root)=0 <<< dnPrettyNormal: <dc=dns,dc=nameservers,dc=ROOT>, <dc=dns,dc=nameservers,dc=root> SRCH "dc=dns,dc=nameservers,dc=ROOT" 2 3 0 0 0 begin get_filter AND begin get_filter_list begin get_filter EQUALITY ber_scanf fmt ({mm}) ber: ber_dump: buf=0x8273e80 ptr=0x8273eb6 end=0x8273f37 len=129 0000: a3 18 04 0b 6f 62 6a 65 63 74 43 6c 61 73 73 04 ....objectClass. 0010: 09 64 4e 53 44 6f 6d 61 69 6e a4 21 04 10 61 73 .dNSDomain.!..as 0020: 73 6f 63 69 61 74 65 64 44 6f 6d 61 69 6e 30 0d sociatedDomain0. 0030: 82 0b 63 6f 72 73 61 72 69 6f 2e 70 6c a3 13 04 ..fakedomain.com... 0040: 0a 63 75 73 74 6f 6d 65 72 49 44 04 05 31 30 31 .customerID..101 0050: 32 35 87 09 53 4f 41 52 65 63 6f 72 64 87 08 4e 25..SOARecord..N 0060: 53 52 65 63 6f 72 64 a3 16 04 0e 74 6f 70 4c 65 SRecord....topLe 0070: 76 65 6c 44 6f 6d 61 69 6e 04 04 54 52 55 45 30 velDomain..TRUE0 0080: 00 . end get_filter 0 begin get_filter SUBSTRINGS begin get_ssa ber_scanf fmt ({m) ber: ber_dump: buf=0x8273e80 ptr=0x8273ed0 end=0x8273f37 len=103 0000: 00 21 04 10 61 73 73 6f 63 69 61 74 65 64 44 6f .!..associatedDo 0010: 6d 61 69 6e 30 0d 82 0b 63 6f 72 73 61 72 69 6f main0...corsario 0020: 2e 70 6c a3 13 04 0a 63 75 73 74 6f 6d 65 72 49 .pl....customerI 0030: 44 04 05 31 30 31 32 35 87 09 53 4f 41 52 65 63 D..10125..SOARec 0040: 6f 72 64 87 08 4e 53 52 65 63 6f 72 64 a3 16 04 ord..NSRecord... 0050: 0e 74 6f 70 4c 65 76 65 6c 44 6f 6d 61 69 6e 04 .topLevelDomain. 0060: 04 54 52 55 45 30 00 .TRUE0. ber_scanf fmt (m) ber: ber_dump: buf=0x8273e80 ptr=0x8273ee6 end=0x8273f37 len=81 0000: 82 0b 63 6f 72 73 61 72 69 6f 2e 70 6c a3 13 04 ..fakedomain.com... 0010: 0a 63 75 73 74 6f 6d 65 72 49 44 04 05 31 30 31 .customerID..101 0020: 32 35 87 09 53 4f 41 52 65 63 6f 72 64 87 08 4e 25..SOARecord..N 0030: 53 52 65 63 6f 72 64 a3 16 04 0e 74 6f 70 4c 65 SRecord....topLe 0040: 76 65 6c 44 6f 6d 61 69 6e 04 04 54 52 55 45 30 velDomain..TRUE0 0050: 00 . FINAL end get_ssa end get_filter 0 begin get_filter EQUALITY ber_scanf fmt ({mm}) ber: ber_dump: buf=0x8273e80 ptr=0x8273ef3 end=0x8273f37 len=68 0000: 00 13 04 0a 63 75 73 74 6f 6d 65 72 49 44 04 05 ....customerID.. 0010: 31 30 31 32 35 87 09 53 4f 41 52 65 63 6f 72 64 10125..SOARecord 0020: 87 08 4e 53 52 65 63 6f 72 64 a3 16 04 0e 74 6f ..NSRecord....to 0030: 70 4c 65 76 65 6c 44 6f 6d 61 69 6e 04 04 54 52 pLevelDomain..TR 0040: 55 45 30 00 UE0. end get_filter 0 begin get_filter PRESENT ber_scanf fmt (m) ber: ber_dump: buf=0x8273e80 ptr=0x8273f08 end=0x8273f37 len=47 0000: 00 09 53 4f 41 52 65 63 6f 72 64 87 08 4e 53 52 ..SOARecord..NSR 0010: 65 63 6f 72 64 a3 16 04 0e 74 6f 70 4c 65 76 65 ecord....topLeve 0020: 6c 44 6f 6d 61 69 6e 04 04 54 52 55 45 30 00 lDomain..TRUE0. end get_filter 0 begin get_filter PRESENT ber_scanf fmt (m) ber: ber_dump: buf=0x8273e80 ptr=0x8273f13 end=0x8273f37 len=36 0000: 00 08 4e 53 52 65 63 6f 72 64 a3 16 04 0e 74 6f ..NSRecord....to 0010: 70 4c 65 76 65 6c 44 6f 6d 61 69 6e 04 04 54 52 pLevelDomain..TR 0020: 55 45 30 00 UE0. end get_filter 0 begin get_filter EQUALITY ber_scanf fmt ({mm}) ber: ber_dump: buf=0x8273e80 ptr=0x8273f1d end=0x8273f37 len=26 0000: 00 16 04 0e 74 6f 70 4c 65 76 65 6c 44 6f 6d 61 ....topLevelDoma 0010: 69 6e 04 04 54 52 55 45 30 00 in..TRUE0. end get_filter 0 end get_filter_list end get_filter 0 filter: (&(objectClass=dNSDomain)(associatedDomain=*fakedomain.com)(customerID=10125)(sOARecord=*)(nSRecord=*)(topLevelDomain=TRUE)) ber_scanf fmt ({M}}) ber: ber_dump: buf=0x8273e80 ptr=0x8273f35 end=0x8273f37 len=2 0000: 00 00 .. attrs: conn=0 op=1 SRCH base="dc=dns,dc=nameservers,dc=ROOT" scope=2 deref=3 filter="(&(objectClass=dNSDomain)(associatedDomain=*fakedomain.com)(customerID=10125)(sOARecord=*)(nSRecord=*)(topLevelDomain=TRUE))" => bdb_search bdb_dn2entry("dc=dns,dc=nameservers,dc=root") => bdb_dn2id("dc=nameservers,dc=root") <= bdb_dn2id: got id=0x4 => bdb_dn2id("dc=dns,dc=nameservers,dc=root") <= bdb_dn2id: got id=0x5 entry_decode: "dc=dns,dc=nameservers,dc=ROOT" <= entry_decode(dc=dns,dc=nameservers,dc=ROOT) => access_allowed: search access to "dc=dns,dc=nameservers,dc=ROOT" "entry" requested <= root access granted => access_allowed: search access granted by manage(=mwrscxd) search_candidates: base="dc=dns,dc=nameservers,dc=root" (0x00000005) scope=2 => bdb_filter_candidates EQUALITY => bdb_equality_candidates (objectClass) => key_read bdb_idl_fetch_key: [01872a84] <= bdb_index_read: failed (-30990) <= bdb_equality_candidates: id=0, first=0, last=0 <= bdb_filter_candidates: id=0 first=0 last=0 => bdb_dn2idl("dc=dns,dc=nameservers,dc=root") bdb_idl_fetch_key: @dc=dns,dc=nameservers,dc=root <= bdb_dn2idl: id=4010 first=5 last=13487 => bdb_filter_candidates AND => bdb_list_candidates 0xa0 => bdb_filter_candidates OR => bdb_list_candidates 0xa1 => bdb_filter_candidates EQUALITY => bdb_equality_candidates (objectClass) => key_read bdb_idl_fetch_key: [b49dA1940] <= bdb_index_read: failed (-30990) <= bdb_equality_candidates: id=0, first=0, last=0 <= bdb_filter_candidates: id=0 first=0 last=0 => bdb_filter_candidates AND => bdb_list_candidates 0xa0 => bdb_filter_candidates EQUALITY => bdb_equality_candidates (objectClass) => key_read bdb_idl_fetch_key: [a45a345e] <= bdb_index_read 4049 candidates <= bdb_equality_candidates: id=4049, first=6, last=13487 <= bdb_filter_candidates: id=4049 first=6 last=13487 => bdb_filter_candidates SUBSTRINGS => bdb_substring_candidates (associatedDomain) => key_read bdb_idl_fetch_key: [612e9033] <= bdb_index_read 1127 candidates => key_read bdb_idl_fetch_key: [0ba8920a] <= bdb_index_read 46 candidates => key_read bdb_idl_fetch_key: [003a7d56] <= bdb_index_read 63 candidates => key_read bdb_idl_fetch_key: [d9fbeb39] <= bdb_index_read 63 candidates => key_read bdb_idl_fetch_key: [5eaf4814] <= bdb_index_read 29 candidates <= bdb_substring_candidates: 29, first=5287, last=12929 <= bdb_filter_candidates: id=29 first=5287 last=12929 => bdb_filter_candidates EQUALITY => bdb_equality_candidates (customerID) => key_read bdb_idl_fetch_key: [8000278d] <= bdb_index_read 125 candidates => key_read bdb_idl_fetch_key: [0ba8920a] <= bdb_index_read: failed (-30990) Segmentation fault
=============================================== =================================================
Hello, I used gdb with "backtrace" command, and here's the output. glibc version is 2.7, and the kernel is 2.6.18 with bigmem.
Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0xaa5c1b90 (LWP 17164)] 0xb7bde42c in free () from /usr/lib/i486-linux-gnu/i686/cmov/libc.so.6 (gdb) backtrace #0 0xb7bde42c in free () from /usr/lib/i486-linux-gnu/i686/cmov/libc.so.6 #1 0xb7f261ea in ber_memfree_x (p=0x0, ctx=0x0) at /home/pwadas/SRC/SLAPD/openldap-2.4.9/libraries/liblber/memory.c:152 #2 0xb7f261dc in ber_memfree_x (p=0x0, ctx=0x0) at /home/pwadas/SRC/SLAPD/openldap-2.4.9/libraries/liblber/memory.c:159 #3 0xb7f26275 in ber_bvarray_free_x (a=0xaa0c0354, ctx=0x8261d40) at /home/pwadas/SRC/SLAPD/openldap-2.4.9/libraries/liblber/memory.c:731 #4 0xb73988a5 in bdb_filter_candidates (op=0x8273450, locker=7, f=0xaa0c025c, ids=0xa9a3f008, tmp=0xa98bf008, stack=0xa9abf008) at /home/pwadas/SRC/SLAPD/openldap-2.4.9/servers/slapd/back-bdb/filterindex.c:803 #5 0xb7399024 in list_candidates (op=0x8273450, locker=7, flist=0xaa0c01ec, ftype=160, ids=0xa99bf008, tmp=0xa98bf008, save=0xa9a3f008) at /home/pwadas/SRC/SLAPD/openldap-2.4.9/servers/slapd/back-bdb/filterindex.c:581 #6 0xb7397787 in bdb_filter_candidates (op=0x8273450, locker=7, f=0xaa0c02bc, ids=0xa99bf008, tmp=0xa98bf008, stack=0xa9a3f008) at /home/pwadas/SRC/SLAPD/openldap-2.4.9/servers/slapd/back-bdb/filterindex.c:198 #7 0xb7399024 in list_candidates (op=0x8273450, locker=7, flist=0xaa5c0038, ftype=161, ids=0xa993f008, tmp=0xa98bf008, save=0xa99bf008) at /home/pwadas/SRC/SLAPD/openldap-2.4.9/servers/slapd/back-bdb/filterindex.c:581 #8 0xb739758a in bdb_filter_candidates (op=0x8273450, locker=7, f=0xaa5c002c, ids=0xa993f008, tmp=0xa98bf008, stack=0xa99bf008) at /home/pwadas/SRC/SLAPD/openldap-2.4.9/servers/slapd/back-bdb/filterindex.c:204 #9 0xb7399024 in list_candidates (op=0x8273450, locker=7, flist=0xaa5c0020, ftype=160, ids=0xaa4fff8c, tmp=0xa98bf008, save=0xa993f008) at /home/pwadas/SRC/SLAPD/openldap-2.4.9/servers/slapd/back-bdb/filterindex.c:581 #10 0xb7397787 in bdb_filter_candidates (op=0x8273450, locker=7, f=0xaa5c0044, ids=0xaa4fff8c, tmp=0xa98bf008, stack=0xa993f008) at /home/pwadas/SRC/SLAPD/openldap-2.4.9/servers/slapd/back-bdb/filterindex.c:198 #11 0xb7392808 in bdb_search (op=0x8273450, rs=0xaa5c1168) at /home/pwadas/SRC/SLAPD/openldap-2.4.9/servers/slapd/back-bdb/search.c:1109 #12 0x08077f43 in fe_op_search (op=0x8273450, rs=0xaa5c1168) at /home/pwadas/SRC/SLAPD/openldap-2.4.9/servers/slapd/search.c:366 #13 0x0807876c in do_search (op=0x8273450, rs=0xaa5c1168) at /home/pwadas/SRC/SLAPD/openldap-2.4.9/servers/slapd/search.c:217 #14 0x08075a0f in connection_operation (ctx=0xaa5c1248, arg_v=0x8273450) at /home/pwadas/SRC/SLAPD/openldap-2.4.9/servers/slapd/connection.c:1084 #15 0x08076106 in connection_read_thread (ctx=0xaa5c1248, argv=0x10) at /home/pwadas/SRC/SLAPD/openldap-2.4.9/servers/slapd/connection.c:1211 #16 0xb7f37dd4 in ldap_int_thread_pool_wrapper (xpool=0x81af9b8) at /home/pwadas/SRC/SLAPD/openldap-2.4.9/libraries/libldap_r/tpool.c:663 #17 0xb7cc24fb in start_thread () from /usr/lib/i486-linux-gnu/i686/cmov/libpthread.so.0 #18 0xb7c45e8e in clone () from /usr/lib/i486-linux-gnu/i686/cmov/libc.so.6
--On Tuesday, May 27, 2008 3:26 PM +0200 Piotr Wadas pwadas@jewish.org.pl wrote:
Hello, I build openldap 2.4.7 a few weeks ago, and 2.4.9 yesterday, with 2.4.7 and 2.4.9, without any my patches, just a clean build. After adding my custom schema, uploading my data from production version, and indexing, I still have it crash with some specific search - I was hoping 2.4.9 have this resolved, seems not, so posting this.
Build with debugging symbols, gdb it, and supply the backtrace.
--Quanah
--
Quanah Gibson-Mount Principal Software Engineer Zimbra, Inc -------------------- Zimbra :: the leader in open source messaging and collaboration
I added -ggdb and made sure symbols are not stripped during build process. Anyway backtrace still looks like the one I've already posted, do I miss something ?
Piotr Wadas writes:
I added -ggdb and made sure symbols are not stripped during build process. Anyway backtrace still looks like the one I've already posted, do I miss something ?
slapd is stripped when it is installed. I don't remember the "official" way to prevent that, but one way which seems to work is cd servers/slapd make STRIP= install
--On Thursday, May 29, 2008 11:37 AM +0200 Hallvard B Furuseth h.b.furuseth@usit.uio.no wrote:
Piotr Wadas writes:
I added -ggdb and made sure symbols are not stripped during build process. Anyway backtrace still looks like the one I've already posted, do I miss something ?
slapd is stripped when it is installed. I don't remember the "official" way to prevent that, but one way which seems to work is cd servers/slapd make STRIP= install
Just to be clear, I use
make install STRIP=""
;)
--Quanah
--
Quanah Gibson-Mount Principal Software Engineer Zimbra, Inc -------------------- Zimbra :: the leader in open source messaging and collaboration
Hello, Regarding http://www.openldap.org/its/index.cgi?findid=5541
Link to indexes file and full schema, including custom schema is mailed to Howard Chu, as I'd like to avoid spreading it. It says there's no variable "ava" nor "mr", as below
I keep gdb on detached screen, so I additional variables need to be printed I have'em at hand.
------------------------------- (gdb) print *ava->aa_desc No symbol "ava" in current context. (gdb) print *mr No symbol "mr" in current context. (gdb) print ava->aa_desc No symbol "ava" in current context. (gdb) print mr No symbol "mr" in current context. (gdb) info variables ava All variables matching regular expression "ava":
Non-debugging symbols: 0xb7cc61ac __set_robust_list_avail 0xb7cc61ac __set_robust_list_avail 0xb7c8d10e not_available 0xb7f75da0 available_ciphers (gdb) info variables mr All variables matching regular expression "mr": ----------------
But I found this may be also relevant:
frame 3:
(gdb) frame 3 #3 0xb7f18235 in ber_bvarray_free_x (a=0xa976b354, ctx=0x8279658) at /home/pwadas/SRC/SLAPD/DEB249/openldap2.3-2.4.9/libraries/liblber/memory.c:731 731 ber_memfree_x(a[i].bv_val, ctx); (gdb) info args a = (BerVarray) 0xa976b354 ctx = (void *) 0x8279658 (gdb) print *a $30 = {bv_len = 4, bv_val = 0xa976b36c "\200"} (gdb) print *a->bv_val $31 = -128 '\200'
frame 4
$44 = { o_hdr = 0x82793b8, o_tag = 99, o_time = 1212212344, o_tincr = 1, o_bd = 0xa9c6af80, o_req_dn = { bv_len = 29, bv_val = 0xa976b154 "dc=dns,dc=nameservers,dc=com,dc=eu"} , o_req_ndn = { bv_len = 29, bv_val = 0xa976b1a4 "dc=dns,dc=nameservers,dc=com,dc=eu"} , o_request = { oq_add = { rs_modlist = 0x2, rs_e = 0x0} , oq_bind = { rb_method = 2, rb_cred = { bv_len = 0, bv_val = 0xffffffff < Address 0xffffffff out of bounds >} , rb_edn = { bv_len = 4294967295, bv_val = 0x0} , rb_ssf = 0, rb_mech = { bv_len = 0, bv_val = 0xa976b2bc " "} } , oq_compare = { rs_ava = 0x2} , oq_modify = { rs_mods = { rs_modlist = 0x2, rs_no_opattrs = 0 '\0'} , rs_increment = -1} , oq_modrdn = { rs_mods = { rs_modlist = 0x2, rs_no_opattrs = 0 '\0'} , rs_deleteoldrdn = -1, rs_newrdn = { bv_len = 4294967295, bv_val = 0x0} , rs_nnewrdn = { bv_len = 0, bv_val = 0x0} , rs_newSup = 0xa976b2bc, rs_nnewSup = 0x79} , oq_search = { rs_scope = 2, rs_deref = 0, rs_slimit = -1, rs_tlimit = -1, rs_limit = 0x0, rs_attrsonly = 0, rs_attrs = 0x0, rs_filter = 0xa976b2bc, rs_filterstr = { bv_len = 121, bv_val = 0xa976b2cc "(&(objectClass=dNSDomain)(associatedDomain=*fakedomain.com)(customerID=10125)(sOARecord=*)(nSRecord=*)(topLevelDomain=TRUE))"} } , oq_abandon = { rs_msgid = 2} , oq_cancel = { rs_msgid = 2} , oq_extended = { rs_reqoid = { bv_len = 2, bv_val = 0x0} , rs_flags = -1, rs_reqdata = 0xffffffff} , oq_pwdexop = { rs_extended = { rs_reqoid = { bv_len = 2, bv_val = 0x0} , rs_flags = -1, rs_reqdata = 0xffffffff} , rs_old = { bv_len = 0, bv_val = 0x0} , rs_new = { bv_len = 0, bv_val = 0xa976b2bc " "} , rs_mods = 0x79, rs_modtail = 0xa976b2cc} } , o_abandon = 0, o_cancel = 0, o_groups = 0x0, o_do_not_cache = 0 '\0', o_is_auth_check = 0 '\0', o_acl_priv = ACL_NONE, o_nocaching = 0 '\0', o_delete_glue_parent = 0 '\0', o_no_schema_check = 0 '\0', o_no_subordinate_glue = 0 '\0', o_ctrlflag = '\0' < repeats 31 times >, o_controls = 0x82794e4, o_authz = { sai_method = 128, sai_mech = { bv_len = 0, bv_val = 0x0} , sai_dn = { bv_len = 28, bv_val = 0x8279b70 "cn=Directory Manager,dc=com,dc=eu"} , sai_ndn = { bv_len = 28, bv_val = 0x8279b98 "cn=directory manager,dc=com,dc=eu"} , sai_ssf = 0, sai_transport_ssf = 0, sai_tls_ssf = 0, sai_sasl_ssf = 0} , o_ber = 0x8264b98, o_res_ber = 0x0, o_callback = 0xa9c6b07c, o_ctrls = 0x0, o_csn = { bv_len = 0, bv_val = 0x0} , o_private = 0x0, o_extra = { slh_first = 0x0} , o_next = { stqe_next = 0x0} }
Information for your ITS should be sent to the ITS address with the bug number in the subject, as the email you were sent after filing the ITS instructed, and not to openldap-software. Thanks.
--Quanah
--On May 31, 2008 8:11:46 AM +0200 Piotr Wadas pwadas@jewish.org.pl wrote:
Hello, Regarding http://www.openldap.org/its/index.cgi?findid=5541
Link to indexes file and full schema, including custom schema is mailed to Howard Chu, as I'd like to avoid spreading it. It says there's no variable "ava" nor "mr", as below
I keep gdb on detached screen, so I additional variables need to be printed I have'em at hand.
(gdb) print *ava->aa_desc No symbol "ava" in current context. (gdb) print *mr No symbol "mr" in current context. (gdb) print ava->aa_desc No symbol "ava" in current context. (gdb) print mr No symbol "mr" in current context. (gdb) info variables ava All variables matching regular expression "ava":
Non-debugging symbols: 0xb7cc61ac __set_robust_list_avail 0xb7cc61ac __set_robust_list_avail 0xb7c8d10e not_available 0xb7f75da0 available_ciphers (gdb) info variables mr All variables matching regular expression "mr":
But I found this may be also relevant:
frame 3:
(gdb) frame 3 # 3 0xb7f18235 in ber_bvarray_free_x (a=0xa976b354, ctx=0x8279658) at /home/pwadas/SRC/SLAPD/DEB249/openldap2.3-2.4.9/libraries/liblber/memory. c:731 731 ber_memfree_x(a[i].bv_val, ctx); (gdb) info args a = (BerVarray) 0xa976b354 ctx = (void *) 0x8279658 (gdb) print *a $30 = {bv_len = 4, bv_val = 0xa976b36c "\200"} (gdb) print *a->bv_val $31 = -128 '\200'
frame 4
$44 = { o_hdr = 0x82793b8, o_tag = 99, o_time = 1212212344, o_tincr = 1, o_bd = 0xa9c6af80, o_req_dn = { bv_len = 29, bv_val = 0xa976b154 "dc=dns,dc=nameservers,dc=com,dc=eu"} , o_req_ndn = { bv_len = 29, bv_val = 0xa976b1a4 "dc=dns,dc=nameservers,dc=com,dc=eu"} , o_request = { oq_add = { rs_modlist = 0x2, rs_e = 0x0} , oq_bind = { rb_method = 2, rb_cred = { bv_len = 0, bv_val = 0xffffffff < Address 0xffffffff out of bounds
} , rb_edn =
{ bv_len = 4294967295, bv_val = 0x0} , rb_ssf = 0, rb_mech = { bv_len = 0, bv_val = 0xa976b2bc " "} } , oq_compare = { rs_ava = 0x2} , oq_modify = { rs_mods = { rs_modlist = 0x2, rs_no_opattrs = 0 '\0'} , rs_increment = -1} , oq_modrdn = { rs_mods = { rs_modlist = 0x2, rs_no_opattrs = 0 '\0'} , rs_deleteoldrdn = -1, rs_newrdn = { bv_len = 4294967295, bv_val = 0x0} , rs_nnewrdn = { bv_len = 0, bv_val = 0x0} , rs_newSup = 0xa976b2bc, rs_nnewSup = 0x79} , oq_search = { rs_scope = 2, rs_deref = 0, rs_slimit = -1, rs_tlimit =
-1, rs_limit = 0x0, rs_attrsonly = 0, rs_attrs = 0x0, rs_filter = 0xa976b2bc, rs_filterstr = { bv_len = 121, bv_val = 0xa976b2cc
"(&(objectClass=dNSDomain)(associatedDomain=*fakedomain.com)(customerID=1 0125)(sOARecord=*)(nSRecord=*)(topLevelDomain=TRUE))"} } , oq_abandon = { rs_msgid = 2} , oq_cancel = { rs_msgid = 2} , oq_extended = { rs_reqoid = { bv_len = 2, bv_val = 0x0} , rs_flags = -1, rs_reqdata = 0xffffffff} , oq_pwdexop = { rs_extended = { rs_reqoid = { bv_len = 2, bv_val = 0x0} , rs_flags = -1, rs_reqdata = 0xffffffff} , rs_old = { bv_len = 0, bv_val = 0x0} , rs_new = { bv_len = 0, bv_val = 0xa976b2bc " "} , rs_mods = 0x79, rs_modtail = 0xa976b2cc} } , o_abandon = 0, o_cancel = 0, o_groups = 0x0, o_do_not_cache = 0 '\0', o_is_auth_check = 0 '\0', o_acl_priv = ACL_NONE, o_nocaching = 0 '\0', o_delete_glue_parent = 0 '\0', o_no_schema_check = 0 '\0', o_no_subordinate_glue = 0 '\0', o_ctrlflag = '\0' < repeats 31 times >, o_controls = 0x82794e4, o_authz = { sai_method = 128, sai_mech = { bv_len = 0, bv_val = 0x0} , sai_dn = { bv_len = 28, bv_val = 0x8279b70 "cn=Directory Manager,dc=com,dc=eu"} , sai_ndn = { bv_len = 28, bv_val = 0x8279b98 "cn=directory manager,dc=com,dc=eu"} , sai_ssf = 0, sai_transport_ssf = 0, sai_tls_ssf = 0, sai_sasl_ssf = 0} , o_ber = 0x8264b98, o_res_ber = 0x0, o_callback = 0xa9c6b07c, o_ctrls = 0x0, o_csn = { bv_len = 0, bv_val = 0x0} , o_private = 0x0, o_extra = { slh_first = 0x0} , o_next = { stqe_next = 0x0} }
--
Quanah Gibson-Mount Principal Software Engineer Zimbra, Inc -------------------- Zimbra :: the leader in open source messaging and collaboration
I added -ggdb to CFLAGS (-g previously), I checked Makefiles and added STRIP='' when needed here's next backtrace. similar to "moreinfo" post. I'll try to build with another berkeleydb version, and see if it helps.
Regards, PW --- root@gnp34:~# file /usr/sbin/slapd /usr/sbin/slapd: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.8, dynamically linked (uses shared libs), not stripped root@gnp34:~#
--
bdb_idl_fetch_key: [0ba8920a] <= bdb_index_read: failed (-30990)
Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0xaa526b90 (LWP 20611)] 0xb7b4342c in free () from /usr/lib/i486-linux-gnu/i686/cmov/libc.so.6 (gdb) bt #0 0xb7b4342c in free () from /usr/lib/i486-linux-gnu/i686/cmov/libc.so.6 #1 0xb7e8b1ea in ber_memfree_x (p=0x0, ctx=0x0) at /home/pwadas/SRC/SLAPD/openldap-2.4.9/libraries/liblber/memory.c:152 #2 0xb7e8b1dc in ber_memfree_x (p=0x0, ctx=0x0) at /home/pwadas/SRC/SLAPD/openldap-2.4.9/libraries/liblber/memory.c:159 #3 0xb7e8b275 in ber_bvarray_free_x (a=0xaa025354, ctx=0x8266e78) at /home/pwadas/SRC/SLAPD/openldap-2.4.9/libraries/liblber/memory.c:731 #4 0xb72fd8a5 in bdb_filter_candidates (op=0x82733c0, locker=13, f=0xaa02525c, ids=0xa99a4008, tmp=0xa9824008, stack=0xa9a24008) at /home/pwadas/SRC/SLAPD/openldap-2.4.9/servers/slapd/back-bdb/filterindex.c:803 #5 0xb72fe024 in list_candidates (op=0x82733c0, locker=13, flist=0xaa0251ec, ftype=160, ids=0xa9924008, tmp=0xa9824008, save=0xa99a4008) at /home/pwadas/SRC/SLAPD/openldap-2.4.9/servers/slapd/back-bdb/filterindex.c:581 #6 0xb72fc787 in bdb_filter_candidates (op=0x82733c0, locker=13, f=0xaa0252bc, ids=0xa9924008, tmp=0xa9824008, stack=0xa99a4008) at /home/pwadas/SRC/SLAPD/openldap-2.4.9/servers/slapd/back-bdb/filterindex.c:198 #7 0xb72fe024 in list_candidates (op=0x82733c0, locker=13, flist=0xaa525038, ftype=161, ids=0xa98a4008, tmp=0xa9824008, save=0xa9924008) at /home/pwadas/SRC/SLAPD/openldap-2.4.9/servers/slapd/back-bdb/filterindex.c:581 #8 0xb72fc58a in bdb_filter_candidates (op=0x82733c0, locker=13, f=0xaa52502c, ids=0xa98a4008, tmp=0xa9824008, stack=0xa9924008) at /home/pwadas/SRC/SLAPD/openldap-2.4.9/servers/slapd/back-bdb/filterindex.c:204 #9 0xb72fe024 in list_candidates (op=0x82733c0, locker=13, flist=0xaa525020, ftype=160, ids=0xaa464f8c, tmp=0xa9824008, save=0xa98a4008) at /home/pwadas/SRC/SLAPD/openldap-2.4.9/servers/slapd/back-bdb/filterindex.c:581 #10 0xb72fc787 in bdb_filter_candidates (op=0x82733c0, locker=13, f=0xaa525044, ids=0xaa464f8c, tmp=0xa9824008, stack=0xa98a4008) at /home/pwadas/SRC/SLAPD/openldap-2.4.9/servers/slapd/back-bdb/filterindex.c:198 #11 0xb72f7808 in bdb_search (op=0x82733c0, rs=0xaa526168) at /home/pwadas/SRC/SLAPD/openldap-2.4.9/servers/slapd/back-bdb/search.c:1109 #12 0x08077f43 in fe_op_search (op=0x82733c0, rs=0xaa526168) at /home/pwadas/SRC/SLAPD/openldap-2.4.9/servers/slapd/search.c:366 #13 0x0807876c in do_search (op=0x82733c0, rs=0xaa526168) at /home/pwadas/SRC/SLAPD/openldap-2.4.9/servers/slapd/search.c:217 #14 0x08075a0f in connection_operation (ctx=0xaa526248, arg_v=0x82733c0) at /home/pwadas/SRC/SLAPD/openldap-2.4.9/servers/slapd/connection.c:1084 #15 0x08076106 in connection_read_thread (ctx=0xaa526248, argv=0xf) at /home/pwadas/SRC/SLAPD/openldap-2.4.9/servers/slapd/connection.c:1211 #16 0xb7e9cdd4 in ldap_int_thread_pool_wrapper (xpool=0x81af9b8) at /home/pwadas/SRC/SLAPD/openldap-2.4.9/libraries/libldap_r/tpool.c:663 #17 0xb7c274fb in start_thread () from /usr/lib/i486-linux-gnu/i686/cmov/libpthread.so.0 #18 0xb7baae8e in clone () from /usr/lib/i486-linux-gnu/i686/cmov/libc.so.6
--On Thursday, May 29, 2008 7:56 PM +0200 Piotr Wadas pwadas@jewish.org.pl wrote:
I added -ggdb to CFLAGS (-g previously), I checked Makefiles and added STRIP='' when needed here's next backtrace. similar to "moreinfo" post. I'll try to build with another berkeleydb version, and see if it helps.
Please file an ITS at http://www.openldap.org/its/ and put in all the relevant information so that this issue can be tracked there. Thanks.
--Quanah
--
Quanah Gibson-Mount Principal Software Engineer Zimbra, Inc -------------------- Zimbra :: the leader in open source messaging and collaboration
openldap-software@openldap.org