Full_Name: Jonathan Clarke
Version: 2.3.37
OS: Debian Etch
URL: ftp://ftp.openldap.org/incoming/jclarke-slurpd-rwm-modify-bug.tar.gz
Submission from: (NULL) (134.157.159.100)
Hello guys,
With a simple master/slave setup, and the rwm overlay activated for the bindDN
context, any modify operation made on the master, replicated with slurpd causes
the slave to crash.
You will find below a backtrace of the slave when it crashes, and the
configuration files we're using on the master, the slave, an LDIF of the
contents of the directory are in the archive on ftp.openldap.org indicated in
the ITS.
We are using 2.3.37 for both master and slave, and have confirmed that
disactivating the rwm overlay in slapd.conf avoids the problem.
Thanks in advance for your help !
Jon
***** BACKTRACE ******
conn=0 fd=14 ACCEPT from IP=127.0.0.1:57752 (IP=0.0.0.0:392)
[New Thread 32771 (LWP 21187)]
conn=0 op=0 BIND dn="uid=replicator,dc=linagora,dc=org" method=128
conn=0 op=0 BIND dn="uid=replicator,dc=linagora,dc=org" mech=SIMPLE ssf=0
conn=0 op=0 RESULT tag=97 err=0 text=
conn=0 op=1 MOD dn="dc=linagora,dc=org"
conn=0 op=1 MOD attr=description entryCSN modifiersName modifyTimestamp
conn=0 op=1 RESULT tag=103 err=0 text=
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 32771 (LWP 21187)]
0x4035dafb in free () from /lib/libc.so.6
(gdb) bt
#0 0x4035dafb in free () from /lib/libc.so.6
#1 0x4035f805 in malloc () from /lib/libc.so.6
#2 0x0813e70f in ber_memalloc_x (s=1, ctx=0x40412660) at memory.c:226
#3 0x08079fa8 in ch_malloc (size=16) at ch_malloc.c:54
#4 0x08101567 in rwm_op_modify (op=0x8246fc0, rs=0x6301dce4) at rwm.c:590
#5 0x080b6c5e in overlay_op_walk (op=0x8246fc0, rs=0x6301dce4, which=op_modify,
oi=0x81e9688, on=0x81e9778) at backover.c:639
#6 0x080b70ce in over_op_func (op=0x8246fc0, rs=0x6301dce4, which=op_modify) at
backover.c:701
#7 0x08077e00 in do_modify (op=0x8246fc0, rs=0x6301dce4) at modify.c:200
#8 0x080609bb in connection_operation (ctx=0x6301dd58, arg_v=0x8246fc0) at
connection.c:1133
#9 0x0811a8b4 in ldap_int_thread_pool_wrapper (xpool=0x81d0000) at tpool.c:478
#10 0x402adc51 in pthread_start_thread () from /lib/libpthread.so.0
#11 0x402addb4 in pthread_start_thread_event () from /lib/libpthread.so.0
#12 0x403b438a in clone () from /lib/libc.so.6
***** End of backtrace *****
lwartha(a)gmail.com wrote:
> I made stupid typo and use word acces instead of access in slapd.confl.
> Unforutnately slaptest -u does not display any notice about it and display
> config file testing succeeded.
Because up to 2.3 OpenLDAP didn't care about unrecognized statements.
If you run staptest with -dconfig you'll notice warnings (if you're
debugging slapd.conf you should; it is not the default because in most
cases people are only interested in a yes/no question; ITS#4930 was
filed to even remove the "success string").
>
> This of cause takes lot of investigation to find it.
>
> Thanks for fixing it in the future.
It's been changed in 2.4 ever since. Now all errors, including
unrecognized statements, cause a bailout.
p.
Ing. Pierangelo Masarati
OpenLDAP Core Team
SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
---------------------------------------
Office: +39 02 23998309
Mobile: +39 333 4963172
Email: pierangelo.masarati(a)sys-net.it
---------------------------------------
Full_Name: Ladislav Wartha
Version: 2.3.27-4
OS: Fedora Core release 6
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (195.122.198.222)
Hi,
I made stupid typo and use word acces instead of access in slapd.confl.
Unforutnately slaptest -u does not display any notice about it and display
config file testing succeeded.
This of cause takes lot of investigation to find it.
Thanks for fixing it in the future.
Best regards,
Ladislav
hyc(a)symas.com wrote:
> ando(a)sys-net.it wrote:
>> When slapadd'ing -q, existing database log files seem to become unusable. If
>> this is correct, as it seems to be, slapadd could refuse to start with -q if log
>> files are present, or, for example, remove the logs if -qq.
>
> I guess we could add that check. The docs already say that if an error occurs,
> the entire database will be unusable. As such, you should only use it for
> initially populating a database, not for adding to an existing one.
The story is that I placed logs in a separate directory and I forgot to
clean them up when regenerating the DB after removing the database files :)
p.
Ing. Pierangelo Masarati
OpenLDAP Core Team
SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
---------------------------------------
Office: +39 02 23998309
Mobile: +39 333 4963172
Email: pierangelo.masarati(a)sys-net.it
---------------------------------------
ando(a)sys-net.it wrote:
> When slapadd'ing -q, existing database log files seem to become unusable. If
> this is correct, as it seems to be, slapadd could refuse to start with -q if log
> files are present, or, for example, remove the logs if -qq.
I guess we could add that check. The docs already say that if an error occurs,
the entire database will be unusable. As such, you should only use it for
initially populating a database, not for adding to an existing one.
--
-- Howard Chu
Chief Architect, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/
To reproduce:
- set idlcache
- search one entry, so that the idl gets cached
- delete that entry, so that the idl gets cleared - but head/tail don't
- search another entry so that it gets cached - head/tail are corrupted
I've a fix for this about to come (affects 2.4.5 as well, sigh; not sure
about re23).
p.
Ing. Pierangelo Masarati
OpenLDAP Core Team
SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
---------------------------------------
Office: +39 02 23998309
Mobile: +39 333 4963172
Email: pierangelo.masarati(a)sys-net.it
---------------------------------------
Full_Name: Pierangelo Masarati
Version: since back-config
OS: irrelevant
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (193.203.230.29)
Submitted by: ando
Setting a negative number for cachesize causes an assertion in ch_calloc(); for
idlcachesize is just accepted; same for most remaining numeric data.
A neat solution would be to define ARG_UINT/ARG_ULONG, redefine types as
appropriate (now they're ints, but the negative value has no meaning or causes
crash). There seems to be room for 8 more types in the type mask.
Not a showstopper, though.
I noticed that I was intermixing overlay and database configuration
statements, but this should be allowed in HEAD. Anyway, I now put
configuration statements in the right order, but I've been able to
reproduce the problem (not all times, and no devel tools on the maching
where I could produce it, except gdb and an unstripped slapd build)....
Ing. Pierangelo Masarati
OpenLDAP Core Team
SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
---------------------------------------
Office: +39 02 23998309
Mobile: +39 333 4963172
Email: pierangelo.masarati(a)sys-net.it
---------------------------------------
Full_Name: Pierangelo Masarati
Version: HEAD
OS: Linux RH AS 4.5
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (193.203.230.29)
Submitted by: ando
I ran into an issue running HEAD code. I got the following core dump:
#0 0x08103390 in bdb_idl_cache_put (bdb=0xa3e1110, db=0x3550c800,
key=0x35f988a0, ids=0x34afc008, rc=0)
at ../../../../servers/slapd/back-bdb/idl.c:354
#1 0x08104318 in bdb_idl_fetch_key (be=0x36058ec0, db=0x3550c800, locker=0,
key=0x35f988a0, ids=0x34afc008, saved_cursor=0x0, get_flag=0)
at ../../../../servers/slapd/back-bdb/idl.c:665
#2 0x081084a1 in bdb_key_read (be=0x36058ec0, db=0x3550c800, locker=100,
k=0x352ff2d4, ids=0x34afc008, saved_cursor=0x0, get_flag=0)
at ../../../../servers/slapd/back-bdb/key.c:50
#3 0x081013ab in bdb_filter_candidates (op=0xa46b3f8, locker=100,
f=0x352ff2c4, ids=0x34bfc008, tmp=0x34afc008, stack=0x34c7c008)
at ../../../../servers/slapd/back-bdb/filterindex.c:770
#4 0x081020e9 in list_candidates (op=0xa46b3f8, locker=100, flist=0x35f98dd0,
ftype=161, ids=0x34b7c008, tmp=0x34afc008, save=0x34bfc008)
at ../../../../servers/slapd/back-bdb/filterindex.c:580
#5 0x08100458 in bdb_filter_candidates (op=0xa46b3f8, locker=100,
f=0x35f98dc0, ids=0x34b7c008, tmp=0x34afc008, stack=0x34bfc008)
at ../../../../servers/slapd/back-bdb/filterindex.c:204
#6 0x081020e9 in list_candidates (op=0xa46b3f8, locker=100, flist=0x35f98db0,
ftype=160, ids=0x35fd8e30, tmp=0x34afc008, save=0x34b7c008)
at ../../../../servers/slapd/back-bdb/filterindex.c:580
#7 0x08100458 in bdb_filter_candidates (op=0xa46b3f8, locker=100,
f=0x35f98de0, ids=0x35fd8e30, tmp=0x34afc008, stack=0x34b7c008)
#8 0x081109b5 in bdb_search (op=0xa46b3f8, rs=0x3605a0f0)
at ../../../../servers/slapd/back-bdb/search.c:1111
#9 0x080ee601 in overlay_op_walk (op=0xa46b3f8, rs=0x3605a0f0,
which=op_search, oi=0xa3e21e0, on=0xa3e2740)
at ../../../servers/slapd/backover.c:652
#10 0x080ee72f in over_op_func (op=0xa46b3f8, rs=0x3605a0f0, which=op_bind)
at ../../../servers/slapd/backover.c:704
#11 0x0808a051 in fe_op_search (op=0xa46b3f8, rs=0x3605a0f0)
at ../../../servers/slapd/search.c:368
#12 0x080894f7 in do_search (op=0xa46b3f8, rs=0x3605a0f0)
at ../../../servers/slapd/search.c:217
#13 0x080875c3 in connection_operation (ctx=0x3605a210, arg_v=0xa46b3f8)
at ../../../servers/slapd/connection.c:1145
#14 0x0808801b in connection_read_thread (ctx=0x3605a210, argv=0x14)
at ../../../servers/slapd/connection.c:1271
#15 0x081afa01 in ldap_int_thread_pool_wrapper (xpool=0xa304fa8)
at ../../../libraries/libldap_r/tpool.c:614
#16 0x008ad3cc in start_thread () from /lib/tls/libpthread.so.0
#17 0x00736c3e in clone () from /lib/tls/libc.so.6
where
(gdb) p bdb->bi_idl_cache_max_size
$27 = 30000
(gdb) p bdb->bi_idl_lru_head
$28 = (bdb_idl_cache_entry_t *) 0x3550cd28
(gdb) p bdb->bi_idl_lru_tail
$29 = (bdb_idl_cache_entry_t *) 0x3550cd28
(gdb) p bdb->bi_idl_lru_tail[0]
$30 = {kstr = {bv_len = 3, bv_val = 0x3550ebd8 "top"}, idl = 0x6,
db = 0x3550ebe8, idl_flags = 0, idl_lru_prev = 0x0, idl_lru_next = 0x0}
The latter seems quite odd: obviously the head/tail is corrupted, but either
bdb->bi_idl_lru_tail and bdb->bi_idl_lru_head should be null, or their
idl_lru_prev and idl_lru_next members should be valid.
There seems to be something odd in how entries are cleaned up from the cache: in
fact, if the whole LRU is destroyed, then eprev would remain dangling, but this
should never occur.
p.
BTW, I'm currently using Berkeley 4.2.52 w/ patches w/ HEAD code, if it
matters.
Ing. Pierangelo Masarati
OpenLDAP Core Team
SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
---------------------------------------
Office: +39 02 23998309
Mobile: +39 333 4963172
Email: pierangelo.masarati(a)sys-net.it
---------------------------------------