https://bugs.openldap.org/show_bug.cgi?id=10615
Issue ID: 10615 Summary: Stale reads with nested LMDB transactions on OpenBSD Product: LMDB Version: unspecified Hardware: Other OS: Other Status: UNCONFIRMED Keywords: needs_review Severity: normal Priority: --- Component: liblmdb Assignee: bugs@openldap.org Reporter: wiesche89@googlemail.com Target Milestone: ---
On OpenBSD 7.9, LMDB reads can return stale data after writes through the file descriptor when using nested transactions
Reproduced with heed 0.22.1 and lmdb-master-sys 0.2.6
Adding msync(..., MS_INVALIDATE) after data and metadata writes fixes it in my tests MDB_WRITEMAP also avoids it, but does not support nested write transactions
Proposed fix: https://github.com/meilisearch/lmdb/pull/5
Backport: https://github.com/wiesche89/lmdb/commit/52b4d64d5ab39952a4105151fd3b454019d...
Reported here: https://github.com/meilisearch/heed/issues/383
https://bugs.openldap.org/show_bug.cgi?id=10615
Howard Chu hyc@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |IN_PROGRESS Assignee|bugs@openldap.org |hyc@openldap.org Ever confirmed|0 |1 Hardware|Other |All
--- Comment #1 from Howard Chu hyc@openldap.org --- Fixed differently here
https://git.openldap.org/openldap/openldap/-/merge_requests/935
I don't have any OpenBSD machines to test on so please verify and confirm, thanks.
https://bugs.openldap.org/show_bug.cgi?id=10615
--- Comment #2 from wiesche wiesche89@googlemail.com --- Thanks Howard, tested on OpenBSD 7.9. The reproducer fails without your fix and passes with it. Thanks for the quick fix
https://bugs.openldap.org/show_bug.cgi?id=10615
Howard Chu hyc@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|IN_PROGRESS |RESOLVED Resolution|--- |TEST
--- Comment #3 from Howard Chu hyc@openldap.org --- fixed in git
https://bugs.openldap.org/show_bug.cgi?id=10615
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords|needs_review | Target Milestone|--- |0.9.36
--- Comment #4 from Quanah Gibson-Mount quanah@openldap.org --- mdb.master:
2a3df930 by Howard Chu at 2026-10-09T21:35:47+01:00
ITS#10615 lmdb: minor cleanup
PWRITEV actually broken by ITS#10054
mdb.RE/0.9
0d8d5885 by Howard Chu at 2026-10-09T21:37:38+01:00
ITS#10615 lmdb: minor cleanup
PWRITEV actually broken by ITS#10054
mdb.master3:
2a3df930 by Howard Chu at 2026-10-09T21:35:47+01:00
ITS#10615 lmdb: minor cleanup
PWRITEV actually broken by ITS#10054
mdb.RE/1.0:
b65d9dc4 by Howard Chu at 2026-10-09T21:39:07+01:00
ITS#10615 lmdb: minor cleanup
PWRITEV actually broken by ITS#10054
https://bugs.openldap.org/show_bug.cgi?id=10615
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |VERIFIED Resolution|TEST |FIXED
https://bugs.openldap.org/show_bug.cgi?id=10615
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|0.9.36 |0.9.37