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 (core dumped) #5961

Closed
mischnic opened this issue Mar 4, 2021 · 40 comments · Fixed by #7001
Closed

Segmentation fault (core dumped) #5961

mischnic opened this issue Mar 4, 2021 · 40 comments · Fixed by #7001

Comments

@mischnic
Copy link
Member

mischnic commented Mar 4, 2021

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 [email protected]:GauBen/gauben.github.io.git
yarn
yarn build

Current workaround

git clone [email protected]: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 #5773 (comment)

@mischnic
Copy link
Member Author

mischnic commented Mar 4, 2021

Ubuntu 20.04.1 LTS

Thread 12 "node" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffdddb9700 (LWP 9066)]
0x00007fffc74d2cd0 in ?? ()
(gdb) bt
#0  0x00007fffc74d2cd0 in ?? ()
#1  0x00007ffff7c4d5a1 in __nptl_deallocate_tsd () at pthread_create.c:301
#2  0x00007ffff7c4e62a in __nptl_deallocate_tsd () at pthread_create.c:256
#3  start_thread (arg=<optimized out>) at pthread_create.c:488
#4  0x00007ffff7b75293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Doesn't happen with PARCEL_WORKERS=0

@alexreardon
Copy link

alexreardon commented Mar 31, 2021

I am also seeing the error "Segmentation fault" with node 14.15.0 running on [email protected]

@mischnic
Copy link
Member Author

What OS are you on?

Can you run try running gdb --args $(which node) ./node_modules/.bin/parcel build index.html (or whatever your entry is) and then typing run, waiting for it to segfault, then typing bt (like in my previous comment)?

@alexreardon
Copy link

OS: macOS Big Sur 11.2.3

My issue is intermittent. It occurs maybe 1/10 of clean builds

@alexreardon
Copy link

The issue also occurs on vercel which is running node 14.x (issue also occurred with node 12.x)

@GauBen
Copy link

GauBen commented Apr 21, 2021

The issue does not still occurs on node 16.0.0 (on this repository at least)

Sorry for the heads up, I bumped my node version and thought it worked

@tad-lispy
Copy link

I got similar issue on NixOS with Node.js 14.16.0 and 16.2.0. Works fine with PARCEL_WORKERS=0.

My gdb session
$ node --version
v16.2.0

$ cat package.json
...
  "devDependencies": {
    "@parcel/transformer-coffeescript": "^2.0.0-nightly.681",
    "@parcel/transformer-image": "^2.0.0-nightly.2303",
    "@parcel/transformer-pug": "^2.0.0-nightly.681",
    "@parcel/transformer-sass": "^2.0.0-nightly.681",
    "coffeescript": "^2.5.1",
    "jstransformer-markdown-it": "^2.1.0",
    "marked": "^0.6.3",
    "parcel": "^2.0.0-nightly.679",
    "pug": "^2.0.3",
    "sass": "^1.32.8"
  },
  "dependencies": {
    "bootstrap": "^4.6.0"
  }
...

