I encountered 389 crash during syncrepl session. I have used syncrepl client from python-ldap and I modified LDAP tree when the client was connected.
I'm attaching my test script: Usage:
It should print couple lines with Detected add of entry prefix. After that you has to modify a value in watched tree. It crashes in almost all cases.
Detected add of entry
This is reproducible on vm-151 in Brno.
thread apply all bt full
did the crash happen with 2 simultaneously running syncrepl.py scripts ?
In the stack I only see one sync_send_results and no thread indicates a crash, did DS crash or one of the clients ?
reproduced the crash, it crashes also with only on client at the second mod.
the crash is related to the use of attr in the ldapurl, changing the syncrepl call to:
did not trigger the crash, could you check if this works for you
It seems that your workaround works. Thank you!
The problem is that the pblock is copied, so that the connection is available in the persist phase. But the operation params were not duplicated, the new pblock just contained a reference.
So the serach attrs were freed when the original search completes, but the sync service just tried to access them via the pblock copy.
Need either do a full duplicate of the operation or save the search attr separately
I'm sorry for the confusion, I have fixed the ticket summary.
$ git merge ticket47803
ldap/servers/plugins/sync/sync.h | 1 +
ldap/servers/plugins/sync/sync_persist.c | 8 +++-----
ldap/servers/plugins/sync/sync_util.c | 16 +++++++++++++---
ldap/servers/slapd/operation.c | 38 ++++++++++++++++++++++++++++++++++++++
ldap/servers/slapd/pblock.c | 12 ++++++++++++
ldap/servers/slapd/slapi-plugin.h | 7 +++++++
6 files changed, 74 insertions(+), 8 deletions(-)
$ git push origin master
Counting objects: 25, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (13/13), done.
Writing objects: 100% (13/13), 2.23 KiB, done.
Total 13 (delta 10), reused 0 (delta 0)
8d5410e..a81a3ea master -> master
The additional coverity patch looks good to me.
Metadata Update from @lkrispen:
- Issue assigned to lkrispen
- Issue set to the milestone: 1.3.3 - 5/14 (May)
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:
If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.
Thank you for understanding. We apologize for all inconvenience.
Metadata Update from @spichugi:
- Issue close_status updated to: wontfix (was: Fixed)
to comment on this ticket.