#50671 Ticket 50659 AddressSanitizer: SEGV ... in bdb_pre_close
Closed by spichugi. Opened by lkrispen.
lkrispen/389-ds-base t50659  into  master

Download 50671.patch

Bug: The crash reported is caused by calling dblayer_close twice in some
offline exec modes. Investigating the crash revealed another crash
in dbverify and memory leaks, one introduced by the backend
patch, two existing previously

Fix: - call dblayer_close only once
- initialize db env properly in dbverify execmode
- don't set sdn by reference when adding to entrydncache
- free collected instances from commandline in dbupgrade mode
- free bdb env in index mode

Reviewed by: ?

rebased onto 4adca4e7d4ac24611b1a209f9fb49b302c5f3176

Looks reasonable to me, my only question is about the removal of dblayer_close()? Is this closed elsewhere?

Looks reasonable to me, my only question is about the removal of dblayer_close()? Is this closed elsewhere?

yes. and that has caused the crash, trying to free it twice. In the reported scenario it is also called in bdb_upgradedb() and in general it is called above import_main_offline()

Ack from me then, this all makes sense.

rebased onto b77f04af0a3fcdf442208af811e5307cd9b5c6bc

Pull-Request has been merged by lkrispen

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 pull request has been cloned to Github as issue and is available here:
- https://github.com/389ds/389-ds-base/issues/3726

If you want to continue to work on the PR, please navigate to the github issue,
download the patch from the attachments and file a new pull request.

Thank you for understanding. We apologize for all inconvenience.

Pull-Request has been closed by spichugi

Metadata