-
Notifications
You must be signed in to change notification settings - Fork 60
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
Possible memory leak on large data #11
Comments
Thank you for the report! It looks to me that the function in question ( Have you checked if this happens for other uses of the database, too? What if the database object is dropped explicitly? Other than that, I don't have a good clue right away. This looks like it could get interesting |
@dermesser Could you describe a little more about |
Just an idea, you can do this by creating the database object in its own function or scope, inside of where you create it currently. This is unlikely to change anything, though - just a shot in the dark. |
@dermesser Anyways will try, thanks! upd: same behaviour ;( |
@dermesser additional Each outer iteration of calling
|
@dermesser Unlikely #12 is related to current issue, leak is still there Prob related rust-lang/rust#60114 |
yeah I didn't think it was, anyway. I guess at the time (a few years back) I relied too much on safety promises etc. that I didn't bother using memcheck enough :) |
I also opened #13 for this. Given that memory leaks can end up having unforeseen areas of impact, it may (hopefully) occur that one I fix there will solve this issue. In the meantime, if you find some time on your hands, please feel free to search as well :) Although I understand if you don't want to dive in a deep unfamiliar codebase |
@dermesser I've already done some researches, firstly trying to use |
I see - thank you for investing such an effort here! I've also checked some basics; after removing one faulty (and unneeded) Drop implementation yesterday, there are only two implementations left, and one of them seems completely harmless. As you've noticed before, there is a lot of |
@dermesser I found few possible circular references, but idk yet how to fix it properly. |
|
Well, i don't quite understand how it works for now (and obv reasons) just because im not so strong with rust, but very curious. I think straight-forwarding investigation with |
I found strange behaviour with this method https://github.com/dermesser/leveldb-rs/blob/master/src/table_reader.rs#L42
Probably ref cycle?
Code sample on repr:
Related valgrind output:
Any thoughts?
The text was updated successfully, but these errors were encountered: