-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
@parcel/workers: Invalid argument: MDB_BAD_RSLOT: Invalid reuse of reader #8165
Comments
same here. strange, because in my case it only occurs when running multiple parcel builds/watchers with concurrently and only for browser targets. e.g. i have an electron app - node targets: main, preload, browser: renderer
if i run build/watch commands one after one it works, but when i start everything in parallel the browser target is failing with "invalid argument" error every time. Ubuntu 20.0.4 works with same commands and configs with 2.5.0 |
cc @kriszyp (And sorry in advance for asking for your help two times in the last 24 hours) |
…an break the entire locking scheme, parcel-bundler/parcel#8165, #153, #164
tl;dr: I believe lmdb@2.4.5 should fix this. Thanks @KillerCodeMonkey for this great hint. I believe this may correspond to some other reports, but without any clear way to reproduce. However, running multiple parcel processes in parallel is indeed a surefire way to reproduce. And indeed, this is an issue with multiple process and multiple threads. Basically, when a thread opens the db file to check if it corresponds to another open db file, it was being opened with locks, and opening the same file with multiple lock handles in the same process basically breaks the entire locking scheme. This was fixed by doing this check with a standard read-only open call. |
Thanks everyone. A patch with a dependency update of lmdb@2.4.5 would fix this, am I right? |
@demonzoo That's about right (actually kind of the opposite a deadlock, a "no-lock", but yeah, a thread/locking issue). If you are able to manually upgrade/override the lmdb package to verify the fix, prior to the parcel devs committing the upgrade, I'm sure it would be appreciated, (if not possible, that's fine too). |
@kriszyp i can confirm: I manually replaced the linux binaries under |
Thank you, @KillerCodeMonkey . You've been really helpful. Much appreciated! |
Hey guys just to add, im still struggling with this issue... ive downgraded parcel to 2.2.1 which was the previous version of parcel i was on and im still getting the same issues :( If it helps, like @KillerCodeMonkey im using: electron but it seems im just stuck with this issue now. ive tried clearing parcel cache, deleting node_modules, deleting package-lock and the doing a fresh npm ci any other ideas? i cant exact do what @KillerCodeMonkey suggested with replacing the node_modules because the issue occurs in my ci/cd pipelines when packaging my electron app i did also try
Any help would be appreciated! |
@evergreen-arslaan-qadus the issue is open and not resolved. you need to stuck with v2.5.0. what i did was just a quick check if the newer lmbd version would fix the issue. thats it. you could try using yarn and set resolution of lmdb to v2.4.5 |
@evergreen-arslaan-qadus just to show you how it is done on some package managers (certainly not universal nor guaranteed to work):
(and I don't think you can do any overrides/resolutions with npm 6, not sure about 7). |
im on npm v7 and it looks like overrides is not supported @kriszyp :( I actually just managed to come up with a temp fix based off what @KillerCodeMonkey mentioned earlier in the thread, ive changed my build process to build my different render targets sequentially rather than in parallel. for me that fixes it. i did try to revert to older versions of parcel, i tried 2.5.0 and 2.2.1 (thats the previous one i was on) but for some reason i kept running into the same issue, locally and in my ci/cd pipeline build |
🐛 bug report
Build randomly failed after upgrading to Parcel 2.6.0
🎛 Configuration (.babelrc, package.json, cli command)
We do not have a babel configuration file in our project, I assume we are using the default config that ships with Parcel.
package.json
CLI commands:
or
🤔 Expected Behavior
Build should be successful
😯 Current Behavior
Build failed randomly. If we rerun, most of the time we'll be alright. But it will come again after a while in another CI run. Please refer to the attached stack trace.
💁 Possible Solution
A rerun would probably get around it temporarely.
We downgraded back to 2.5.0 and it's all working as expected
🔦 Context
When we run
parcel
command to bundle the frontend project, it failed to build.And it would also fail in our github actions CI
💻 Code Sample
This is the commands we use to trigger parcel:
Local env dev:
CI build:
🌍 Your Environment
The text was updated successfully, but these errors were encountered: