-
-
Notifications
You must be signed in to change notification settings - Fork 111
mdbx_env_open() error "Invalid argument" on WSL (Windows Subsystem for Linux) #97
Comments
This is a valid Doest the |
make check also fails with the same error
The problem is in WSL. Simila things here |
Oh, WSL is mad and trouble full. For my part, I will try to add a check of WSL to prevent data loss. |
@oleg-kiriyenko, could you clarify - does you using WSL or WSL2? |
Simple WSL. As far as I know WSL2 uses virtual machine which is not my case. |
@oleg-kiriyenko, in fact you can use libmdbx on WSL with some restrictions:
|
Sorry for bringing this back to life but trying to build libmdbx with
I'm on WSL 2 |
@AndreaLanfranchi, libmdbx should run under WLS2 out-of-the box since no reasons against this. |
The most likely causes of problems are:
|
@erthink thank you very much for your response.
Unless I'm reading mistankenly this libmdbx detects WSL on behalf of this where basically the check is to look for either "Microsoft" or "WSLx" in the string reported by the equivalent linux command
I'm on your side in embracing a safe position on panicing mdbx on detection of WSL (any) as I dug a lot on finding a proper way to detect WSL version. As far as I understand the linux kernels are the same for WSL1 and WSL2 and what differs is how the host (Windows 10 in this case) handles the virtualized env (in WSL2 there's a managed VM) I'll report the output from tests you mentioned |
mdbx_chk -V
./mdbx_chk -vv
uname -a
|
This instead with
|
FYI I'm with turbo-geth team (now erigon) |
Should it be of any help is possible to invoke a windows command from within the linux shell.
Apologies for italian output |
No-no, this is inappropriate way:
|
@AndreaLanfranchi, Please check the fix and either close the issue or I'll dig further (but later). |
@erthink thank you I will try ASAP. |
AFAIK, in this case you're will get the 4.4.x kernel back. |
So without
While instead with
I interrupted it as the db is huge |
@AndreaLanfranchi, please show |
Here are the Windows partitions auto mounted by WSL2 in linux environment
|
I need to know the filesystem type visible from inside WSL2 to add it to the |
It is |
|
MS doc about DrvFS |
Thanks.
The problem with OFD-locks (probably) can be workarounded, but I'm not at all sure Devfs will work stably and will not destroy your data. |
Thank you. All your comments make perfectly sense. |
After consulting with colleagues using WSL2, I decided to allow a database to be opened on 9P/WSL2 filesystem in exclusive mode. So you can use the mounted disk if you add the |
Thank you. |
Today. |
Ubuntu 18.04/clang-9
Got
But database files were created:
Corresponding part of strace output
The text was updated successfully, but these errors were encountered: