-
Notifications
You must be signed in to change notification settings - Fork 87
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
segment fault #21
Comments
Hi @zhangsoledad, I think we'll need more information to get to the bottom of this. If at all possible, could you reduce this to a reproducible test case? Also, the following will be helpful:
|
@danburkert |
Thanks, @zhangsoledad, that's perfect. I'm going to be very busy over then next few days so I may not be able to get to the bottom of this immediately, but with your working repro I'm confident I will be able to eventually. |
I was able to get a bit of time to see what is going on here. I further simplified your example, which I pushed to my fork. That example is segfaulting with the following stacktrace:
It segfaults consistently on the 15th inserted item, on this line. It segfaults on Linux with GCC 7.1. Given all of this, I'm inclined to believe this issue is a miscompilation of lmdb with newer GCC versions. @zhangsoledad what platform and compiler are you using? Next steps would be to translate the simplified example to c, and if it still manifests, issue a bug against lmdb. |
@danburkert I specified opt_level 2 in my fork, it work fine. |
Interesting, thanks for the links. LMDB does indeed default to O2, so I suppose we should follow suit. Doesn't give me a warm and fuzzy feeling about lurking issues in LMDB, though... |
LMDB segfaults reliably with newer GCC versions when compiled with O3. Regression test included. fixes #21
LMDB segfaults reliably with newer GCC versions when compiled with O3. Regression test included. fixes #21
Should be fixed in 0.7.2. Thanks for the thorough report! |
My apologies for barging in. I wanted to take a peek at the source code for Add
Also see OpenLDAP Issue 8989. |
update minor version for breaking change in danburkert#14
stable rustc 1.19.0 (0ade33941 2017-07-17)
Database
andEnvironment
marked asSync
andSend
, assume to be thread safe,but in my application, concurrent put cause ”segment fault“ as above,have any idea about it?
this is my code
The text was updated successfully, but these errors were encountered: