Parcel Build Crashes Due To Segmentation Faults
See original GitHub issue🐛 bug report
When running Parcel 2.2.1, the build fails with one of several error messages:
free(): invalid pointer
Segmentation fault
free(): double free detected in tcache 2
All of these errors occurred running the exact same command (parcel build) one after the other with no changes to the code.
🎛 Configuration (.babelrc, package.json, cli command)
Package.json:
{
"name": "furryfont",
"version": "1.0.0",
"source": "index.html",
"browserslist": "> 0.5%, last 2 versions, not dead",
"author": "anonusr",
"license": "AGPL-3.0-only",
"scripts": {
"start": "parcel",
"build": "parcel build",
"deploy": "echo 'furryfont.anonusr.org' > ./dist/CNAME && gh-pages -d dist"
},
"devDependencies": {
"gh-pages": "^3.2.3",
"parcel": "^2.2.0"
}
}
🤔 Expected Behavior
Parcel does not crash.
😯 Current Behavior
Parcel crashes. Here is one of the possible errors:
yarn run v1.22.5
$ parcel build --log-level verbose
✨ Built in 1.27s
dist/index.html 5.13 KB 783ms
free(): double free detected in tcache 2
Aborted
💻 Code Sample
The issue is happening for me with this code here: https://github.com/an0nusr/furryfont/commit/7e279a691c8faeeaac536debf3557b1ec838322c
The code is pretty simple - there’s no modules to bundle - just simple inline js in HTML.
Note: the yarn lockfile in that commit was using Parcel 2.2.0 - the issue occurs in 2.2.1
🌍 Your Environment
Software | Version(s) |
---|---|
Parcel | 2.2.1 |
Node | v12.22.7 |
npm/Yarn | yarn 1.22.5 |
Operating System | Ubuntu 18.04 |
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:10 (5 by maintainers)
Top Results From Across the Web
node.js - Parcel keeps throwing invalid parcel config or zsh ...
Whenever I use the command npx parcel src/index.html, I get a zsh: segmentation fault. No matter what, I cannot seem to build the...
Read more >Bug listing with status RESOLVED with resolution OBSOLETE ...
... Bug:177585 - "dev-java/fop-0.93 has package.use.masked doc on amd64 due to out of memory error" status:RESOLVED resolution:OBSOLETE severity:normal ...
Read more >How to Debug Node.js Segmentation Faults
You'll know this happens because node will hard crash, exiting silently without any kind of real stack trace, perhaps printing just segmentation fault...
Read more >ArcGIS Pro 3.0 Issues Addressed
BUG-000153572 Add additional crash dump error messaging for licensing issue ... BUG-000121423 In ArcGIS Pro, related records of a feature layer do not ......
Read more >Lumerical crashing on Centos
it opens for a second and then crashes with the following error: line 8: 231404 Segmentation fault (core dumped) ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think we narrowed this down to an upgrade of napi-rs in the
@parcel/source-map
package, which was released sometime after Parcel 2.2.1. I still don’t know the exact root cause, but for now I’ve reverted this upgrade and published@parcel/source-map
v2.0.2. See https://github.com/parcel-bundler/source-map/pull/91.You’ll need to remove
@parcel/source-map
2.0.1 from your lock file and re-install to get the upgrade. Please comment whether this works for you. Apologies again for the issue, and thanks for your patience while we track it down.Does it work for anyone if you set the
PARCEL_WORKER_BACKEND=process
environment variable?