$ gdb --args $(which node) ./node_modules/.bin/parcel build src/index.pug
GNU gdb (GDB) 10.2
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /nix/store/j6pwhafi3izmzcvgp8aagjbz3w5m3sdf-nodejs-16.2.0/bin/node...
(No debugging symbols found in /nix/store/j6pwhafi3izmzcvgp8aagjbz3w5m3sdf-nodejs-16.2.0/bin/node)
(gdb) run
Starting program: /nix/store/j6pwhafi3izmzcvgp8aagjbz3w5m3sdf-nodejs-16.2.0/bin/node ./node_modules/.bin/parcel build src/index.pug
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/nix/store/sbbifs2ykc05inws26203h0xwcadnf0l-glibc-2.32-46/lib/libthread_db.so.1".
[New Thread 0x7ffff564d640 (LWP 21590)]
[New Thread 0x7fffebfff640 (LWP 21591)]
[New Thread 0x7fffe7ffe640 (LWP 21592)]
[New Thread 0x7fffe3ffd640 (LWP 21593)]
[New Thread 0x7fffdfffc640 (LWP 21594)]
[New Thread 0x7ffff164c640 (LWP 21595)]
[Detaching after fork from child process 21596]
[New Thread 0x7fffc3fff640 (LWP 21597)]
[New Thread 0x7fffbfffe640 (LWP 21598)]
[New Thread 0x7fffbbffd640 (LWP 21599)]
[New Thread 0x7fffb7ffc640 (LWP 21600)]
[Detaching after fork from child process 21601]
[New Thread 0x7ffff13f1640 (LWP 21606)]
[New Thread 0x7ffff0ff0640 (LWP 21607)]
[New Thread 0x7ffff0bef640 (LWP 21608)]
[New Thread 0x7ffff07ee640 (LWP 21609)]
[Detaching after fork from child process 21610]
[Detaching after fork from child process 21611]
[Detaching after fork from child process 21612]
[Detaching after fork from child process 21613]
⠙ Building style.scss...
[New Thread 0x7fff93fff640 (LWP 21614)]
[New Thread 0x7fff8fffe640 (LWP 21615)]
[New Thread 0x7fff87ffc640 (LWP 21617)]
[New Thread 0x7fff8bffd640 (LWP 21616)]
[New Thread 0x7fff63fff640 (LWP 21618)]
[New Thread 0x7fff5bffd640 (LWP 21620)]
[New Thread 0x7fff5fffe640 (LWP 21619)]
[New Thread 0x7fff4fffc640 (LWP 21621)]
[New Thread 0x7fff4bffb640 (LWP 21622)]
[New Thread 0x7fff3ffff640 (LWP 21623)]
[New Thread 0x7fff2bfff640 (LWP 21624)]
[New Thread 0x7fff27ffe640 (LWP 21626)]
[New Thread 0x7fff23ffd640 (LWP 21625)]
[New Thread 0x7fff1fffc640 (LWP 21628)]
[New Thread 0x7fff1bffb640 (LWP 21627)]
[New Thread 0x7fff03fff640 (LWP 21629)]
[New Thread 0x7ffeffffe640 (LWP 21630)]
[New Thread 0x7ffef3ffd640 (LWP 21631)]
[New Thread 0x7ffee7fff640 (LWP 21632)]
[New Thread 0x7ffedbffe640 (LWP 21633)]
[New Thread 0x7ffecfffd640 (LWP 21634)]
[New Thread 0x7ffebbfff640 (LWP 21635)]
[New Thread 0x7ffeb7ffe640 (LWP 21636)]
[New Thread 0x7ffeb3ffd640 (LWP 21637)]
[New Thread 0x7ffeabffc640 (LWP 21638)]
[New Thread 0x7ffe93ffe640 (LWP 21639)]
⠹ Building style.scss...
[New Thread 0x7ffe8fffd640 (LWP 21642)]
[New Thread 0x7ffe8bffc640 (LWP 21641)]
[New Thread 0x7ffe6bffe640 (LWP 21644)]
[New Thread 0x7ffe6ffff640 (LWP 21643)]
[New Thread 0x7ffe67ffd640 (LWP 21645)]
[New Thread 0x7ffe5bfff640 (LWP 21646)]
[New Thread 0x7ffe57ffe640 (LWP 21647)]
[New Thread 0x7ffe43fff640 (LWP 21648)]
⠼ Building style.scss...
[New Thread 0x7ffe23fff640 (LWP 21650)]
[New Thread 0x7ffe1fffe640 (LWP 21651)]
[New Thread 0x7ffe13fff640 (LWP 21652)]
[New Thread 0x7ffe07ffe640 (LWP 21653)]
[New Thread 0x7ffdfbfff640 (LWP 21654)]
[New Thread 0x7ffdf7ffe640 (LWP 21655)]
[New Thread 0x7ffde3fff640 (LWP 21656)]
[New Thread 0x7ffddfffe640 (LWP 21657)]
[New Thread 0x7ffdd3ffd640 (LWP 21658)]
[New Thread 0x7ffdcfffc640 (LWP 21659)]
[New Thread 0x7ffdbbfff640 (LWP 21660)]
[New Thread 0x7ffdb7ffe640 (LWP 21661)]
[New Thread 0x7ffdabffd640 (LWP 21662)]
[New Thread 0x7ffda7ffc640 (LWP 21663)]
[New Thread 0x7ffd93fff640 (LWP 21664)]
[New Thread 0x7ffd8fffe640 (LWP 21665)]
[New Thread 0x7ffd83fff640 (LWP 21666)]
⠴ Building style.scss...
[New Thread 0x7ffd6bfff640 (LWP 21668)]
[New Thread 0x7ffd5fffe640 (LWP 21669)]
[New Thread 0x7ffd5bffd640 (LWP 21670)]
[New Thread 0x7ffd47fff640 (LWP 21671)]
[New Thread 0x7ffd43ffe640 (LWP 21672)]
[New Thread 0x7ffd37fff640 (LWP 21673)]
[New Thread 0x7ffd2bfff640 (LWP 21674)]
[New Thread 0x7ffd1fffe640 (LWP 21675)]
[New Thread 0x7ffd13fff640 (LWP 21676)]
[New Thread 0x7ffd07ffe640 (LWP 21677)]
[New Thread 0x7ffcfbfff640 (LWP 21678)]
[New Thread 0x7ffceffff640 (LWP 21679)]
[New Thread 0x7ffce3fff640 (LWP 21680)]
[New Thread 0x7ffcd7fff640 (LWP 21681)]
[New Thread 0x7ffccbffe640 (LWP 21682)]
[New Thread 0x7ffcbffff640 (LWP 21683)]
[New Thread 0x7ffcb3fff640 (LWP 21684)]
[New Thread 0x7ffca7fff640 (LWP 21685)]
[New Thread 0x7ffc9bfff640 (LWP 21686)]
[New Thread 0x7ffc8ffff640 (LWP 21687)]
[New Thread 0x7ffc83fff640 (LWP 21688)]
[New Thread 0x7ffc7fffe640 (LWP 21689)]
[New Thread 0x7ffc6bfff640 (LWP 21690)]
[New Thread 0x7ffc67ffe640 (LWP 21691)]
[New Thread 0x7ffc5bfff640 (LWP 21692)]
[New Thread 0x7ffc4ffff640 (LWP 21693)]
[New Thread 0x7ffc43fff640 (LWP 21694)]
[New Thread 0x7ffc37fff640 (LWP 21695)]
[New Thread 0x7ffc2bfff640 (LWP 21696)]
[New Thread 0x7ffc1ffff640 (LWP 21697)]
[New Thread 0x7ffc13fff640 (LWP 21698)]
[New Thread 0x7ffc07fff640 (LWP 21699)]
[New Thread 0x7ffbfbfff640 (LWP 21700)]
[New Thread 0x7ffbeffff640 (LWP 21701)]
[New Thread 0x7ffbe3fff640 (LWP 21702)]
[New Thread 0x7ffbd7fff640 (LWP 21703)]
[New Thread 0x7ffbd3ffe640 (LWP 21704)]
[Thread 0x7ffbd7fff640 (LWP 21703) exited]
[Thread 0x7ffbd3ffe640 (LWP 21704) exited]
[New Thread 0x7ffbc7fff640 (LWP 21705)]
[Thread 0x7ffbc7fff640 (LWP 21705) exited]
[Thread 0x7ffc43fff640 (LWP 21694) exited]
[Thread 0x7ffc13fff640 (LWP 21698) exited]
[Thread 0x7ffc07fff640 (LWP 21699) exited]
[Thread 0x7ffc37fff640 (LWP 21695) exited]
[Thread 0x7ffc4ffff640 (LWP 21693) exited]
[Thread 0x7ffc5bfff640 (LWP 21692) exited]
[Thread 0x7ffc67ffe640 (LWP 21691) exited]
[Thread 0x7ffc6bfff640 (LWP 21690) exited]
[Thread 0x7ffc83fff640 (LWP 21688) exited]
[Thread 0x7ffc8ffff640 (LWP 21687) exited]
[Thread 0x7ffc9bfff640 (LWP 21686) exited]
[Thread 0x7ffca7fff640 (LWP 21685) exited]
[Thread 0x7ffcb3fff640 (LWP 21684) exited]
[Thread 0x7ffc2bfff640 (LWP 21696) exited]
[Thread 0x7ffc1ffff640 (LWP 21697) exited]
[Thread 0x7ffc7fffe640 (LWP 21689) exited]
[Thread 0x7ffebbfff640 (LWP 21635) exited]
[Thread 0x7ffef3ffd640 (LWP 21631) exited]
[Thread 0x7ffeb3ffd640 (LWP 21637) exited]
[Thread 0x7ffedbffe640 (LWP 21633) exited]
[Thread 0x7fff03fff640 (LWP 21629) exited]
[Thread 0x7fff1fffc640 (LWP 21628) exited]
[Thread 0x7fff27ffe640 (LWP 21626) exited]
[Thread 0x7fff3ffff640 (LWP 21623) exited]
[Thread 0x7fff4fffc640 (LWP 21621) exited]
[Thread 0x7ffe5bfff640 (LWP 21646) exited]
[Thread 0x7ffe8fffd640 (LWP 21642) exited]
[Thread 0x7ffe43fff640 (LWP 21648) exited]
[Thread 0x7ffe6bffe640 (LWP 21644) exited]
[Thread 0x7ffe93ffe640 (LWP 21639) exited]
[Thread 0x7fff5bffd640 (LWP 21620) exited]
[Thread 0x7fff63fff640 (LWP 21618) exited]
[Thread 0x7fff87ffc640 (LWP 21617) exited]
[Thread 0x7fff8fffe640 (LWP 21615) exited]
[Thread 0x7ffd47fff640 (LWP 21671) exited]
[Thread 0x7ffcd7fff640 (LWP 21681) exited]
[Thread 0x7ffccbffe640 (LWP 21682) exited]
[Thread 0x7ffceffff640 (LWP 21679) exited]
[Thread 0x7ffcfbfff640 (LWP 21678) exited]
[Thread 0x7ffd13fff640 (LWP 21676) exited]
[Thread 0x7ffd1fffe640 (LWP 21675) exited]
[Thread 0x7ffd43ffe640 (LWP 21672) exited]
[Thread 0x7ffd5bffd640 (LWP 21670) exited]
[Thread 0x7ffd5fffe640 (LWP 21669) exited]
[Thread 0x7ffce3fff640 (LWP 21680) exited]
[Thread 0x7ffcbffff640 (LWP 21683) exited]
[Thread 0x7ffd6bfff640 (LWP 21668) exited]
[Thread 0x7ffd07ffe640 (LWP 21677) exited]
[Thread 0x7ffd2bfff640 (LWP 21674) exited]
⠦ Building style.scss...
[Thread 0x7ffe67ffd640 (LWP 21645) exited]
[Thread 0x7ffe3fffe640 (LWP 21649) exited]
[Thread 0x7ffe8bffc640 (LWP 21641) exited]
[Thread 0x7ffe97fff640 (LWP 21640) exited]
[Thread 0x7ffe6ffff640 (LWP 21643) exited]
[Thread 0x7ffe57ffe640 (LWP 21647) exited]
[Thread 0x7ffeabffc640 (LWP 21638) exited]
[Thread 0x7ffeb7ffe640 (LWP 21636) exited]
[Thread 0x7ffecfffd640 (LWP 21634) exited]
[Thread 0x7ffee7fff640 (LWP 21632) exited]
[Thread 0x7ffeffffe640 (LWP 21630) exited]
[Thread 0x7fff1bffb640 (LWP 21627) exited]
[Thread 0x7fff23ffd640 (LWP 21625) exited]
[Thread 0x7fff2bfff640 (LWP 21624) exited]
[Thread 0x7fff4bffb640 (LWP 21622) exited]
[Thread 0x7fff5fffe640 (LWP 21619) exited]
[Thread 0x7fff8bffd640 (LWP 21616) exited]
⠧ Building style.scss...
[New Thread 0x7fff93fff640 (LWP 21706)]
[New Thread 0x7fff8fffe640 (LWP 21707)]
[New Thread 0x7fff8bffd640 (LWP 21708)]
[New Thread 0x7fff87ffc640 (LWP 21709)]
[New Thread 0x7fff63fff640 (LWP 21710)]
[New Thread 0x7fff5fffe640 (LWP 21711)]
[New Thread 0x7fff5bffd640 (LWP 21712)]
[New Thread 0x7fff4ffff640 (LWP 21713)]
[New Thread 0x7fff4bffe640 (LWP 21714)]
[New Thread 0x7fff3ffff640 (LWP 21715)]
[New Thread 0x7fff2bfff640 (LWP 21716)]
[New Thread 0x7fff27ffe640 (LWP 21717)]
[New Thread 0x7fff23ffd640 (LWP 21718)]
[New Thread 0x7fff1fffc640 (LWP 21719)]
[New Thread 0x7fff1bffb640 (LWP 21720)]
[New Thread 0x7fff03fff640 (LWP 21721)]
[Thread 0x7fff1bffb640 (LWP 21720) exited]
[Thread 0x7fff03fff640 (LWP 21721) exited]
[Thread 0x7fff1fffc640 (LWP 21719) exited]
[Thread 0x7fff23ffd640 (LWP 21718) exited]
[Thread 0x7fff27ffe640 (LWP 21717) exited]
[Thread 0x7fff2bfff640 (LWP 21716) exited]
[Thread 0x7fff3ffff640 (LWP 21715) exited]
[Thread 0x7fff4bffe640 (LWP 21714) exited]
[Thread 0x7fff4ffff640 (LWP 21713) exited]
[Thread 0x7fff5bffd640 (LWP 21712) exited]
[Thread 0x7fff5fffe640 (LWP 21711) exited]
[Thread 0x7fff63fff640 (LWP 21710) exited]
[Thread 0x7fff87ffc640 (LWP 21709) exited]
[Thread 0x7fff8bffd640 (LWP 21708) exited]
[Thread 0x7fff8fffe640 (LWP 21707) exited]
[Thread 0x7fff93fff640 (LWP 21706) exited]
[Thread 0x7ffe13fff640 (LWP 21652) exited]
[Thread 0x7ffe07ffe640 (LWP 21653) exited]
[Thread 0x7ffddfffe640 (LWP 21657) exited]
[Thread 0x7ffdf7ffe640 (LWP 21655) exited]
[Thread 0x7ffde3fff640 (LWP 21656) exited]
[Thread 0x7ffdfbfff640 (LWP 21654) exited]
[Thread 0x7ffdd3ffd640 (LWP 21658) exited]
[Thread 0x7ffdcfffc640 (LWP 21659) exited]
[Thread 0x7ffdb7ffe640 (LWP 21661) exited]
[Thread 0x7ffda7ffc640 (LWP 21663) exited]
[Thread 0x7ffd77ffe640 (LWP 21667) exited]
[Thread 0x7ffd83fff640 (LWP 21666) exited]
[Thread 0x7ffdbbfff640 (LWP 21660) exited]
[Thread 0x7ffdabffd640 (LWP 21662) exited]
[Thread 0x7ffd8fffe640 (LWP 21665) exited]
[Thread 0x7ffd93fff640 (LWP 21664) exited]
[Thread 0x7ffe23fff640 (LWP 21650) exited]
⠇ Building style.scss...
[New Thread 0x7fff93fff640 (LWP 21722)]
[New Thread 0x7fff8fffe640 (LWP 21723)]
[New Thread 0x7fff8bffd640 (LWP 21724)]
[New Thread 0x7fff87ffc640 (LWP 21725)]
[New Thread 0x7fff63fff640 (LWP 21726)]
[New Thread 0x7fff5fffe640 (LWP 21727)]
[New Thread 0x7fff5bffd640 (LWP 21728)]
[New Thread 0x7fff4ffff640 (LWP 21729)]
[New Thread 0x7fff4bffe640 (LWP 21730)]
[New Thread 0x7fff3ffff640 (LWP 21731)]
[New Thread 0x7fff2bfff640 (LWP 21732)]
[New Thread 0x7fff27ffe640 (LWP 21733)]
[New Thread 0x7fff23ffd640 (LWP 21734)]
[New Thread 0x7fff1fffc640 (LWP 21735)]
[New Thread 0x7fff1bffb640 (LWP 21736)]
[New Thread 0x7fff03fff640 (LWP 21737)]
[Thread 0x7fff2bfff640 (LWP 21732) exited]
[Thread 0x7fff27ffe640 (LWP 21733) exited]
[Thread 0x7fff3ffff640 (LWP 21731) exited]
[Thread 0x7fff4bffe640 (LWP 21730) exited]
[Thread 0x7fff4ffff640 (LWP 21729) exited]
[Thread 0x7fff5bffd640 (LWP 21728) exited]
[Thread 0x7fff5fffe640 (LWP 21727) exited]
[Thread 0x7fff63fff640 (LWP 21726) exited]
[Thread 0x7fff8fffe640 (LWP 21723) exited]
[Thread 0x7fff93fff640 (LWP 21722) exited]
[Thread 0x7fff23ffd640 (LWP 21734) exited]
[Thread 0x7fff1fffc640 (LWP 21735) exited]
[Thread 0x7fff1bffb640 (LWP 21736) exited]
[Thread 0x7fff03fff640 (LWP 21737) exited]
[Thread 0x7fff8bffd640 (LWP 21724) exited]
⠏ Building helloquence-61189-unsplash.jpg...
[Thread 0x7ffbe3fff640 (LWP 21702) exited]
[Thread 0x7ffbfbfff640 (LWP 21700) exited]
⠏ Building helloquence-61189-unsplash.jpg...
[New Thread 0x7fff93fff640 (LWP 21738)]
[New Thread 0x7fff8fffe640 (LWP 21739)]
[New Thread 0x7fff8bffd640 (LWP 21740)]
[New Thread 0x7fff87ffc640 (LWP 21741)]
[New Thread 0x7fff63fff640 (LWP 21742)]
[New Thread 0x7fff5fffe640 (LWP 21743)]
[New Thread 0x7fff5bffd640 (LWP 21744)]
[New Thread 0x7fff3ffff640 (LWP 21745)]
[New Thread 0x7fff2bfff640 (LWP 21746)]
[New Thread 0x7fff27ffe640 (LWP 21747)]
[New Thread 0x7fff23ffd640 (LWP 21748)]
[New Thread 0x7fff1fffc640 (LWP 21749)]
[New Thread 0x7fff1bffb640 (LWP 21750)]
[New Thread 0x7fff03fff640 (LWP 21751)]
[New Thread 0x7ffeffffe640 (LWP 21752)]
[New Thread 0x7ffef3fff640 (LWP 21753)]
[New Thread 0x7ffee7fff640 (LWP 21754)]
⠹ Building helloquence-61189-unsplash.jpg...
[New Thread 0x7ffecffff640 (LWP 21756)]
[New Thread 0x7ffebbfff640 (LWP 21757)]
[New Thread 0x7ffeb7ffe640 (LWP 21758)]
[New Thread 0x7ffeb3ffd640 (LWP 21759)]
[New Thread 0x7ffeafffc640 (LWP 21760)]
[New Thread 0x7ffeabffb640 (LWP 21761)]
[New Thread 0x7ffe97fff640 (LWP 21762)]
[New Thread 0x7ffe93ffe640 (LWP 21763)]
[New Thread 0x7ffe8fffd640 (LWP 21764)]
[New Thread 0x7ffe8bffc640 (LWP 21765)]
[New Thread 0x7ffe6ffff640 (LWP 21766)]
[New Thread 0x7ffe6bffe640 (LWP 21767)]
[New Thread 0x7ffe67ffd640 (LWP 21768)]
[New Thread 0x7ffe5bfff640 (LWP 21769)]
[New Thread 0x7ffe57ffe640 (LWP 21770)]
[New Thread 0x7ffe43fff640 (LWP 21771)]
[Thread 0x7ffe43fff640 (LWP 21771) exited]
[Thread 0x7ffe57ffe640 (LWP 21770) exited]
[Thread 0x7ffe5bfff640 (LWP 21769) exited]
[Thread 0x7ffe67ffd640 (LWP 21768) exited]
[Thread 0x7ffe6bffe640 (LWP 21767) exited]
[Thread 0x7ffe6ffff640 (LWP 21766) exited]
[Thread 0x7ffe8bffc640 (LWP 21765) exited]
[Thread 0x7ffe8fffd640 (LWP 21764) exited]
[Thread 0x7ffe93ffe640 (LWP 21763) exited]
[Thread 0x7ffe97fff640 (LWP 21762) exited]
[Thread 0x7ffeabffb640 (LWP 21761) exited]
[Thread 0x7ffeafffc640 (LWP 21760) exited]
[Thread 0x7ffeb3ffd640 (LWP 21759) exited]
[Thread 0x7ffebbfff640 (LWP 21757) exited]
[Thread 0x7ffecffff640 (LWP 21756) exited]
⠸ Building helloquence-61189-unsplash.jpg...
[Thread 0x7ffedbfff640 (LWP 21755) exited]
[Thread 0x7ffef3fff640 (LWP 21753) exited]
[Thread 0x7fff1bffb640 (LWP 21750) exited]
[Thread 0x7fff23ffd640 (LWP 21748) exited]
[Thread 0x7fff27ffe640 (LWP 21747) exited]
[Thread 0x7fff3ffff640 (LWP 21745) exited]
[Thread 0x7fff87ffc640 (LWP 21741) exited]
[Thread 0x7fff8bffd640 (LWP 21740) exited]
[Thread 0x7fff63fff640 (LWP 21742) exited]
[Thread 0x7fff5fffe640 (LWP 21743) exited]
[Thread 0x7ffeffffe640 (LWP 21752) exited]
[Thread 0x7fff03fff640 (LWP 21751) exited]
[Thread 0x7fff5bffd640 (LWP 21744) exited]
[Thread 0x7ffee7fff640 (LWP 21754) exited]
[Thread 0x7fff1fffc640 (LWP 21749) exited]
[Thread 0x7fff2bfff640 (LWP 21746) exited]
[Thread 0x7fff93fff640 (LWP 21738) exited]
✨ Built in 4.29s

