This problem was found while investigating https://fedorahosted.org/freeipa/ticket/5235 It was reproduced on RHEL 6.7 (389-ds-base-1.2.11.15-60.el6.x86_64)
The test case to reproduce is: - install IPA master - install IPA replica - (enable core dump: yum install abrt, sysctl -w fs.suid_dumpable=1, 'ulimit -c unlimited' in /etc/sysconfig/dirsrv) - iterate the provided script 'steps.sh' - the master replica will crash
The crash is not systematic. On my VMs it happens once in ~[20,100] 'steps.sh'
Sometime the test case ends in breaking IPA topology (ipa user-add fails, or total init fails) without crash. It requires to reinstall the topology.
Each time (crash or IPA topology break) the following messages are logged:
[23/Sep/2015:15:31:25 +0200] NSMMReplicationPlugin - changelog program - _cl5WriteOperationTxn: retry (49) the transaction (csn=5602a9a9000000040000) failed (rc=-30994 (DB_LOCK_DEADLOCK: Locker killed to resolve a deadlock)) [23/Sep/2015:15:31:25 +0200] NSMMReplicationPlugin - changelog program - _cl5WriteOperationTxn: failed to write entry with csn (5602a9a9000000040000); db error - -30994 DB_LOCK_DEADLOCK: Locker killed to resolve a deadlock [23/Sep/2015:15:31:25 +0200] NSMMReplicationPlugin - write_changelog_and_ruv: can't add a change for uid=user_1809_2,cn=users,cn=accounts,dc=abc,dc=idm,dc=lab,dc=eng,dc=brq,dc=redhat,dc=com (uniqid: 51b06805-61f711e5-a12e9486-e75d4fed, optype: 16) to changelog csn 5602a9a9000000040000
attachment steps.sh
DS aborts with this stack
{{{
at ../sysdeps/unix/sysv/linux/libc_fatal.c:198
ar_ptr=<value optimized out>) at malloc.c:6350
alt=<value optimized out>) at ldap/servers/slapd/back-ldbm/cache.c:1448
at ldap/servers/slapd/back-ldbm/cache.c:1476
at ldap/servers/slapd/back-ldbm/id2entry.c:455
at ldap/servers/slapd/back-ldbm/ldbm_search.c:1622
pr_statp=0x7f90c4be6228, send_result=1) at ldap/servers/slapd/opshared.c:1296
send_result=1) at ldap/servers/slapd/opshared.c:1696
prc=0x7f90f8417970 <internal_plugin_result_callback>, psec=0x7f90f84181f0 <internal_plugin_search_entry_callback>, prec=0x7f90f8418190 <internal_plugin_search_referral_callback>) at ldap/servers/slapd/plugin_internal_op.c:812
requiredObjectClass=<value optimized out>, target=0x7f90a8074120) at ldap/servers/plugins/uiduniq/uid.c:322
values=<value optimized out>, requiredObjectClass=0x0, target=0x7f90a8074120) at ldap/servers/plugins/uiduniq/uid.c:261
attr=0x7f90a8035f60, values=0x0, requiredObjectClass=0x0, dn=0x7f90a8074120) at ldap/servers/plugins/uiduniq/uid.c:411
at ldap/servers/slapd/plugin.c:1453
---Type to continue, or q to quit---
}}}
Ticket has been cloned to Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1265851
git patch file (1.2.11 only) 0001-Ticket-48287-Double-free-while-adding-entries-1.2.11.patch
Hello Noriko,
Great finding and fix !! ACK
Did you manage to reproduce with valgrind ?
Replying to [comment:6 tbordaz]:
Hello Noriko, Great finding and fix !! ACK Did you manage to reproduce with valgrind ?
Thanks, Thierry! Actually, I could not reproduce the bug with valgrind. The issue is IPA start's timeout (I guess). DS itself has no problem to run with valgrind. But using "ipaclt start", I could not make the following KDC start successfully. I guess there's some trick to let it wait, but I gave it up there and did more research in the DS itself. I came to this conclusion in the 1.2.11 code, was to apply the change to the master, then found the same fix was there!! :)
Reviewed by Thierry (Thank you!!)
Pushed to 389-ds-base-1.2.11: 217ea08..265c6e3 389-ds-base-1.2.11 -> 389-ds-base-1.2.11 commit 265c6e399016ad4a46c8709d32367b9c30ea57cf
Metadata Update from @nhosoi: - Issue assigned to nhosoi - Issue set to the milestone: 1.2.11.33
389-ds-base is moving from Pagure to Github. This means that new issues and pull requests will be accepted only in 389-ds-base's github repository.
This issue has been cloned to Github and is available here: - https://github.com/389ds/389-ds-base/issues/1618
If you want to receive further updates on the issue, please navigate to the github issue and click on subscribe button.
subscribe
Thank you for understanding. We apologize for all inconvenience.
Metadata Update from @spichugi: - Issue close_status updated to: wontfix (was: Fixed)