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

Re: (ITS#3684) ldapadd and ldapsearch cause slapd segfault



This is from a non-cflags=-g build, from the build tree.


Hope this helps,


slapd startup: initiated.
backend_startup_one: starting "cn=config"
backend_startup_one: starting ""
bdb_db_open:
bdb_db_open: dbenv_open(/drbd/opt23/var/openldap-data)
unique_open: overlay initialized
=> bdb_entry_get: ndn: ""
=> bdb_entry_get: oc: "(null)", at: "contextCSN"
bdb_dn2entry("")
entry_decode: ""
<= entry_decode()
=> bdb_entry_get: found entry: ""
bdb_entry_get: rc=0
=> bdb_search
=> access_allowed: search access to "" "entry" requested
<= root access granted
=> access_allowed: search access granted by write(=mwrscxd)
search_candidates: base="" (0x00000000) scope=2
=> bdb_dn2idl("")
=> bdb_filter_candidates
         AND
=> bdb_list_candidates 0xa0
=> bdb_filter_candidates
         GE
=> bdb_inequality_candidates (entryCSN)
=> key_read
bdb_idl_fetch_key:
<= bdb_index_read 1 candidates
=> key_read
bdb_idl_fetch_key:
<= bdb_index_read: failed (-30990)
<= bdb_inequality_candidates: id=1, first=426955, last=426955
<= bdb_filter_candidates: id=1 first=426955 last=426955
<= bdb_list_candidates: id=1 first=426955 last=426955
<= bdb_filter_candidates: id=1 first=426955 last=426955
bdb_search_candidates: id=1 first=426955 last=426955
entry_decode: "dc=net"
<= entry_decode(dc=net)
=> bdb_dn2id("dc=net")
<= bdb_dn2id: got id=0x000683cb
=> test_filter
     GE
=> access_allowed: search access to "dc=net" "entryCSN" requested
<= root access granted
=> access_allowed: search access granted by write(=mwrscxd)
<= test_filter 6
send_ldap_result: conn=-1 op=0 p=0
send_ldap_result: err=0 matched="" text=""
slapd starting
[New Thread 1082132832 (LWP 6848)]
daemon: added 8r
daemon: added 10r
daemon: added 11r
daemon: select: listen=10 active_threads=0 tvp=NULL
daemon: select: listen=11 active_threads=0 tvp=NULL
daemon: activity on 1 descriptors
daemon: new connection on 16
ldap_pvt_gethostbyname_a: host=ldap-pnb.sal.x-isp.net, r=0
conn=0 fd=16 ACCEPT from IP=127.0.0.1:56725 (IP=0.0.0.0:389)
daemon: added 16r
daemon: select: listen=10 active_threads=0 tvp=NULL
daemon: select: listen=11 active_threads=0 tvp=NULL
daemon: activity on 1 descriptors
daemon: activity on: 16r
daemon: read activity on 16
connection_get(16)
connection_get(16): got connid=0
connection_read(16): checking for input on id=0
ber_get_next
ldap_read: want=8, got=8
   0000:  30 16 02 01 01 60 11 02                            0....`..
ldap_read: want=16, got=16
   0000:  01 03 04 07 63 6e 3d 72  6f 6f 74 80 03 66 6f 6f   
....cn=root..foo
ber_get_next: tag 0x30 len 22 contents:
ber_dump: buf=0x00776db0 ptr=0x00776db0 end=0x00776dc6 len=22
   0000:  02 01 01 60 11 02 01 03  04 07 63 6e 3d 72 6f 6f   
...`......cn=roo
   0010:  74 80 03 66 6f 6f                                  t..foo
[New Thread 1090525536 (LWP 6850)]
ber_get_next
ldap_read: want=8 error=Resource temporarily unavailable
ber_get_next on fd 16 failed errno=11 (Resource temporarily unavailable)
daemon: select: listen=10 active_threads=0 tvp=NULL
daemon: select: listen=11 active_threads=0 tvp=NULL
do_bind
ber_scanf fmt ({imt) ber:
ber_dump: buf=0x00776db0 ptr=0x00776db3 end=0x00776dc6 len=19
   0000:  60 11 02 01 03 04 07 63  6e 3d 72 6f 6f 74 80 03   
`......cn=root..
   0010:  66 6f 6f                                           foo
ber_scanf fmt (m}) ber:
ber_dump: buf=0x00776db0 ptr=0x00776dc1 end=0x00776dc6 len=5
   0000:  00 03 66 6f 6f                                     ..foo
 >>> dnPrettyNormal: <cn=root>
=> ldap_bv2dn(cn=root,0)
ldap_err2string
<= ldap_bv2dn(cn=root)=0 Success
=> ldap_dn2bv(272)
ldap_err2string
<= ldap_dn2bv(cn=root)=0 Success
=> ldap_dn2bv(272)
ldap_err2string
<= ldap_dn2bv(cn=root)=0 Success
<<< dnPrettyNormal: <cn=root>, <cn=root>
do_bind: version=3 dn="cn=root" method=128
conn=0 op=0 BIND dn="cn=root" method=128
==> bdb_bind: dn: cn=root
bdb_dn2entry("cn=root")
=> bdb_dn2id("cn=root")
<= bdb_dn2id: get failed: DB_NOTFOUND: No matching key/data pair found 
(-30990)

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1090525536 (LWP 6850)]
0x00002aaaaab6c966 in __lock_put_nolock (dbenv=0x771e30, 
lock=0x41000a80, runp=0x41000a00, flags=0) at 
../dist/../lock/lock.c:1144
1144            if (lock->gen != lockp->gen) {
(gdb) bt full
#0  0x00002aaaaab6c966 in __lock_put_nolock (dbenv=0x771e30, 
lock=0x41000a80, runp=0x41000a00, flags=0) at 
../dist/../lock/lock.c:1144
         lockp = (struct __db_lock *) 0x2aab00701a90
         region = (DB_LOCKREGION *) 0x2aaabf7a2f18
         lt = (DB_LOCKTAB *) 0x772440
         ret = 0
#1  0x00002aaaaab6c887 in __lock_put (dbenv=0x771e30, lock=0x41000a80) 
at ../dist/../lock/lock.c:1108
         lt = (DB_LOCKTAB *) 0x772440
         ret = 0
         run_dd = 11
#2  0x00002aaaaab6c7d9 in __lock_put_pp (dbenv=0x771e30, 
lock=0x41000a80) at ../dist/../lock/lock.c:1082
         rep_check = 0
         ret = 1090522608
#3  0x00000000004825bc in bdb_bind (op=0x778250, rs=0x41000df0) at 
bind.c:91
         bdb = (struct bdb_info *) 0x6dc540
         e = (Entry *) 0x775350
         a = (Attribute *) 0x0
         ei = (EntryInfo *) 0x6dc5b0
         password = (AttributeDescription *) 0x6b8480
         locker = 11
         lock = {off = 0, ndx = 4576126, gen = 0, mode = 1781708384}
         __PRETTY_FUNCTION__ = "bdb_bind"
#4  0x000000000045d3a4 in over_op_func (op=0x778250, rs=0x41000df0, 
which=op_bind) at backover.c:364
         oi = (slap_overinfo *) 0x6dc9d0
         on = (slap_overinst *) 0x0
         be = (BackendDB *) 0x6dc3a0
         db = {bd_info = 0x661c80,
   be_ctrls = 
"\000\001\000\000\000\001\000\000\001\000\001\001\001\000\000\001", 
'\0' <repeats 16 times>, "\001", be_flags = 256,
   be_restrictops = 0, be_requires = 0, be_ssf_set = {sss_ssf = 0, 
sss_transport = 0, sss_tls = 0, sss_sasl = 0, sss_update_ssf = 0,
     sss_update_transport = 0, sss_update_tls = 0, sss_update_sasl = 0, 
sss_simple_bind = 0}, be_suffix = 0x70eed0,
   be_nsuffix = 0x6dbcb0, be_schemadn = {bv_len = 0, bv_val = 0x0}, 
be_schemandn = {bv_len = 0, bv_val = 0x0}, be_rootdn = {bv_len = 7,
     bv_val = 0x71bd50 "cn=root"}, be_rootndn = {bv_len = 7, bv_val = 
0x71b2a0 "cn=root"}, be_rootpw = {bv_len = 6,
     bv_val = 0x70ef00 "foobar"}, be_max_deref_depth = 15, be_def_limit 
= {lms_t_soft = 3600, lms_t_hard = 0, lms_s_soft = -1,
     lms_s_hard = 0, lms_s_unchecked = -1, lms_s_pr = 0, lms_s_pr_hide = 
0, lms_s_pr_total = 0}, be_limits = 0x0, be_acl = 0x71bc70,
   be_dfltaccess = ACL_READ, be_replica = 0x0, be_replogfile = 0x0, 
be_update_ndn = {bv_len = 0, bv_val = 0x0}, be_update_refs = 0x0,
   be_pending_csn_list = 0x771e10, be_pcl_mutex = {__m_reserved = 0, 
__m_count = 0, __m_owner = 0x0, __m_kind = 0, __m_lock = {
       __status = 0, __spinlock = 0}}, be_pcl_mutexp = 0x6dc4e0, 
be_syncinfo = 0x0, be_pb = 0x0, be_cf_table = 0x6631e0,
   be_private = 0x6dc540, be_next = {stqe_next = 0x0}}
         cb = {sc_next = 0x0, sc_response = 0x45cfd0 
<over_back_response>, sc_cleanup = 0, sc_private = 0x6dc9d0}
         rc = 32768
         __PRETTY_FUNCTION__ = "over_op_func"
#5  0x000000000042e3c9 in fe_op_bind (op=0x778250, rs=0x41000df0) at 
bind.c:558
         mech = {bv_len = 6, bv_val = 0x4f57d3 "SIMPLE"}
#6  0x000000000042ddf5 in do_bind (op=0x778250, rs=0x41000df0) at 
bind.c:204
         ber = (BerElement *) 0x776fa0
         version = 3
         method = 128
         mech = {bv_len = 0, bv_val = 0x0}
         dn = {bv_len = 7, bv_val = 0x776dba "cn=root"}
         tag = 0
         be = (Backend *) 0x41000d80
#7  0x0000000000416fb8 in connection_operation (ctx=0x41000eb0, 
arg_v=0x778250) at connection.c:1044
         rc = 1090522800
         rs = {sr_type = REP_RESULT, sr_tag = 0, sr_msgid = 0, sr_err = 
-30990, sr_matched = 0x0, sr_text = 0x0, sr_ref = 0x0,
   sr_ctrls = 0x0, sr_un = {sru_sasl = {r_sasldata = 0x0}, sru_extended 
= {r_rspoid = 0x0, r_rspdata = 0x0}, sru_search = {
       r_entry = 0x0, r_attr_flags = 0, r_operational_attrs = 0x0, 
r_attrs = 0x0, r_nentries = 0, r_v2ref = 0x0}}, sr_flags = 0}
         tag = 96
         opidx = 0
         conn = (Connection *) 0x2aaac08ad690
         memctx = (void *) 0x778610
         memctx_null = (void *) 0x0
         __PRETTY_FUNCTION__ = "connection_operation"
#8  0x00000000004c87d8 in ldap_int_thread_pool_wrapper (xpool=0x771e30) 
at tpool.c:479
         pool = (struct ldap_int_thread_pool_s *) 0x6ba8a0
         ctx = (ldap_int_thread_ctx_t *) 0x777000
         ltc_key = {{ltk_key = 0x453540, ltk_data = 0x778610, ltk_free = 
0x453420 <slap_sl_mem_destroy>}, {ltk_key = 0x771e30,
     ltk_data = 0xb, ltk_free = 0x484120 <bdb_locker_id_free>}, {ltk_key 
= 0x0, ltk_data = 0x0, ltk_free = 0} <repeats 25 times>, {
     ltk_key = 0x0, ltk_data = 0x0, ltk_free = 0x2}, {ltk_key = 0x0, 
ltk_data = 0x356ae06c2a, ltk_free = 0}, {ltk_key = 0x0,
     ltk_data = 0x0, ltk_free = 0}, {ltk_key = 0x0, ltk_data = 0x0, 
ltk_free = 0}, {ltk_key = 0x0, ltk_data = 0x0, ltk_free = 0}}
         tid = 1090525536
         i = 7827456
         keyslot = 186
         hash = 1090521728
#9  0x000000356ae060aa in start_thread () from 
/lib64/tls/libpthread.so.0
No symbol table info available.
#10 0x000000356a1c53d3 in clone () from /lib64/tls/libc.so.6
No symbol table info available.
#11 0x0000000000000000 in ?? ()
No symbol table info available.
(gdb) thread apply all bt

Thread 3 (Thread 1090525536 (LWP 6850)):
#0  0x00002aaaaab6c966 in __lock_put_nolock (dbenv=0x771e30, 
lock=0x41000a80, runp=0x41000a00, flags=0) at 
../dist/../lock/lock.c:1144
#1  0x00002aaaaab6c887 in __lock_put (dbenv=0x771e30, lock=0x41000a80) 
at ../dist/../lock/lock.c:1108
#2  0x00002aaaaab6c7d9 in __lock_put_pp (dbenv=0x771e30, 
lock=0x41000a80) at ../dist/../lock/lock.c:1082
#3  0x00000000004825bc in bdb_bind (op=0x778250, rs=0x41000df0) at 
bind.c:91
#4  0x000000000045d3a4 in over_op_func (op=0x778250, rs=0x41000df0, 
which=op_bind) at backover.c:364
#5  0x000000000042e3c9 in fe_op_bind (op=0x778250, rs=0x41000df0) at 
bind.c:558
#6  0x000000000042ddf5 in do_bind (op=0x778250, rs=0x41000df0) at 
bind.c:204
#7  0x0000000000416fb8 in connection_operation (ctx=0x41000eb0, 
arg_v=0x778250) at connection.c:1044
#8  0x00000000004c87d8 in ldap_int_thread_pool_wrapper (xpool=0x771e30) 
at tpool.c:479
#9  0x000000356ae060aa in start_thread () from 
/lib64/tls/libpthread.so.0
#10 0x000000356a1c53d3 in clone () from /lib64/tls/libc.so.6
#11 0x0000000000000000 in ?? ()

Thread 2 (Thread 1082132832 (LWP 6848)):
#0  0x000000356a1be496 in __select_nocancel () from /lib64/tls/libc.so.6
#1  0x0000000000413889 in slapd_daemon_task (ptr=0x11) at daemon.c:1697
#2  0x000000356ae060aa in start_thread () from 
/lib64/tls/libpthread.so.0
#3  0x000000356a1c53d3 in clone () from /lib64/tls/libc.so.6
#4  0x0000000000000000 in ?? ()

Thread 1 (Thread 46912498335968 (LWP 6845)):
#0  0x000000356ae06f2b in pthread_join () from 
/lib64/tls/libpthread.so.0
#1  0x0000000000414c23 in slapd_daemon () at daemon.c:2048
#2  0x00000000004073d8 in main (argc=2, argv=0x7ffffffff958) at 
main.c:784
0x00002aaaaab6c966      1144            if (lock->gen != lockp->gen) {
(gdb)

-- 
Rob Fielding
Senior Developer
R&D
Business Serve