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

bdb_entry_return core dump in 2.2.8 (ITS#3082)



Full_Name: Martin Evans
Version: 2.2.8
OS: Solaris 8
URL: 
Submission from: (NULL) (138.37.7.247)


A horrid intermittent segfault:

slapd -d-1 output (with sensitive info removed):

=> acl_get: [4] attr entryCSN
=> acl_mask: access to entry "uid=<userid>,ou=people,ou=unix,<basedn>", attr
"entryCSN" requested
=> acl_mask: to value by "uid=syncrepl,<basedn>", (read(=rscx))
<= check a_dn_pat: cn=manager,ou=unix,<basedn>
<= check a_dn_pat: *
<= acl_mask: [2] applying read(=rscx) (stop)
<= acl_mask: [2] mask: read(=rscx)
=> access_allowed: search access granted by read(=rscx)
<= test_filter 6
=> test_filter
    PRESENT
=> access_allowed: search access to "uid=<userid>,ou=people,ou=unix,<basedn>"
"objectClass" requested
=> acl_get: [1] attr objectClass
=> acl_mask: access to entry "uid=<userid>,ou=people,ou=unix,<basedn>", attr
"objectClass" requested
=> acl_mask: to all values by "uid=syncrepl,<basedn>", (=n)
<= check a_peername_path: ^IP=127.0.0.1
=> string_expand: pattern:  ^IP=127.0.0.1
=> string_expand: expanded: ^IP=127.0.0.1
=> regex_matches: string:        IP=XXXXXXXXX:35259
=> regex_matches: rc: 1 no matches
<= check a_peername_path: ^IP=XXXXXXXXX
=> string_expand: pattern:  ^IP=XXXXXXXXX
=> string_expand: expanded: ^IP=XXXXXXXXX
=> regex_matches: string:        IP=XXXXXXXXX:35259
=> regex_matches: rc: 0 matches
<= acl_mask: [2] applying read(=rscx) (break)
<= acl_mask: [2] mask: read(=rscx)
=> dn: [3] ou=people,ou=unix,<basedn>
=> dn: [4] ou=people,ou=unix,<basedn>
=> acl_get: [4] matched
=> acl_get: [4] attr objectClass
=> acl_mask: access to entry "uid=<userid>,ou=people,ou=unix,<basedn>", attr
"objectClass" requested
=> acl_mask: to all values by "uid=syncrepl,<basedn>", (read(=rscx))
<= check a_dn_pat: cn=manager,ou=unix,<basedn>
<= check a_dn_pat: *
<= acl_mask: [2] applying read(=rscx) (stop)
<= acl_mask: [2] mask: read(=rscx)
=> access_allowed: search access granted by read(=rscx)
<= test_filter 6
<= test_filter_and 6
<= test_filter 6
sl_malloc of 24 bytes failed, using ch_malloc
entry_decode: "uid=<userid2>,ou=people,ou=unix,<basedn>"
<= entry_decode(uid=<userid2>,ou=people,ou=unix,<basedn>)
=> bdb_dn2id( "uid=<userid2>,ou=people,ou=unix,<basedn>" )
sl_malloc of 56 bytes failed, using ch_malloc
<= bdb_dn2id: got id=0x0000157f
=> test_filter
    AND
=> test_filter_and
=> test_filter
    NOT
=> test_filter
    EQUALITY
=> access_allowed: search access to "uid=<userid2>,ou=people,ou=unix,<basedn>"
"entryCSN" requested
=> acl_get: [1] attr entryCSN
=> acl_mask: access to entry "uid=<userid2>,ou=people,ou=unix,<basedn>", attr
"entryCSN" requested
=> acl_mask: to value by "uid=syncrepl,<basedn>", (=n)
<= check a_peername_path: ^IP=127.0.0.1
=> string_expand: pattern:  ^IP=127.0.0.1
=> string_expand: expanded: ^IP=127.0.0.1
=> regex_matches: string:        IP=XXXXXXXXX:35259
=> regex_matches: rc: 1 no matches
<= check a_peername_path: ^IP=XXXXXXXXX
=> string_expand: pattern:  ^IP=XXXXXXXXX
=> string_expand: expanded: ^IP=XXXXXXXXX
=> regex_matches: string:        IP=XXXXXXXXX:35259
=> regex_matches: rc: 0 matches
<= acl_mask: [2] applying read(=rscx) (break)
<= acl_mask: [2] mask: read(=rscx)
=> dn: [3] ou=people,ou=unix,<basedn>
=> dn: [4] ou=people,ou=unix,<basedn>
=> acl_get: [4] matched
=> acl_get: [4] attr entryCSN
=> acl_mask: access to entry "uid=<userid2>,ou=people,ou=unix,<basedn>", attr
"entryCSN" requested
=> acl_mask: to value by "uid=syncrepl,<basedn>", (read(=rscx))
<= check a_dn_pat: cn=manager,ou=unix,<basedn>
<= check a_dn_pat: *
<= acl_mask: [2] applying read(=rscx) (stop)
<= acl_mask: [2] mask: read(=rscx)
=> access_allowed: search access granted by read(=rscx)
<= test_filter 5
<= test_filter 6
=> test_filter
    AND
=> test_filter_and
=> test_filter
=> access_allowed: search access to "uid=<userid2>,ou=people,ou=unix,<basedn>"
"entryCSN" requested
=> acl_get: [1] attr entryCSN
=> acl_mask: access to entry "uid=<userid2>,ou=people,ou=unix,<basedn>", attr
"entryCSN" requested
=> acl_mask: to value by "uid=syncrepl,<basedn>", (=n)
<= check a_peername_path: ^IP=127.0.0.1
=> string_expand: pattern:  ^IP=127.0.0.1
=> string_expand: expanded: ^IP=127.0.0.1
=> regex_matches: string:        IP=XXXXXXXXX:35259
=> regex_matches: rc: 1 no matches
<= check a_peername_path: ^IP=XXXXXXXXX
=> string_expand: pattern:  ^IP=XXXXXXXXX
=> string_expand: expanded: ^IP=XXXXXXXXX
=> regex_matches: string:        IP=XXXXXXXXX:35259
=> regex_matches: rc: 0 matches
<= acl_mask: [2] applying read(=rscx) (break)
<= acl_mask: [2] mask: read(=rscx)
=> dn: [3] ou=people,ou=unix,<basedn>
=> dn: [4] ou=people,ou=unix,<basedn>
=> acl_get: [4] matched
=> acl_get: [4] attr entryCSN
=> acl_mask: access to entry "uid=<userid2>,ou=people,ou=unix,<basedn>", attr
"entryCSN" requested
=> acl_mask: to value by "uid=syncrepl,<basedn>", (read(=rscx))
<= check a_dn_pat: cn=manager,ou=unix,<basedn>
<= check a_dn_pat: *
<= acl_mask: [2] applying read(=rscx) (stop)
<= acl_mask: [2] mask: read(=rscx)
=> access_allowed: search access granted by read(=rscx)
<= test_filter 5
<= test_filter_and 5
<= test_filter 5
<= test_filter_and 5
<= test_filter 5
=> test_filter
    AND
=> test_filter_and
=> test_filter
=> access_allowed: search access to "uid=<userid2>,ou=people,ou=unix,<basedn>"
"entryCSN" requested
=> acl_get: [1] attr entryCSN
=> acl_mask: access to entry "uid=<userid2>,ou=people,ou=unix,<basedn>", attr
"entryCSN" requested
=> acl_mask: to value by "uid=syncrepl,<basedn>", (=n)
<= check a_peername_path: ^IP=127.0.0.1
=> string_expand: pattern:  ^IP=127.0.0.1
=> string_expand: expanded: ^IP=127.0.0.1
=> regex_matches: string:        IP=XXXXXXXXX:35259
=> regex_matches: rc: 1 no matches
<= check a_peername_path: ^IP=XXXXXXXXX
=> string_expand: pattern:  ^IP=XXXXXXXXX
=> string_expand: expanded: ^IP=XXXXXXXXX
=> regex_matches: string:        IP=XXXXXXXXX:35259
=> regex_matches: rc: 0 matches
<= acl_mask: [2] applying read(=rscx) (break)
<= acl_mask: [2] mask: read(=rscx)
=> dn: [3] ou=people,ou=unix,<basedn>
=> dn: [4] ou=people,ou=unix,<basedn>
=> acl_get: [4] matched
=> acl_get: [4] attr entryCSN
=> acl_mask: access to entry "uid=<userid2>,ou=people,ou=unix,<basedn>", attr
"entryCSN" requested
=> acl_mask: to value by "uid=syncrepl,<basedn>", (read(=rscx))
<= check a_dn_pat: cn=manager,ou=unix,<basedn>
<= check a_dn_pat: *
<= acl_mask: [2] applying read(=rscx) (stop)
<= acl_mask: [2] mask: read(=rscx)
=> access_allowed: search access granted by read(=rscx)
<= test_filter 6
=> test_filter
    PRESENT
=> access_allowed: search access to "uid=<userid2>,ou=people,ou=unix,<basedn>"
"objectClass" requested
=> acl_get: [1] attr objectClass
=> acl_mask: access to entry "uid=<userid2>,ou=people,ou=unix,<basedn>", attr
"objectClass" requested
=> acl_mask: to all values by "uid=syncrepl,<basedn>", (=n)
<= check a_peername_path: ^IP=127.0.0.1
=> string_expand: pattern:  ^IP=127.0.0.1
=> string_expand: expanded: ^IP=127.0.0.1
=> regex_matches: string:        IP=XXXXXXXXX:35259
=> regex_matches: rc: 1 no matches
<= check a_peername_path: ^IP=XXXXXXXXX
=> string_expand: pattern:  ^IP=XXXXXXXXX
=> string_expand: expanded: ^IP=XXXXXXXXX
=> regex_matches: string:        IP=XXXXXXXXX:35259
=> regex_matches: rc: 0 matches
<= acl_mask: [2] applying read(=rscx) (break)
<= acl_mask: [2] mask: read(=rscx)
=> dn: [3] ou=people,ou=unix,<basedn>
=> dn: [4] ou=people,ou=unix,<basedn>
=> acl_get: [4] matched
=> acl_get: [4] attr objectClass
=> acl_mask: access to entry "uid=<userid2>,ou=people,ou=unix,<basedn>", attr
"objectClass" requested
=> acl_mask: to all values by "uid=syncrepl,<basedn>", (read(=rscx))
<= check a_dn_pat: cn=manager,ou=unix,<basedn>
<= check a_dn_pat: *
<= acl_mask: [2] applying read(=rscx) (stop)
<= acl_mask: [2] mask: read(=rscx)
=> access_allowed: search access granted by read(=rscx)
<= test_filter 6
<= test_filter_and 6
<= test_filter 6
sl_malloc of 24 bytes failed, using ch_malloc
entry_decode: "uid=<userid3>,ou=people,ou=unix,<basedn>"
<= entry_decode(uid=<userid3>,ou=people,ou=unix,<basedn>)
=> bdb_dn2id( "uid=<userid3>,ou=people,ou=unix,<basedn>" )
sl_malloc of 56 bytes failed, using ch_malloc
<= bdb_dn2id: got id=0x00001580
Segmentation Fault - core dumped


A gdb stacktrace of the dump file shows this:

(gdb) bt
#0  0xfefc2b94 in _free_unlocked () from /usr/lib/libc.so.1
#1  0xfefc2b4c in free () from /usr/lib/libc.so.1
#2  0x8ab14 in bdb_entry_return ()
#3  0x842cc in bdb_cache_find_ndn ()
#4  0x84564 in bdb_cache_find_id ()
#5  0x7b5ac in bdb_do_search ()
#6  0x375e4 in do_search ()
#7  0x35bd0 in connection_done ()
#8  0x9a890 in ldap_pvt_thread_pool_destroy ()


Core dumps happen in a syncrepl provider (bdb backend) when several hundred
entries are being added via ldap. The core dumps do not happen on the same entry
or any other obvious cause. Apart from adding many entries, I've not found any
other way of reproducing it.

Kind regards,
Martin.