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

Re: (ITS#6506) Use of back-perl in slapd.conf in subordinate database causes slapcat to segfault



> masarati@aero.polimi.it wrote:
>
>>> *** glibc detected *** ./sbin/slapcat: free(): invalid pointer:
>>
>> ^^^ this message is not quite informative, nor is what follows below.
>> Please read <http://www.openldap.org/faq/data/cache/56.html> carefully,
>> and provide the information required.
>>
>> p.
>
> Okay. I figured it was easy enough to recreate that I wouldn't need to
> build a full debug build myself, but looks like I need to do that
> anyway. Also, what is the best way to not get "strip" to be
> automatically invoked during "make install"? I ended up temporarily
> removing the binary just to get unstripped versions.

What about make STRIP="" install ?

Apart from the bug you manifest, which should not occur, I'd note that
back-perl does not support slaptools, and thus no slaptool'ing should
occur when using it.  I can't debug this right now because I don't
routinely build with back-perl.

My guess is that the bug should appear with any other glued backend that
does not support tools (but I couldn't reproduce it using back-ldap, for
example).

A (possible) workaround is to use

slapcat -a '(!(entryDN:dnSubtreeMatch:=ou=perl,dc=my-domain,dc=com))'

in order to exclude the subtree handled by back-perl.

p.

>
> (gdb) bt full
> #0  0x00007f18761dded5 in raise () from /lib/libc.so.6
> No symbol table info available.
> #1  0x00007f18761df3f3 in abort () from /lib/libc.so.6
> No symbol table info available.
> #2  0x00007f187621a3a8 in ?? () from /lib/libc.so.6
> No symbol table info available.
> #3  0x00007f187621f948 in ?? () from /lib/libc.so.6
> No symbol table info available.
> #4  0x00007f1876221a56 in free () from /lib/libc.so.6
> No symbol table info available.
> #5  0x00007f1877296c52 in ber_memfree_x (p=0xa207b3, ctx=0x0) at
> memory.c:152
>          __PRETTY_FUNCTION__ = "ber_memfree_x"
> #6  0x000000000044f785 in ch_free (ptr=0xa207b3) at ch_malloc.c:139
>          ctx = (void *) 0x0
> #7  0x00000000004395e6 in entry_clean (e=0xa0bff8) at entry.c:489
>          __PRETTY_FUNCTION__ = "entry_clean"
> #8  0x00000000004396ab in entry_free (e=0xa0bff8) at entry.c:514
> No locals.
> #9  0x00000000004ae4e4 in glue_entry_release_rw (op=0x7fffe262a540,
> e=0xa0bff8, rw=0) at backglue.c:731
>          b0 = (BackendDB *) 0x7fffe262a2d0
>          rc = -1
> #10 0x00000000004b0952 in overlay_entry_release_ov (op=0x7fffe262a540,
> e=0xa0bff8, rw=0, on=0x8997d0) at backover.c:421
>          oi = (slap_overinfo *) 0x8995f0
>          be = (BackendDB *) 0x89a510
>          db = {bd_info = 0x8997d0, bd_self = 0x89a510, be_ctrls =
> "\000\001\001\001\000\001\000\000\001\000\000\001\001\000\001", '\0'
> <repeats 17 times>, "\001",
>    be_flags = 2328, 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 = 0x899270, be_nsuffix = 0x8992a0,
> be_schemadn = {bv_len = 0,
>      bv_val = 0x0}, be_schemandn = {bv_len = 0, bv_val = 0x0}, be_rootdn
> = {bv_len = 30, bv_val = 0x899570 "cn=Manager,dc=my-domain,dc=com"},
> be_rootndn = {bv_len = 30,
>      bv_val = 0x8995c0 "cn=manager,dc=my-domain,dc=com"}, be_rootpw =
> {bv_len = 6, bv_val = 0x8993b0 "secret"}, be_max_deref_depth = 15,
> be_def_limit = {
>      lms_t_soft = 3600, lms_t_hard = 0, lms_s_soft = 500, 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 = 0x0, be_dfltaccess = ACL_READ, be_update_ndn = {bv_len = 0,
> bv_val = 0x0}, be_update_refs = 0x0, be_pending_csn_list = 0x8978c0,
> be_pcl_mutex = {__data = {
>        __lock = 0, __count = 0, __owner = 0, __nusers = 0, __kind = 0,
> __spins = 0, __list = {__prev = 0x0, __next = 0x0}}, __size = '\0'
> <repeats 39 times>,
>      __align = 0}, be_syncinfo = 0x0, be_pb = 0x0, be_cf_ocs = 0x7b8c00,
> be_private = 0x898a30, be_next = {stqe_next = 0x0}}
>          bi = (BackendInfo *) 0x8995f0
>          rc = 32768
> #11 0x00000000004b0ab2 in over_entry_release_rw (op=0x7fffe262a540,
> e=0xa0bff8, rw=0) at backover.c:463
>          oi = (slap_overinfo *) 0x8995f0
>          on = (slap_overinst *) 0x8997d0
>          __PRETTY_FUNCTION__ = "over_entry_release_rw"
> #12 0x000000000043d3cf in be_entry_release_rw (op=0x7fffe262a540,
> e=0xa0bff8, rw=0) at backend.c:880
> No locals.
> #13 0x00000000004b5c5b in slapcat (argc=1, argv=0x7fffe262a8e8) at
> slapcat.c:117
>          data = 0xa20c50 "dn: ou=perl,dc=my-domain,dc=com\nobjectClass:
> organizationalUnit\nobjectClass: top\nou: perl\nstructuralObjectClass:
> organizationalUnit\nentryUUID:
> 6438973e-d5c0-102e-9c05-81e0ba1bb1f2\ncreatorsName: cn=Man"...
>          len = 388
>          e = (Entry *) 0xa0bff8
>          id = 3
>          rc = 0
>          op = {o_hdr = 0x0, o_tag = 0, o_time = 0, o_tincr = 0, o_bd =
> 0x898500, o_req_dn = {bv_len = 0, bv_val = 0x0}, o_req_ndn = {bv_len =
> 0, bv_val = 0x0},
>    o_request = {oq_add = {rs_modlist = 0x0, rs_e = 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_mech = {bv_len = 0, bv_val = 0x0}}, oq_compare = {rs_ava =
> 0x0}, oq_modify = {rs_mods = {rs_modlist = 0x0, rs_no_opattrs = 0 '\0'},
> rs_increment = 0},
>      oq_modrdn = {rs_mods = {rs_modlist = 0x0, rs_no_opattrs = 0 '\0'},
> rs_deleteoldrdn = 0, rs_newrdn = {bv_len = 0, bv_val = 0x0}, rs_nnewrdn
> = {bv_len = 0,
>          bv_val = 0x0}, rs_newSup = 0x0, rs_nnewSup = 0x0}, 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_extended = {rs_reqoid = {bv_len = 0, bv_val = 0x0},
> rs_flags = 0,
>          rs_reqdata = 0x0}, 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_dont_replicate = 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 = 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_csn = {bv_len =
> 0, bv_val = 0x0},
>    o_private = 0x0, o_extra = {slh_first = 0x0}, o_next = {stqe_next =
> 0x0}}
>          progname = 0x55fc68 "slapcat"
> #14 0x00000000004090d3 in main (argc=1, argv=0x7fffe262a8e8) at main.c:403
>          i = 1
>          no_detach = 0
>          rc = 1
>          urls = 0x0
>          username = 0x0
>          groupname = 0x0
>          sandbox = 0x0
>          syslogUser = 160
>          g_argc = 1
>          g_argv = (char **) 0x7fffe262a8e8
>          configfile = 0x0
>          configdir = 0x0
>          serverName = 0x7fffe262c75e "slapcat"
>          serverMode = 1
>          scp = (struct sync_cookie *) 0x0
>          scp_entry = (struct sync_cookie *) 0x0
>          debug_unknowns = (char **) 0x0
>          syslog_unknowns = (char **) 0x0
>          serverNamePrefix = 0x54076b ""
>          l = 4223483
>          slapd_pid_file_unlink = 0
>          slapd_args_file_unlink = 0
>          firstopt = 1
>          __PRETTY_FUNCTION__ = "main"
> (gdb)
>
>
> HTH,
>
> Mark.
>
> --
> Mark Cave-Ayland - Senior Technical Architect
> PostgreSQL - PostGIS
> Sirius Corporation plc - control through freedom
> http://www.siriusit.co.uk
> t: +44 870 608 0063
>
> Sirius Labs: http://www.siriusit.co.uk/labs
>