Skip to content

Conversation

Kerollmops
Copy link
Member

@Kerollmops Kerollmops commented Jul 26, 2025

This PR exposes the bug found in LMDB when trying to read an encrypted database from multiple threads at the same time #336. When running the example in Rust debug I get the following error message which tends to say that the Rust std slice is not happy about the pointer and/or arroy length it receives in this function.

thread '<unnamed>' panicked at library/core/src/panicking.rs:218:5:
unsafe precondition(s) violated: slice::from_raw_parts requires the pointer to be aligned and non-null, and the total size of the slice not to exceed `isize::MAX`

I don't know if @hyc (👋), you have any clue, but it seems to me that the encrypted version of LMDB doesn't like parallel operations. Have I done something wrong somewhere when exposing this feature?

@Kerollmops Kerollmops added the bug Something isn't working label Jul 26, 2025
@hyc
Copy link

hyc commented Jul 26, 2025

I have no idea at the moment. Multithreaded reads works perfectly well with encryption in OpenLDAP slapd.

Have you tried testing with the example crypto.lm in the LMDB source?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants