MDB environment opened multiple times #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
While running the Pocket Archive test suite, the MDB environment is opened multiple times, possibly by the same process.
This is discouraged in the LMDB documentation:
The PKAR test suite is currently having double-free crashes and deadlocks on garbage collection, where the same environment is being closed multiple times.
l_store_new()should maintain a global map of MDB store IDs and handles so as to still allow opening multiple environments on different files, but returning the same handle of an open environment if this is opened more than once.Fixed by
be80a23f71.Not yet resolved. This change stores the memorized store handles in the registry, which is tied to the Lua state. When run on multiple files, busted seems to open multiple Lua states, which open overlapping MDB environments that are all garbage-collected at the end, still causing segfault.
The memorized handles should be stored in the global environment.
57f4a9b2c8effectively stores the handles in the globals table and now I can see busted only garbage collecting one store at the end. Segfault persists in PKAR but at this point I'll have to look elsewhere for the cause.