#47803 syncrepl crash if attribute list is non-empty
Closed: wontfix None Opened 6 years ago by pspacek.

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.

Versions:
389-ds-base-1.3.2.16-1.fc20.x86_64
python-ldap-2.4.6-5.fc20.x86_64

I'm attaching my test script: Usage:

./syncrepl.py 'ldap://127.0.0.1/cn=dns,dc=ipa,dc=example?*?sub?(objectClass=*)?bindname=uid=admin%2ccn=users%2ccn=accounts%2cdc=ipa%2cdc=example,X-BINDPW=root4lab'

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.

This is reproducible on vm-151 in Brno.


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:
./syncrepl.py 'ldap://127.0.0.1/cn=dns,dc=ipa,dc=example??sub?(objectClass=*)?bindname=uid=admin%2ccn=users%2ccn=accounts%2cdc=ipa%2cdc=example,X-BINDPW=root4lab'

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
Updating 8d5410e..a81a3ea
Fast-forward
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)
To ssh://git.fedorahosted.org/git/389/ds.git
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)

3 years ago

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/1134

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)

2 months ago

Login to comment on this ticket.

Metadata