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

Re: null_callbacks after initial sync



Howard Chu wrote:
> Nick Geron wrote:
>> Howard Chu wrote:
>>> Your stack trace is a bit odd, because I can't find anywhere in the
>>> source tree that uses the function "slap_freeself_cb()". Are you using
>>> any custom overlays? It appears that your stack trace is still missing
>>> a lot of details. You should compile with -g and without any
>>> optimization, and make sure you're testing with the unstripped binary.
>> The only overlays I'm using are those found in the openldap tarball.  I
>> found that function referenced in result.c
>
> It is defined in result.c, but it is not referenced anywhere.
>
>> It does look like I had stripped binaries though.  I've removed
>> optimization and verified that the -g option is being given.  It took a
>> bit to track down where stripping was being set, but 'file' now tells me
>> the binaries are not stripped.
>>
>> Here's the latest backtrace:
>>
>>> regex_matches: string:        uid=syncrepl,ou=ldap,dc=corenap,dc=com
>> =>  regex_matches: rc: 1 no matches
>> ldap_read: want=8, got=7
>>    0000:  30 05 02 01 03 42 00                               0....B.
>> ber_get_next: tag 0x30 len 5 contents:
>> ber_get_next
>> ldap_read: want=8, got=0
>>
>> ber_get_next on fd 21 failed errno=0 (Success)
>> connection_closing: readying conn=1 sd=21 for close
>> connection_close: deferring conn=1 sd=21
>> conn=1 op=2 do_unbind
>> connection_resched: attempting closing conn=1 sd=21
>> connection_close: conn=1 sd=21
>> slapd: connection.c:676: connection_state_closing: Assertion
>> `c->c_struct_state == 0x02' failed.
>>
>> Program received signal SIGABRT, Aborted.
>> [Switching to Thread 1107310912 (LWP 17114)]
>> 0x00000030ae430055 in raise () from /lib64/libc.so.6
>> (gdb) bt
>> #0  0x00000030ae430055 in raise () from /lib64/libc.so.6
>> #1  0x00000030ae431af0 in abort () from /lib64/libc.so.6
>> #2  0x00000030ae429756 in __assert_fail () from /lib64/libc.so.6
>> #3  0x000000000043854a in connection_state_closing (c=0xa35ef60) at
>> connection.c:676
>> #4  0x000000000044dc38 in send_ldap_ber (conn=0xa35ef60, ber=0x42002410)
>> at result.c:153
>> #5  0x000000000045173d in slap_send_search_entry (op=0x420029a0,
>> rs=0x420026c0) at result.c:1187
>> #6  0x000000000051072f in syncprov_sendresp (op=0x420029a0,
>> opc=0x42002780, so=0xa882b80, e=0x420027d8, mode=2) at syncprov.c:809
>> #7  0x0000000000510a8d in syncprov_qplay (op=0x420029a0, on=0xa094690,
>> so=0xa882b80) at syncprov.c:878
>> #8  0x0000000000510c54 in syncprov_qtask (ctx=0x42002dc0,
>> arg=0x2aaac4111500) at syncprov.c:923
>> #9  0x00002aaaaaabc605 in ldap_int_thread_pool_wrapper (xpool=0xa0466d0)
>> at tpool.c:625
>> #10 0x00000030aec062f7 in start_thread () from /lib64/libpthread.so.0
>> #11 0x00000030ae4ce85d in clone () from /lib64/libc.so.6
>> (gdb)
>
> This trace looks the same as ITS#5401. Apparently syncprov is trying
> to send a persistent search response after the psearch consumer has
> closed the connection. Obviously this should never happen; when a
> connection is closed all the outstanding operations on it are abandoned.
>
> You should probably send further replies to ITS#5401. Can you please
> provide, in addition to the above trace, the output from
>     frame 3
>     print *c
>
=> regex_matches: string:        uid=syncrepl,ou=ldap,dc=corenap,dc=com
=> regex_matches: rc: 1 no matches
slapd: connection.c:676: connection_state_closing: Assertion
`c->c_struct_state == 0x02' failed.

Program received signal SIGABRT, Aborted.
[Switching to Thread 1107310912 (LWP 30979)]
0x0000003918230055 in raise () from /lib64/libc.so.6
(gdb) frame 3
#3  0x000000000043854a in connection_state_closing (c=0xff53f20)
    at connection.c:676
676             assert( c->c_struct_state == SLAP_C_USED );
(gdb) print *c
$1 = {c_struct_state = 1, c_conn_state = 0, c_conn_idx = 20, c_sd = -1,
  c_close_reason = 0x545d7b "?", c_mutex = {__data = {__lock = 1,
__count = 0,
      __owner = 30979, __nusers = 1, __kind = 0, __spins = 0, __list = {
        __prev = 0x0, __next = 0x0}},
    __size = "\001\000\000\000\000\000\000\000\003y\000\000\001", '\0'
<repeats 26 times>, __align = 1}, c_sb = 0x2aaac4000ef0, c_starttime = 0,
  c_activitytime = 0, c_connid = 18446744073709551615, c_peer_domain = {
    bv_len = 0, bv_val = 0x0}, c_peer_name = {bv_len = 0, bv_val = 0x0},
  c_listener = 0x0, c_sasl_bind_mech = {bv_len = 0, bv_val = 0x0},
  c_sasl_dn = {bv_len = 0, bv_val = 0x0}, c_sasl_authz_dn = {bv_len = 0,
    bv_val = 0x0}, c_authz_backend = 0x0, c_authz_cookie = 0x0, c_authz = {
    sai_method = 128, 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_protocol = 0, c_ops = {stqh_first = 0x0, stqh_last = 0xff54038},
  c_pending_ops = {stqh_first = 0x0, stqh_last = 0xff54048},
c_write_mutex = {
    __data = {__lock = 1, __count = 0, __owner = 30979, __nusers = 1,
      __kind = 0, __spins = 0, __list = {__prev = 0x0, __next = 0x0}},
    __size = "\001\000\000\000\000\000\000\000\003y\000\000\001", '\0'
<repeats 26 times>, __align = 1}, c_write_cv = {__data = {__lock = 0,
__futex = 0,
      __total_seq = 0, __wakeup_seq = 0, __woken_seq = 0, __mutex = 0x0,
      __nwaiters = 0, __broadcast_seq = 0}, __size = '\0' <repeats 47
times>,
    __align = 0}, c_currentber = 0x0, c_sasl_bind_in_progress = 0 '\0',
  c_writewaiter = 0 '\0', c_is_tls = 0 '\0', c_needs_tls_accept = 0 '\0',
  c_sasl_layers = 0 '\0', c_sasl_done = 0 '\0', c_sasl_authctx = 0x0,
  c_sasl_sockctx = 0x0, c_sasl_extra = 0x0, c_sasl_bindop = 0x0,
  c_pagedresults_state = {ps_be = 0x0, ps_size = 0, ps_count = 0,
    ps_cookie = 0, ps_cookieval = {bv_len = 0, bv_val = 0x0}},
  c_n_ops_received = 3, c_n_ops_executing = 0, c_n_ops_pending = 0,
  c_n_ops_completed = 3, c_n_get = 3, c_n_read = 3, c_n_write = 0,
  c_extensions = 0x0, c_clientfunc = 0, c_clientarg = 0x0,
  c_send_ldap_result = 0x44ebfc <slap_send_ldap_result>,
  c_send_search_entry = 0x44f994 <slap_send_search_entry>,
  c_send_search_reference = 0x451ad1 <slap_send_search_reference>,
  c_send_ldap_extended = 0x44f4c8 <slap_send_ldap_extended>,
  c_send_ldap_intermediate = 0x44f771 <slap_send_ldap_intermediate>}
(gdb)
(gdb) bt
#0  0x0000003918230055 in raise () from /lib64/libc.so.6
#1  0x0000003918231af0 in abort () from /lib64/libc.so.6
#2  0x0000003918229756 in __assert_fail () from /lib64/libc.so.6
#3  0x000000000043854a in connection_state_closing (c=0xff53f20)
    at connection.c:676
#4  0x000000000044dc38 in send_ldap_ber (conn=0xff53f20, ber=0x42002410)
    at result.c:153
#5  0x000000000045173d in slap_send_search_entry (op=0x420029a0,
rs=0x420026c0)
    at result.c:1187
#6  0x000000000051072f in syncprov_sendresp (op=0x420029a0, opc=0x42002780,
    so=0x101f9a50, e=0x420027d8, mode=2) at syncprov.c:809
#7  0x0000000000510a8d in syncprov_qplay (op=0x420029a0, on=0xfc89690,
    so=0x101f9a50) at syncprov.c:878
#8  0x0000000000510c54 in syncprov_qtask (ctx=0x42002dc0, arg=0x105542c0)
    at syncprov.c:923
#9  0x00002aaaaaabc605 in ldap_int_thread_pool_wrapper (xpool=0xfc3b6d0)
    at tpool.c:625
#10 0x00000039196062f7 in start_thread () from /lib64/libpthread.so.0
#11 0x00000039182ce85d in clone () from /lib64/libc.so.6