dist/index.html                                                 1.9 KB    32ms
dist/riski-andriansyah-leafs-square-unsplash.19740b28.jpg     46.11 KB    31ms
dist/riski-andriansyah-leafs-square-unsplash.bc022971.jpg      4.14 KB    12ms
dist/riski-andriansyah-leafs-square-unsplash.3d8c768d.jpg     13.62 KB    11ms
dist/riski-andriansyah-leafs-square-unsplash.64f165d9.jpg    151.44 KB    31ms
dist/riski-andriansyah-leafs-square-unsplash.ab16b2e9.jpg    531.81 KB    31ms
dist/business-developer.html                                   3.03 KB    31ms
dist/helloquence-61189-unsplash.f3475d0e.jpg                 103.73 KB    12ms
dist/index.b5551670.css                                      141.11 KB    31ms
dist/business-developer.9195e2f9.js                              256 B    31ms
[Thread 0x7ffff0ff0640 (LWP 21607) exited]
[Thread 0x7ffff07ee640 (LWP 21609) exited]
[New Thread 0x7fff93fff640 (LWP 21772)]
[Detaching after vfork from child process 21773]
[Thread 0x7ffff13f1640 (LWP 21606) exited]
[New Thread 0x7fff8fffe640 (LWP 21774)]
--Type <RET> for more, q to quit, c to continue without paging--

