Issue 8542 - mdb_dbi_open() can break mainDB cursors
Summary: mdb_dbi_open() can break mainDB cursors
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-10 08:11 UTC by Hallvard Furuseth
Modified: 2018-02-09 18:59 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Hallvard Furuseth 2016-12-10 08:11:58 UTC
Full_Name: Hallvard B Furuseth
Version: LMDB_0.9.18
OS: 
URL: ftp://ftp.openldap.org/incoming/Hallvard-Furuseth-161210.c
Submission from: (NULL) (81.191.45.31)
Submitted by: hallvard


...because mdb_dbi_open() does not track its cursor.  Demo enclosed.

Fix: Put the mdb_cursor_put() in WITH_CURSOR_TRACKING(mc, ...).

I do wonder why failing to track one cursor apparently breaks another
cursor, instead of the un-tracked one.  Though maybe the un-tracked
cursor is broken, and writing through it goes to the wrong place.
Comment 1 Hallvard Furuseth 2016-12-10 08:20:03 UTC
changed notes
changed state Open to Test
moved from Incoming to Software Bugs
Comment 2 OpenLDAP project 2018-02-09 18:59:05 UTC
Fixed in mdb.master
Fixed in 0.9.19
Comment 3 Quanah Gibson-Mount 2018-02-09 18:59:05 UTC
changed notes
changed state Test to Closed