core-js
core-js copied to clipboard
MDB_BAD_TXN error
having a i7-3770k and having the same issue with the skypool and sushipool miners....
Does this problem still occur in the lastest core version?
Yes
Can you confirm that it only happens with Windows 10 after update 1803 using WSL?
I can confirm the same
Yes it is happening of all of my devices on Windows WSL updated with 1803.
Apparently, Microsoft has broken cache coherency between read/write and mmap operations in its recent update.
Later today, I will release a temporary workaround that you can use when compiling Nimiq on WSL.
Please try using the code published on the branch paberr/wsl-workaround. Tell me if further issues exist.
{ Error: MDB_BAD_TXN: Transaction must abort, has a child, or is invalid
at LMDBBackend._get (/home/iteonix/core/node_modules/@nimiq/jungle-db/dist/lmdb.js:7166:42)
at LMDBBackend.getSync (/home/iteonix/core/node_modules/@nimiq/jungle-db/dist/lmdb.js:7368:28)
at LMDBBackend.get (/home/iteonix/core/node_modules/@nimiq/jungle-db/dist/lmdb.js:7392:21)
at ObjectStore.get (/home/iteonix/core/node_modules/@nimiq/jungle-db/dist/lmdb.js:3716:35)
at PeerKeyStore.get (/home/iteonix/core/dist/node.js:34689:28)
at DumbNetworkConfig._init (/home/iteonix/core/dist/node.js:33517:29)
at DumbNetworkConfig.initPersistent (/home/iteonix/core/dist/node.js:33495:20)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
at Function.Module.runMain (module.js:684:11) code: -30782 }```
I'm getting mdb corruption error, on master branch and branch paberr/wsl-workaround as well, trying to run core nodejs client under wsl.
change node_modules/@nimiq/jungle-db/package.json
line 4 to "main": "dist/leveldb.js",
That will do temp fix
It works!
Note that using levelDB instead can only be a temporary workaround, as it might result in "This method does not work reliably using LevelDB" errors when trying to retrieve transactions.
For completeness' sake, I did the work to diagnose this bug and notified Microsoft about it https://twitter.com/hyc_symas/status/1013800256088215552
Seems like this bug goes deep, its origin is in the Windows kernel: https://github.com/Microsoft/WSL/issues/3451#issuecomment-415251320
It's probably best to disable LMDB on WSL
Closing this stale issue.
For anyone experiencing this in the future, the fix is to update your system to WSL2, see https://github.com/Venemo/node-lmdb/issues/161#issuecomment-1118480146.