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

Assertion failed in test020-syncreplication-cascading (ITS#2684)



Full_Name: Hallvard B Furuseth
Version: HEAD
OS: Solaris
URL: 
Submission from: (NULL) (129.240.186.42)
Submitted by: hallvard


HEAD configured with
./configure  --quiet --prefix=/usit/bombur/tmp/ldap --enable-aci
 --enable-crypt --enable-hdb --enable-bdb --enable-ldbm --enable-monitor

gets an assertion failure.  At another run the test failed because
comparison of result file failed with expected result, I'm afraid I
didn't save the output from that.


To reproduce the crash:

cd tests
make test-hdb # to make directories and symlinks
^C
(while LDAPNOINIT=true nice -10 \
	./scripts/test020-syncreplication-cascading . hdb yes yes no
 do
	echo '>>>done, wait 10 seconds'; sleep 10; echo ""
 done)

...
running defines.sh
Cleaning up in ./test-db...
Resetting ./test-repl/r1...
Resetting ./test-repl/r2...
Resetting ./test-repl/p1...
Resetting ./test-repl/p2...
Resetting ./test-repl/p3...
Starting master slapd on TCP/IP port 9009...
Waiting 5 seconds to wait for master to start...
Using ldapsearch to check that master slapd is running...
Using ldapadd to create the context prefix entry in the master...
Starting R1 slave slapd on TCP/IP port 9011...
Using ldapsearch to check that R1 slave slapd is running...
Waiting 5 seconds for R1 slapd to start...
Waiting for the R1 slave to replicate...
Starting R2 slave slapd on TCP/IP port 9012...
Using ldapsearch to check that the R2 slave slapd is running...
Waiting 5 seconds for R2 slave slapd to start...
Waiting for the R2 slave to replicate...
Starting P1 slave slapd on TCP/IP port 9013...
Using ldapsearch to check that the P1 slave slapd is running...
Waiting 5 seconds for P1 slave slapd to start...
Waiting for the P1 slave to replicate...
Starting P2 slave slapd on TCP/IP port 9014...
Using ldapsearch to check that the P2 slave slapd is running...
Waiting 5 seconds for P2 slave slapd to start...
Starting P3 slave slapd on TCP/IP port 9015...
Using ldapsearch to check that the P3 slave slapd is running...
Waiting 5 seconds for P3 slave slapd to start...
Using ldapadd to populate the master directory...
23831 Abort - core dumped
ldapadd failed (81)!
./scripts/test020-syncreplication-cascading: kill: no such process

test-db/master.log ends with:

=> bdb_back_search
bdb_dn2entry("o=university of michigan,c=us")
search_candidates: base="o=university of michigan,c=us" (0x00000001) scope=2
=> bdb_dn2idl( "o=university of michigan,c=us" )
=> bdb_presence_candidates (objectClass)
bdb_search_candidates: id=-1 first=1 last=11
=> send_search_entry: dn="cn=ITD Staff,ou=Groups,o=University of Michigan,c=US"
Assertion failed: c->c_struct_state == SLAP_C_USED, file connection.c, line 708

Some variables in the core dump follow.  I have saved the core file so
it can be inspeced further:

bash$ gdb ../servers/slapd/slapd core
Core was generated by `../servers/slapd/slapd -s0 -f ./test-repl/p1/slapd.conf
-h ldap://localhost:901'.
#0  0xfeed9764 in __sigprocmask () from /usr/lib/libthread.so.1
(gdb) bt
#0  0xfeed9764 in __sigprocmask () from /usr/lib/libthread.so.1
#1  0xfeece978 in _resetsig () from /usr/lib/libthread.so.1
#2  0xfeece118 in _sigon () from /usr/lib/libthread.so.1
#3  0xfeed1158 in _thrp_kill () from /usr/lib/libthread.so.1
#4  0xfef4ba24 in raise () from /usr/lib/libc.so.1
#5  0xfef35944 in abort () from /usr/lib/libc.so.1
#6  0xfef35be8 in _assert () from /usr/lib/libc.so.1
#7  0x00035a14 in connection_state_closing (c=0x2eafd8) at connection.c:708
#8  0x0004115c in send_ldap_ber (conn=0x2eafd8, ber=0xfd741130) at result.c:137
#9  0x000431d8 in slap_send_search_entry (op=0x2d4b00, rs=0xfd8016c8)
    at result.c:1170
#10 0x0007612c in bdb_do_search (op=0xfd801878, rs=0xfd8016c8, sop=0x2d4b00, 
    ps_e=0x15154c0, ps_type=1) at search.c:1141
#11 0x00089d80 in bdb_add (op=0xfd801878, rs=0xfd8016c8) at add.c:538
#12 0x0006dce0 in syncrepl_entry (si=0x2a8400, ld=0x2d5700, op=0xfd801878, 
    e=0x15154c0, modlist=0x402ae0, syncstate=1, syncUUID=0xfd801ab0, 
    syncCookie=0xfd801aa8, refresh=1) at syncrepl.c:1016
#13 0x0006cc54 in do_syncrepl (ctx=0xfd801b80, arg=0x2b67c0) at syncrepl.c:485
#14 0x000ba3e0 in ldap_int_thread_pool_wrapper (xpool=0x23c400) at tpool.c:463
(gdb) frame 7
#7  0x00035a14 in connection_state_closing (c=0x2eafd8) at connection.c:708
708		assert( c->c_struct_state == SLAP_C_USED );
(gdb) print *c
$1 = {c_struct_state = 1, c_conn_state = 0, c_mutex = {
    __pthread_mutex_flags = {__pthread_mutex_flag1 = 4, 
      __pthread_mutex_flag2 = 0 '\0', __pthread_mutex_ceiling = 0 '\0', 
      __pthread_mutex_type = 0, __pthread_mutex_magic = 19800}, 
    __pthread_mutex_lock = {__pthread_mutex_lock64 = {
        __pthread_mutex_pad = "\0\0\0\0ÿ\0\0"}, __pthread_mutex_lock32 = {
        __pthread_ownerpid = 0, __pthread_lockword = 4278190080}, 
      __pthread_mutex_owner64 = 4278190080}, 
    __pthread_mutex_data = 4253031792}, c_sb = 0x2b6480, c_starttime = 0, 
  c_activitytime = 0, c_connid = 4294967295, c_peer_domain = {bv_len = 0, 
    bv_val = 0x0}, c_peer_name = {bv_len = 0, bv_val = 0x0}, c_listener = 0x0, 
  c_sasl_bind_in_progress = 0, c_sasl_bind_mech = {bv_len = 0, bv_val = 0x0}, 
  c_sasl_dn = {bv_len = 0, bv_val = 0x0}, c_authz_backend = 0x0, c_authz = {
    sai_method = 0, sai_mech = {bv_len = 0, bv_val = 0x0}, sai_dn = {
      bv_len = 0, bv_val = 0x0}, sai_ndn = {bv_len = 0, bv_val = 0x0}, 
    sai_ssf = 0, sai_transport_ssf = 0, sai_tls_ssf = 0, sai_sasl_ssf = 0}, 
  c_groups = 0x0, c_protocol = 0, c_ops = {stqh_first = 0x0, 
    stqh_last = 0x2eb068}, c_pending_ops = {stqh_first = 0x0, 
    stqh_last = 0x2eb070}, c_write_mutex = {__pthread_mutex_flags = {
      __pthread_mutex_flag1 = 4, __pthread_mutex_flag2 = 0 '\0', 
      __pthread_mutex_ceiling = 0 '\0', __pthread_mutex_type = 0, 
      __pthread_mutex_magic = 19800}, __pthread_mutex_lock = {
      __pthread_mutex_lock64 = {__pthread_mutex_pad = "\0\0\0\0ÿ\0\0"}, 
      __pthread_mutex_lock32 = {__pthread_ownerpid = 0, 
        __pthread_lockword = 4278190080}, 
      __pthread_mutex_owner64 = 4278190080}, 
    __pthread_mutex_data = 4253031792}, c_write_cv = {__pthread_cond_flags = {
      __pthread_cond_flag = "\0\0\0", __pthread_cond_type = 0, 
      __pthread_cond_magic = 17238}, __pthread_cond_data = 0}, 
  c_currentber = 0x0, c_writewaiter = 0, c_is_tls = 0, c_needs_tls_accept = 0, 
  c_sasl_layers = 0, c_sasl_done = 0, c_sasl_authctx = 0x0, 
  c_sasl_sockctx = 0x0, c_sasl_extra = 0x0, c_sasl_bindop = 0x0, 
  c_pagedresults_state = {ps_be = 0x0, ps_cookie = 0, ps_id = 0}, 
  c_n_ops_received = 2, c_n_ops_executing = 0, c_n_ops_pending = 0, 
  c_n_ops_completed = 2, c_n_get = 2, c_n_read = 2, c_n_write = 0, c_pb = 0x0, 
  c_extensions = 0x0, c_send_ldap_result = 0x41a88 <slap_send_ldap_result>, 
  c_send_search_entry = 0x421a4 <slap_send_search_entry>, 
  c_send_search_reference = 0x433cc <slap_send_search_reference>, 
  c_send_ldap_extended = 0x41fd4 <slap_send_ldap_extended>, 
  c_send_ldap_intermediate = 0x420c4 <slap_send_ldap_intermediate>}
(gdb) frame 8
#8  0x0004115c in send_ldap_ber (conn=0x2eafd8, ber=0xfd741130) at result.c:137
137			if ( connection_state_closing( conn ) ) {
(gdb) print bytes
$2 = 1077
(gdb) print *ber
$3 = {ber_opts = {lbo_valid = 2, lbo_options = 1, lbo_debug = 261, 
    lbo_meminuse = 0}, ber_tag = 4294967295, ber_len = 0, ber_usertag = 0, 
  ber_buf = 0xc10284 "0\202\0041\002\001\002d\202\003»\004Zcn=Bjorn
Jensen,ou=Information Technology Division,ou=People,o=University of
Michigan,c=US0\202\003[0\037\004\vobjectClass1\020\004\016OpenLDAPperson0\"\004\002cn1\034\004\fBjorn
Jensen\004\fBiiff Jensen0\016\004\002sn1\b\004\006Jensen0\016\004\003uid1"..., 
  ber_ptr = 0xc106b9 "00000000005137\004\0372003081413:05:56Z#0x0006#0#", '0'
<repeats 23 times>, "\004(cn=Manager,o=University of
Michigan,c=US0$\004\017createTimestamp1\021\004\01720030814130556Z0-\004\bentryCSN1!\004\0372003081413:05:56Z#0x0005#0#00000;\004\rmod"...,
ber_end = 0xc109dd "", ber_sos = 0x0, 
  ber_rwptr = 0x0, ber_memctx = 0xc09cf0}
(gdb) frame 9
#9  0x000431d8 in slap_send_search_entry (op=0x2d4b00, rs=0xfd8016c8)
    at result.c:1170
1170			bytes = op->o_noop ? 0 : send_ldap_ber( op->o_conn, ber );
(gdb) print *op
$4 = {o_opid = 1, o_connid = 1, o_conn = 0x2eafd8, o_bd = 0x2a8600, 
  o_msgid = 2, o_protocol = 3, o_tag = 99, o_time = 1060866346, o_req_dn = {
    bv_len = 29, bv_val = 0xc100ec "o=University of Michigan,c=US"}, 
  o_req_ndn = {bv_len = 29, 
    bv_val = 0xc1014c "o=university of michigan,c=us"}, o_request = {oq_add = {
      rs_e = 0x2}, oq_bind = {rb_method = 2, rb_cred = {bv_len = 0, 
        bv_val = 0xfffffff6 <Address 0xfffffff6 out of bounds>}, rb_edn = {
        bv_len = 4294967295, bv_val = 0x0}, rb_ssf = 12648860}, oq_compare = {
      rs_ava = 0x2}, oq_modify = {rs_modlist = 0x2}, oq_modrdn = {rs_newrdn = {
        bv_len = 2, bv_val = 0x0}, rs_nnewrdn = {bv_len = 4294967286, 
        bv_val = 0xffffffff <Address 0xffffffff out of bounds>}, 
      rs_newSup = 0x0, rs_nnewSup = 0xc1019c, rs_deleteoldrdn = 12648820}, 
    oq_search = {rs_scope = 2, rs_deref = 0, rs_slimit = -10, rs_tlimit = -1, 
      rs_attrsonly = 0, rs_attrs = 0xc1019c, rs_filter = 0xc10174, 
      rs_filterstr = {bv_len = 15, bv_val = 0xc10184 "(objectClass=*)"}}, 
    oq_abandon = {rs_msgid = 2}, oq_cancel = {rs_msgid = 2}, oq_extended = {
      rs_reqoid = {bv_len = 2, bv_val = 0x0}, rs_reqdata = 0xfffffff6}}, 
  o_tid = 0, o_abandon = 0, o_cancel = 0, o_do_not_cache = 0 '\0', 
  o_is_auth_check = 0 '\0', o_managedsait = 0 '\0', o_noop = 0 '\0', 
  o_proxy_authz = 0 '\0', o_subentries = 0 '\0', 
  o_subentries_visibility = 0 '\0', o_assert = 0 '\0', 
  o_valuesreturnfilter = 0 '\0', o_permissive_modify = 0 '\0', 
  o_domain_scope = 0 '\0', o_pagedresults = 0 '\0', o_pagedresults_size = 0, 
  o_pagedresults_state = {ps_be = 0x0, ps_cookie = 0, ps_id = 0}, 
  o_sync = 1 '\001', o_sync_mode = 3 '\003', o_sync_state = {bv_len = 0, 
    bv_val = 0x0}, o_ps_protocol = 2, o_ps_entries = 0, o_ps_link = {
    le_next = 0x0, le_prev = 0x249cd0}, o_pm_list = {lh_first = 0x0}, 
  o_authz = {sai_method = 0, sai_mech = {bv_len = 0, bv_val = 0x0}, sai_dn = {
      bv_len = 40, 
      bv_val = 0x401a00 "cn=Replica,o=University of Michigan,c=US"}, 
    sai_ndn = {bv_len = 40, 
      bv_val = 0x401c80 "cn=replica,o=university of michigan,c=us"}, 
    sai_ssf = 0, sai_transport_ssf = 0, sai_tls_ssf = 0, sai_sasl_ssf = 0}, 
  o_ber = 0x401cc0, o_callback = 0x0, o_ctrls = 0xc1024c, 
  o_threadctx = 0xfd001b80, o_tmpmemctx = 0xc09cf0, o_tmpmfuncs = 0x1bfa98, 
  o_private = 0x0, o_next = {stqe_next = 0x0}, o_assertion = 0x0, 
  o_vrFilter = 0x0, o_si = 0x0}
(gdb) print rc
$5 = 111
(gdb) print *rs
$6 = {sr_type = REP_SEARCH, sr_tag = 105, sr_msgid = 0, sr_err = 0, 
  sr_matched = 0x0, sr_text = 0x0, sr_ref = 0x0, sr_ctrls = 0xfd741328, 
  sr_un = {sru_sasl = {r_sasldata = 0x15154c0}, sru_extended = {
      r_rspoid = 0x15154c0 "", r_rspdata = 0xc1019c}, sru_search = {
      r_entry = 0x15154c0, r_attrs = 0xc1019c, r_nentries = 0, r_v2ref = 0x0}}}