Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assertion 'root > 1' failed in mdb_page_search() #130

Open
hermeGarcia opened this issue Aug 1, 2022 · 5 comments
Open

Assertion 'root > 1' failed in mdb_page_search() #130

hermeGarcia opened this issue Aug 1, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@hermeGarcia
Copy link

Hi there!
I am building a system that uses heed and while running some tests it prints the following and then crashes:

lmdb-sys/lmdb/libraries/lib:6637: Assertion 'root > 1' failed in mdb_page_search()

To me it is unclear why sometimes the error pops up and sometimes it does not. My tests are really simple, is just one thread storing data and reading it. Could someone explain to me what this error means?

@Kerollmops
Copy link
Member

Hey @hermeGarcia,

I would like to know if you can reproduce this bug consistently and if so, would you please share the code?
It looks like it is an internal assertion crash to prevent more dangerous bugs, it could be related to either a data corruption bug or also a bad usage of LMDB by heed.

@Kerollmops Kerollmops added the bug Something isn't working label Aug 23, 2022
@hermeGarcia
Copy link
Author

Hi!
I changed the approach a couple of days after reporting this bug, but I have been able to recover the part of the code that was giving problems. You can find it in this gist.
I was not able to reproduce the bug consistently, but the test was a single thread adding nodes, labelling them and doing several prefixed searches (at this point the panic appeared).

@Kerollmops
Copy link
Member

Hey!

Thank you very much, but would it be possible also to specify the main function that does what you describe?
Also, which version of heed are you using?

@hermeGarcia
Copy link
Author

I had the following in my Cargo.toml:
heed = { version = "0.11.0", default-features = false, features = ["lmdb", "sync-read-txn"] }
I also tried to use the github version instead of the crates.io one, the bug was still there.
With respect to the test that was causing problems you can find it here.

@Kerollmops
Copy link
Member

Hey @hermeGarcia,

Thank you for the failing test but there is too much code and deepness in it for me to debug, would it be possible to create a minimal reproducible test with only heed, please?

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

No branches or pull requests

2 participants