-
Notifications
You must be signed in to change notification settings - Fork 221
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
dean's LMDB on windows crash #950
Comments
https://bugs.openldap.org/buglist.cgi?product=LMDB&component=liblmdb&resolution=--- is the LMDB bug tracker in case it helps. |
The crash is in running tests for
|
The failure occurs in WSL (Windows Subsystem for Linux), on master branch. |
https://wiki.ubuntu.com/WSL has some notes on WSL |
I found one bug filed against WSL that mentioned lmdb, maybe unrelated: microsoft/WSL#3451 |
I think that bug is unrelated, since we're not dealing with a zero length file here, but good to keep a pointer to it just in case. |
Appveyor is a windows CI platform Ilm using on other projects, and appveyor/ci#1295 describes something about maybe supporting WSL therein. |
CircleCI mentioned adding windows support: https://circleci.com/docs/2.0/hello-world-windows/ |
This is a temporary workaround for #950, and should be reverted (i.e. use LMDB unconditionally) when the LMDB crash on "Windows Subsystem for Linux" is fixed.
fix: cosmic-swingset: fall back to SimpleStore if LMDB doesn't work refs #950
this looks promising (WSL on appveyor): https://www.appveyor.com/blog/2019/10/11/vs2019-image-with-docker-wsl-preheated/ this might be a sample config: https://github.com/wslutilities/wslu/blob/master/appveyor.yml |
So I think we have finally tracked down the problem and killed it. Heres the story: LMDB has two different ways it can put stuff into its database file: writing to memory addresses that are mapped onto the file and by explicit I/O operations that write the file directly. In its normal operation, LMDB uses both of these techniques. Apparently, something about the WSL environment (perhaps the way it manages the Linux file system, which, it seems, is not However, in the file system that Dean's machine is using, memory corresponding to space beyond the length that the file was at the time However, if you write that page to the file via memory writes into the mapped address space, then it all works. LMDB in fact has a mode that's designed to work exactly that way, but it's turned off by default. The reason, apparently, is that LMDB is fundamentally a C/C++ API and the expectation is that you are going to be calling it from C or C++ code (which in fact we are too -- the glue code the realizes the Anyway, when we set that flag, Dean's crash test ran to completion on Dean's system instead of crashing, and all the It's a single line change to |
@dtribble experienced a crash as soon as swingset tried to read a key from the database
The text was updated successfully, but these errors were encountered: