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

Segmentation fault in Node 22.7.0+ #9976

Open
louh opened this issue Oct 8, 2024 · 1 comment
Open

Segmentation fault in Node 22.7.0+ #9976

louh opened this issue Oct 8, 2024 · 1 comment

Comments

@louh
Copy link

louh commented Oct 8, 2024

🐛 bug report

When running parcel (either in build or watch mode) in Node 22.7.0 or later, the command will crash with a segmentation fault error.

🎛 Configuration (.babelrc, package.json, cli command)

n/a -- this occurs even on no configuration.

🤔 Expected Behavior

Application should build or run.

😯 Current Behavior

Parcel crashes:

➜  parcel-segfault node --version
v22.7.0
➜  parcel-segfault npx parcel src/index.html
(node:97502) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
Server running at http://localhost:1234
⠙ Building index.html...
node(97068,0x17455b000) malloc: Incorrect checksum for freed object 0x12793fc00: probably modified after being freed.
Corrupt value: 0x3131303865353330
node(97068,0x174967000) malloc: Incorrect checksum for freed object 0x13810b200: probably modified after being freed.
Corrupt value: 0x3131303865353330
node(97068,0x17455b000) malloc: *** set a breakpoint in malloc_error_break to debug
node(97068,0x174967000) malloc: *** set a breakpoint in malloc_error_break to debug
[1]    97046 segmentation fault  npx parcel src/index.html
➜  parcel-segfault nvm use 22.6.0
Now using node v22.6.0 (npm v10.8.2)
➜  parcel-segfault npx parcel src/index.html
(node:97502) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Server running at http://localhost:1234
✨ Built in 236ms

(I have also included a portion where downgrading to 22.6.0 demonstrates a working scenario.)

💁 Possible Solution

Unknown, but only workaround I have is to pin node versions on 22.6.0 or below for the time being.

🔦 Context

This occurs both building locally and this also fails when deploying on Heroku.

💻 Code Sample

This occurs for my own project, but I have also created a very basic test case using the quick-start instructions https://parceljs.org/getting-started/webapp/ -- which I am hosting here: https://github.com/louh/parcel-segfault

You can run this repository (make sure your local node version matches) with:

npm install
npx parcel src/index.html

Note that if you downgrade node to 22.6.0 the build will succeed as expected.

🌍 Your Environment

Software Version(s)
Parcel 2.12.0
Node 22.7.0
npm/Yarn 10.8.2
Operating System MacOSX Sonoma 14.6.1 and Heroku (NodeJS buildpack)
@louh
Copy link
Author

louh commented Oct 8, 2024

I have just noticed #9926. Related?

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

1 participant