Thread 14 "node" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff0bef640 (LWP 21608)]
0x00007fffda29ccd0 in ?? ()
(gdb) bt
#0  0x00007fffda29ccd0 in ?? ()
#1  0x00007ffff581c131 in __nptl_deallocate_tsd.part.8 () from /nix/store/sbbifs2ykc05inws26203h0xwcadnf0l-glibc-2.32-46/lib/libpthread.so.0
#2  0x00007ffff581cebf in start_thread () from /nix/store/sbbifs2ykc05inws26203h0xwcadnf0l-glibc-2.32-46/lib/libpthread.so.0
#3  0x00007ffff574e49f in clone () from /nix/store/sbbifs2ykc05inws26203h0xwcadnf0l-glibc-2.32-46/lib/libc.so.6
(gdb)

@Shaokun-X
Copy link

Shaokun-X commented Jun 10, 2021

Same with Ubuntu 16.04 & Nodejs 14.15.4 & npm 6.14.10 & Parcel 2.0.0-beta.3.1.
But works with PARCEL_WOKERS=0.

@alexreardon
Copy link

I cannot find any documentation about PARCEL_WORKERS in the v2 docs. Is it a v1 thing?

@mischnic
Copy link
Member Author

It exists in Parcel 1 and 2.

static getNumWorkers(): number {
return process.env.PARCEL_WORKERS
? parseInt(process.env.PARCEL_WORKERS, 10)

@williambout
Copy link

Same issue here when building on Vercel

@alexreardon
Copy link

I have not seen this issue again after I set PARCEL_WORKERS=0

@ivoba
Copy link

ivoba commented Jul 2, 2021

Segmentation Fault happened here when i added image resizing:

<source srcset="url:./img/img.jpg?as=webp&width=634" type="image/webp" />

PARCEL_WORKERS=0 npm start solved it.

@mischnic
Copy link
Member Author

mischnic commented Jul 2, 2021

Is everyone who's experiencing this crash also using the image resize/reformat feature? Do the crashes stop if you don't use that?

@tad-lispy
Copy link

Looks that way. I have no crashes after removing all image resizing code.

@devongovett
Copy link
Member

We upgraded sharp to 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.

@tad-lispy
Copy link

Yes, I've just upgraded to latest nightly and the problem seems to be gone. Thank you!

@GauBen
Copy link

GauBen commented Aug 3, 2021

Hey there, the issue might not be completely solved:
https://github.com/GauBen/gauben.github.io/runs/3232922619
(Related commit: GauBen/gauben.github.io@d0d373d)

There is however no mention to a segfault in the logs

@mischnic
Copy link
Member Author

mischnic commented Aug 3, 2021

Are you sure it's a segfault? I would say the various [MODULE_NOT_FOUND] Error: Your application tried to access xyz are causing that

@GauBen
Copy link

GauBen commented Aug 3, 2021

I can't be sure, but PARCEL_WORKERS=0 fixes it: https://github.com/GauBen/gauben.github.io/runs/3232961800
(Related commit: GauBen/gauben.github.io@2addd93)

@LAC-Tech
Copy link

Getting this issue

"^2.0.0-rc.0"

Running on alpine linux.

@domenkozar
Copy link

I'm getting the segfault as well on Cloudflare Pages (but not locally).

Parcel 2.0.0-rc.0.

The workaround helps!

@aakoch
Copy link

aakoch commented Aug 26, 2021

I'm getting it on Netlify but not locally. Removing all image resizing fixes it. I tried with Sharp 0.29.0 also with same results.

Netlify says it is because the VM/environment/Ubuntu/whatever runs out of memory. Running locally I'm only using about 800MB. Netflify claims they run the builds with 3GB. So...???

Anyway, I'll be investigating replacing Sharp with something else.

samkingco added a commit to samkingco/samking.co that referenced this issue Sep 13, 2021
@jteppinette
Copy link

I am getting this on Netlify and Cloudflare Pages on 2.0.0-rc.0.

@D34THWINGS
Copy link

I also get this error when running build on Github Actions. I tried with PARCEL_WOKERS=0 but it still throes the error. I'm also on version 2.0.0-rc.0.

@bdekok
Copy link

bdekok commented Sep 28, 2021

I was also running into this issue on netlify with ^2.0.0-rc.0 and node set to lts, does seem that PARCEL_WOKERS=0 resolves it.

@devongovett
Copy link
Member

I think the issue is that sharp doesn't play well with Node's worker_threads, but I have been unable to reproduce the issue locally (only happens in Vercel for me). See https://sharp.pixelplumbing.com/install#worker-threads and lovell/sharp#2263. We're going to attempt to require sharp on the main thread before using it in a worker and see if that helps... #7001

@devongovett
Copy link
Member

Btw, another workaround is to use PARCEL_WORKER_BACKEND=process which uses processes instead of threads for workers. I confirmed this works on Vercel.

@devongovett
Copy link
Member

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.

@bdekok
Copy link

bdekok commented Oct 14, 2021

Seems to work on Netlify without workaround too now, thanks

@felixbr
Copy link

felixbr commented Dec 1, 2021

We (still) hit segfaults with both yarn and npm using parcel.js 2.0.1.

Luckily PARCEL_WORKER_BACKEND=process seems to work for us.

@devongovett
Copy link
Member

@felixbr what operating system are you using? Does it happen after a build completes, on exit, or at some other point? I'm debugging an issue with older glibc versions on CentOS that is related to this.

@felixbr
Copy link

felixbr commented Dec 15, 2021

It was on a Jenkins node running CentOS 7.9.2009 (Core) and glibc 2.17.

@devongovett
Copy link
Member

Ok thanks, that's where I'm seeing it as well... Still haven't gotten to the bottom of what's causing it.

@devongovett
Copy link
Member

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 rust-lang/rust#91979.

@artmsilva
Copy link

Hi, I just upgraded to v2.3.1. I'm getting this issue even with the workarounds. I'm running it on Mac OS 12.2.1.

[1]    42192 segmentation fault

@StarpTech
Copy link
Contributor

StarpTech commented Feb 20, 2022

Here the same with parcel 2.3.2, Pop!_OS 21.10 x86_64

@harlanc
Copy link

harlanc commented Jul 12, 2022

parcel 2.6.2 Node v16.16.0 Centos7 has the same problem.

#0  0x00007fffc9af23e0 in ?? ()
#1  0x00007ffff711fca2 in __nptl_deallocate_tsd () at pthread_create.c:155
#2  0x00007ffff711feb3 in start_thread (arg=0x7fffcbddf700) at pthread_create.c:314
#3  0x00007ffff6e48b0d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

@rkrisztian
Copy link

rkrisztian commented Sep 1, 2022

@harlanc , what I found out is that RHEL 7 is too old for these new Node versions. Under RHEL 8 it does not crash. Maybe you just need to upgrade your CentOS system too.

paul-sachs added a commit to connectrpc/examples-es that referenced this issue Oct 4, 2023
Seems like we see a bunch of segfaults in parcel: parcel-bundler/parcel#5961
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.