parcel: Segmentation fault (core dumped)
I have a consistant segfault on cold builds, it’s reproducible: https://github.com/GauBen/gauben.github.io/runs/2025608512
When the cache folder exists, there is no such problem: https://github.com/GauBen/gauben.github.io/runs/2025668435
How to reproduce
Versions: node v15.11.0, yarn v1.22.5, parcel v2.0.0-nightly.612
git clone git@github.com:GauBen/gauben.github.io.git
yarn
yarn build
Current workaround
git clone git@github.com:GauBen/gauben.github.io.git
yarn
yarn build || yarn build
(Only the first one segfaults)
Package.json: https://github.com/GauBen/gauben.github.io/blob/source/package.json
_Originally posted by @GauBen in https://github.com/parcel-bundler/parcel/issues/5773#issuecomment-790521457_
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 5
- Comments: 40 (13 by maintainers)
Commits related to this issue
- Potential fix for build failures https://github.com/parcel-bundler/parcel/issues/5961 — committed to samkingco/samking.co by samkingco 3 years ago
- Made parcel command a little more reliable Seems like we see a bunch of segfaults in parcel: https://github.com/parcel-bundler/parcel/issues/5961 — committed to connectrpc/examples-es by paul-sachs 9 months ago
Btw, another workaround is to use
PARCEL_WORKER_BACKEND=processwhich uses processes instead of threads for workers. I confirmed this works on Vercel.The fix in #7001 appears to work on Vercel without any workaround. 🥳 It’s available in the latest nightly release. Hope it works for other setups as well.
Ubuntu 20.04.1 LTS
Doesn’t happen with
PARCEL_WORKERS=0Segmentation Fault happened here when i added image resizing:
PARCEL_WORKERS=0 npm startsolved it.I’ve reduced this to a bug in Rust, combined with a bug in glibc. It is fixed in newer versions, but it is impossible to upgrade on CentOS 7 without upgrading the whole OS. I’m hoping the bug in Rust can be fixed to support older glibc versions. In the meantime, I am trying to find a workaround. See https://github.com/rust-lang/rust/issues/91979.
We upgraded
sharpto the latest version in #6565. Should be released in the next nightly in about 18 hours. Perhaps that will help. Please report back if you test it.I have not seen this issue again after I set
PARCEL_WORKERS=0Same issue here when building on Vercel
It exists in Parcel 1 and 2.
https://github.com/parcel-bundler/parcel/blob/ff6b7b4e97f95d8aabe3a93c22ec30f96b0fbf15/packages/core/workers/src/WorkerFarm.js#L569-L571