Skip to content
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

MDB_BAD_TXN error #387

Closed
dawk0 opened this issue May 1, 2018 · 16 comments
Closed

MDB_BAD_TXN error #387

dawk0 opened this issue May 1, 2018 · 16 comments

Comments

@dawk0
Copy link

dawk0 commented May 1, 2018

image

@dawk0
Copy link
Author

dawk0 commented May 1, 2018

having a i7-3770k and having the same issue with the skypool and sushipool miners....

@styppo
Copy link
Member

styppo commented Jun 23, 2018

Does this problem still occur in the lastest core version?

@vikneshvijayakumar
Copy link

Yes

@paberr
Copy link
Member

paberr commented Jun 28, 2018

Can you confirm that it only happens with Windows 10 after update 1803 using WSL?

@LTD-Dev
Copy link

LTD-Dev commented Jun 28, 2018

I can confirm the same

@vikneshvijayakumar
Copy link

Yes it is happening of all of my devices on Windows WSL updated with 1803.

@paberr
Copy link
Member

paberr commented Jul 2, 2018

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.

@paberr
Copy link
Member

paberr commented Jul 2, 2018

Please try using the code published on the branch paberr/wsl-workaround.
Tell me if further issues exist.

@LTD-Dev
Copy link

LTD-Dev commented Jul 2, 2018

{ 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 }```

@sOm2y
Copy link

sOm2y commented Jul 5, 2018

capture
I'm getting mdb corruption error, on master branch and branch paberr/wsl-workaround as well, trying to run core nodejs client under wsl.

@sOm2y
Copy link

sOm2y commented Jul 6, 2018

change node_modules/@nimiq/jungle-db/package.json line 4 to "main": "dist/leveldb.js",
That will do temp fix

@vikneshvijayakumar
Copy link

It works!

@paberr
Copy link
Member

paberr commented Jul 24, 2018

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.

@hyc
Copy link

hyc commented Oct 11, 2018

For completeness' sake, I did the work to diagnose this bug and notified Microsoft about it https://twitter.com/hyc_symas/status/1013800256088215552

@riptl
Copy link
Contributor

riptl commented Feb 7, 2019

Seems like this bug goes deep, its origin is in the Windows kernel: microsoft/WSL#3451 (comment)

It's probably best to disable LMDB on WSL

buybackoff added a commit to Spreads/Spreads.LMDB that referenced this issue Mar 28, 2019
CouldFindDupWideKey still fails in WSL even with WriteMap, but works fine in Docker.
@jeffesquivels
Copy link
Member

Closing this stale issue.

For anyone experiencing this in the future, the fix is to update your system to WSL2, see Venemo/node-lmdb#161 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants