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

Re: core on slapadd -w w/ OPENLDAP_REL_ENG_2_3



> Yes, this means that you installed a stripped binary.  With 2.3 and later,
> you can do:
> make install STRIP=""

Thanks for the tip - didn't realize that.

> As a last resort, you can copy the compiled slapd in your build area
> (servers/slapd/.lib/slapd) in as your slapd binary, as that is not stripped
> (it is stripped at make install time).

I rebuilt with make install STRIP="" and it didn't change anything on the
trace of the core file.  Wierd thing is I didn't have a servers/slapd/.lib
directory.  I did have servers/slapd/slapd, which I copied over and used
as my binary, but that didn't change anything either on the core.

So, I thought I'd give it a try running slapadd under gdb and it looks
more useful now.  Is this helpful?

(gdb) run -f /usr/local/openldap23_debug/etc/openldap/slapd.conf -q -w -l
/root/BUILD/import/dump.ldif
Starting program: /root/BUILD/source/ldap/servers/slapd/slapadd -f
/usr/local/openldap23_debug/etc/openldap/slapd.conf -q -w -l
/root/BUILD/import/dump.ldif
slap_startup failed

Program exited with code 01.
(gdb) run -f /usr/local/openldap23_debug/etc/openldap/slapd.conf -q -w -l
/root/BUILD/import/dump.ldif
Starting program: /root/BUILD/source/ldap/servers/slapd/slapadd -f
/usr/local/openldap23_debug/etc/openldap/slapd.conf -q -w -l
/root/BUILD/import/dump.ldif

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1 (LWP 100274)]
0x080efe70 in hdb_dn2id (op=0xbfbfe820, txn=0x0, in=0x820dba0,
ei=0xbfbfe780)
    at dn2id.c:647
647             BDB_ID2DISK( ei->bei_parent->bei_id, &idp );
#0  0x080efe70 in hdb_dn2id (op=0xbfbfe820, txn=0x0, in=0x820dba0,
    ei=0xbfbfe780) at dn2id.c:647
        i0 = 0
        tmp = 4
        _p = (unsigned char *) 0x1 <Error reading address 0x1: Bad
address>
        bdb = (struct bdb_info *) 0x81b6d00
        db = (DB *) 0x81f4800
        key = {data = 0xbfbfe6e4, size = 4, ulen = 4, dlen = 0, doff = 0,
  flags = 32}
        data = {data = 0x4, size = 136253136, ulen = 3217024824,
  dlen = 675172938, doff = 675223460, flags = 136007824}
        cursor = (DBC *) 0x283ef0fa
        rc = 0
        nrlen = 14
        d = (diskNode *) 0x0
        ptr = 0x4 <Error reading address 0x4: Bad address>
        dlen = "\000"
        idp = 3217024768
#1  0x080cc86e in hdb_tool_dn2id_get (be=0x81b6c00, dn=0x820dba0)
    at tools.c:155
        op = {o_hdr = 0xbfbfe7c0, o_tag = 0, o_time = 0, o_tincr = 0,
  o_bd = 0x81b6c00, o_req_dn = {bv_len = 0, bv_val = 0x0}, o_req_ndn = {
    bv_len = 0, bv_val = 0x0}, o_request = {oq_add = {rs_e = 0x0,
      rs_modlist = 0x0}, oq_bind = {rb_method = 0, rb_cred = {bv_len = 0,
        bv_val = 0x0}, rb_edn = {bv_len = 0, bv_val = 0x0}, rb_ssf = 0,
      rb_tmp_mech = {bv_len = 0, bv_val = 0x0}}, oq_compare = {rs_ava =
0x0},
    oq_modify = {rs_modlist = 0x0, rs_increment = 0}, oq_modrdn = {
      rs_newrdn = {bv_len = 0, bv_val = 0x0}, rs_nnewrdn = {bv_len = 0,
        bv_val = 0x0}, rs_newSup = 0x0, rs_nnewSup = 0x0,
      rs_deleteoldrdn = 0}, oq_search = {rs_scope = 0, rs_deref = 0,
      rs_slimit = 0, rs_tlimit = 0, rs_limit = 0x0, rs_attrsonly = 0,
      rs_attrs = 0x0, rs_filter = 0x0, rs_filterstr = {bv_len = 0,
        bv_val = 0x0}}, oq_abandon = {rs_msgid = 0}, oq_cancel = {
      rs_msgid = 0}, oq_extended = {rs_reqoid = {bv_len = 0, bv_val =
0x0},
      rs_flags = 0, rs_reqdata = 0x0}, oq_pwdexop = {rs_reqoid = {bv_len =
0,
        bv_val = 0x0}, rs_flags = 0, rs_old = {bv_len = 0, bv_val = 0x0},
      rs_new = {bv_len = 0, bv_val = 0x0}, rs_mods = 0x0, rs_modtail =
0x0}},
  o_abandon = 0, o_cancel = 0, o_groups = 0x0, o_do_not_cache = 0 '\0',
  o_is_auth_check = 0 '\0', o_nocaching = 0 '\0',
  o_delete_glue_parent = 0 '\0', o_ctrlflag = '\0' <repeats 31 times>,
  o_controls = 0x0, o_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}, o_ber = 0x0, o_res_ber = 0x0,
  o_callback = 0x0, o_ctrls = 0x0, o_private = 0x0, o_next = {stqe_next =
0x0}}
        ohdr = {oh_opid = 0, oh_connid = 0, oh_conn = 0x0, oh_msgid = 0,
  oh_protocol = 0, oh_tid = 0x0, oh_threadctx = 0x0, oh_tmpmemctx = 0x0,
  oh_tmpmfuncs = 0x818c8e0, oh_log_prefix = '\0' <repeats 49 times>}
        ei = {bei_parent = 0x0, bei_id = 4294967295, bei_lockpad = 0 '\0',
  bei_state = 0, bei_nrdn = {bv_len = 0, bv_val = 0x0}, bei_rdn = {bv_len
= 0,
    bv_val = 0x0}, bei_modrdns = 0, bei_ckids = 0, bei_dkids = 0, bei_e =
0x0,
  bei_kids = 0x0, bei_kids_mutex = 0x0, bei_lrunext = 0x0, bei_lruprev =
0x0}
#2  0x080b4384 in slapadd (argc=7, argv=0xbfbfec2c) at slapadd.c:326
        buf = 0x81f6000 "dn"
        lineno = 4920136
        lmax = 1043
        rc = 0
        text = 0x0
        textbuf = '\0' <repeats 255 times>
        textlen = 256
        progname = 0x814e33c "slapadd"
        manage = 0
        csn = {bv_len = 32,
  bv_val = 0x8194240 "20050809132113Z#0006d3#00#000000"}
        maxcsn = {bv_len = 32,
  bv_val = 0x8194280 "20050808155052Z#00031c#00#000000"}
        match = -1
        attr = (Attribute *) 0x81fb420
        ctxcsn_e = (Entry *) 0x281b2700
        ctxcsn_id = 128682560
        id = 360011
        ret = 672738721
        bvtext = {bv_len = 256, bv_val = 0xbfbfea20 ""}
        i = 672874768
        checkvals = 0
        mc = {bv_len = 675292388,
  bv_val = 0x1bfea64 <Error reading address 0x1bfea64: Bad address>}
#3  0x0804c6f1 in main (argc=7, argv=0xbfbfec2c) at main.c:279
        i = 0
        no_detach = 0
        rc = 1
        urls = 0x0
        username = 0x0
        groupname = 0x0
        sandbox = 0x0
        syslogUser = 160
        g_argc = 7
        g_argv = (char **) 0xbfbfec2c
        configfile = 0x0
        configdir = 0x0
        serverName = 0xbfbfed32 "slapadd"
        serverMode = 1
        scp = (struct sync_cookie *) 0x0
        scp_entry = (struct sync_cookie *) 0x0
        serverNamePrefix = 0x813776b ""
        l = 676125088
        __func__ = "main"
(gdb) thread apply all bt

Thread 3 (Thread 2 (LWP 100245)):
#0  0x283ee2fb in pthread_testcancel () from /usr/lib/libpthread.so.1
#1  0x283e6902 in pthread_mutexattr_init () from /usr/lib/libpthread.so.1
#2  0x00000000 in ?? ()

Thread 2 (Thread 1 (LWP 100274)):
#0  0x080efe70 in hdb_dn2id (op=0xbfbfe820, txn=0x0, in=0x820dba0,
    ei=0xbfbfe780) at dn2id.c:647
#1  0x080cc86e in hdb_tool_dn2id_get (be=0x81b6c00, dn=0x820dba0)
    at tools.c:155
#2  0x080b4384 in slapadd (argc=7, argv=0xbfbfec2c) at slapadd.c:326
#3  0x0804c6f1 in main (argc=7, argv=0xbfbfec2c) at main.c:279