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

(ITS#4822) After test049 is over, restarting the producer dumps core



Full_Name: Pierangelo Masarati
Version: HEAD
OS: Linux 2.6 (CentOS 4.4)
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (81.72.89.40)
Submitted by: ando


After test049 is over, restarting the producer dumps core.  This happens in the
consumer's code (!) which, as far as I can understand, is there in cn=config
only for the purpose of replicating to the consumer and set it to be, well, a
consumer.

Same happens when re-starting slapd with the consumer's database.

The problem is related to the pending CSN being a NULL berval; the assertion
occurs while trying to copy it, since the source of a ber copy cannot be NULL. 
If it is correct that pending CSN be NULL, the test must be performed before
calling ber_bvreplace(); otherwise, this needs to be fixed.

At this point I suggest that test049 includes stopping and restarting both (when
this bug is fixed), re-checking that contents match.

<producer>
...
Core was generated by `../../../servers/slapd/slapd -F slapd.d/ -h ldap://:9011
-s0 -dstats'.
Program terminated with signal 6, Aborted.
...
(gdb) bt
#0  0x003957a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1  0x00fbf7a5 in raise () from /lib/tls/libc.so.6
#2  0x00fc1209 in abort () from /lib/tls/libc.so.6
#3  0x00fb8d91 in __assert_fail () from /lib/tls/libc.so.6
#4  0x08218a30 in ber_bvreplace_x (dst=0xb6d15ff4, src=0x97ae258, ctx=0x0)
    at memory.c:703
#5  0x080f34d1 in slap_queue_csn (op=0xb6d15f30, csn=0xb6d15bf0)
    at ctxcsn.c:167
#6  0x080e91bc in syncrepl_del_nonpresent (op=0xb6d15f30, si=0x977ea68, 
    uuids=0x0, cookiecsn=0xb6d15d9c) at syncrepl.c:2097
#7  0x080e49a0 in do_syncrep2 (op=0xb6d15f30, si=0x977ea68) at syncrepl.c:728
#8  0x080e58e1 in do_syncrepl (ctx=0xb6d162a4, arg=0x977a008)
    at syncrepl.c:1010
#9  0x081e5948 in ldap_int_thread_pool_wrapper (xpool=0x9701bc8) at tpool.c:704
#10 0x00692371 in start_thread () from /lib/tls/libpthread.so.0
#11 0x0105fffe in clone () from /lib/tls/libc.so.6
</producer>

<consumer>
...
Core was generated by `../../../servers/slapd/slapd -F slapd.d/ -h ldap://:9011
-s0 -dstats'.
Program terminated with signal 6, Aborted.
...
(gdb) bt
#0  0x003957a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1  0x00f057a5 in raise () from /lib/tls/libc.so.6
#2  0x00f07209 in abort () from /lib/tls/libc.so.6
#3  0x00efed91 in __assert_fail () from /lib/tls/libc.so.6
#4  0x08218a30 in ber_bvreplace_x (dst=0xb6cd7ff4, src=0x8dec878, ctx=0x0)
    at memory.c:703
#5  0x080f34d1 in slap_queue_csn (op=0xb6cd7f30, csn=0xb6cd7bf0)
    at ctxcsn.c:167
#6  0x080e91bc in syncrepl_del_nonpresent (op=0xb6cd7f30, si=0x8db80b0, 
    uuids=0x0, cookiecsn=0xb6cd7d9c) at syncrepl.c:2097
#7  0x080e49a0 in do_syncrep2 (op=0xb6cd7f30, si=0x8db80b0) at syncrepl.c:728
#8  0x080e58e1 in do_syncrepl (ctx=0xb6cd82a4, arg=0x8da5408)
    at syncrepl.c:1010
#9  0x081e5948 in ldap_int_thread_pool_wrapper (xpool=0x8d3fbc8) at tpool.c:704
#10 0x003cb371 in start_thread () from /lib/tls/libpthread.so.0
#11 0x00fa5ffe in clone () from /lib/tls/libc.so.6
</consumer>