Internal range searches using OP_FLAG_REVERSE_CANDIDATE_ORDER, that do not find any entries, can crash the server in ldbm_search().
This crash can not be reproduced externally. It was discovered while working on ticket 47819 which added an internal range search using the reverse candidates flag.
attachment 0001-Ticket-47858-Internal-searches-using-OP_FLAG_REVERSE.patch
git merge ticket47858 Updating 6d38125..e6cee31 Fast-forward ldap/servers/slapd/back-ldbm/ldbm_search.c | 2 +-
git push origin master 6d38125..e6cee31 master -> master
commit e6cee31aa2beb6496df86490776f1f93d3a8348b Author: Mark Reynolds mreynolds@redhat.com Date: Mon Jul 14 10:47:52 2014 -0400
Hi Mark,
Is this bug introduced with #47767, where OP_FLAG_REVERSE_CANDIDATE_ORDER flag is newly defined?
Replying to [comment:4 nhosoi]:
Hi Mark, Is this bug introduced with #47767, where OP_FLAG_REVERSE_CANDIDATE_ORDER flag is newly defined?
Yes it was. I only found the crash when I created an internal range search for ticket 47819. So there is no "real" regression at this point in time. As this was committed before ticket 47819 was - so no one is doing internal range searches (with reverse candidate ordering). The only way to verify this fix is to run the ticket47819_test.py script.
88aa59f..da318fa 389-ds-base-1.3.2 -> 389-ds-base-1.3.2 commit da318fa5f147e229069b13c0479fdf81ccc28213
45dcda2..722117e 389-ds-base-1.3.1 -> 389-ds-base-1.3.1 commit 722117e12de543a3a66695e795e32f55435779ec
1dbf87a..7dc69db 389-ds-base-1.2.11 -> 389-ds-base-1.2.11 commit 7dc69db08c6949ec43a55058e2318158d023770c
attachment 0001-Ticket-47858-Add-test-case-for-nsTombstone.patch
The code looks good and has my ack. I want to confirm that "without" the patch this causes the crash 100% of the time, and that with the patch this test passes? If that is the case, ack and commit!
By Mark information, it is enough to check a tombstone purge operation, because during this the internal search with OP_FLAG_REVERSE_CANDIDATE_ORDER flag happens.
P.S. I've checked 6.9 with an old build (72), but no crash has happened. Maybe it is not 100% reproducible...
I've pushed it for now, because it is basic tombstone test suite functionality. We always can add more test cases.
To ssh://git.fedorahosted.org/git/389/ds.git 8cda4b1..c3a940c master -> master commit c3a940c60c9886a0f6658af0e368227536ef3738 Author: Simon Pichugin spichugi@redhat.com Date: Wed Dec 14 11:17:05 2016 +0100
Metadata Update from @nhosoi: - Issue assigned to mreynolds - Issue set to the milestone: 1.2.11.30
Simon can this be closed?
Metadata Update from @mreynolds: - Custom field reviewstatus reset - Issue close_status updated to: None
Metadata Update from @mreynolds: - Issue close_status updated to: fixed - Issue status updated to: Closed (was: Open)
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/1189
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)