-
-
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
Segmentation Fault building with nightlies 56x #5773
Comments
I got this 3 times today, possibly related?
Only happens sometimes tho |
@danieltroger you can get the segmentation fault stack using segfault-handler in your build script, i.e:
|
The build script is a simple shell script. Do you have some command for that too? Also I just cleaned the cache and now it stopped segfaulting again. |
Our build script Is a shell script too. Originally it was just:
For debugging purposes, I created a file called build.js that includes the two lines in my previous comment, then changed the build command to:
Also need to add segfault-handler as a dev dependency to the project. |
Ah shoot now I understand, thanks. |
Well damn it instantly segfaulted
Another one:
|
It only segfaults when building for IE11 and for certain scripts |
Possibly related to source maps? cc @DeMoorJasper |
@devongovett was gonna look into it this weekend, been pretty busy. So will have a look at this tomorrow. Might also rewrite sourcemaps in Rust at some point in the future :) |
Can anyone create a minimal reproduction for this? Opened a PR that handles a couple more edge cases: parcel-bundler/source-map#50 but not sure if it actually fixes this issue as I've not been able to reproduce it. |
@DeMoorJasper we have hundreds of source files in our monorepo, is there a way to tell which one is causing the segmentation fault? If so I can try to reproduce, thank you. |
@ittaibaratz not sure as you can't really catch a segmentation fault, will look further into how to actually debug this easily if the mentioned PR didn't fix this. So please test the updated source-map version for now, #5801 |
Sounds good @DeMoorJasper - Will test it once the next nightly comes out. |
So with the latest nightly (577), I no longer see a segmentation fault, however the build fails on something else:
I don't see any information for the file where the problem occurs, so not sure what more information I can provide. Any ideas? |
@ittaibaratz is that this issue #5787 ? |
@danieltroger looks very similar indeed. Is there a way for me to find out what code is being minified so I can try to workaround this? Lines 13997-14000 above don't reveal much. |
@ittaibaratz I'm gonna close this issue as there's already an issue for the minification/babel issue you encountered and the original seems to be resolved. Maybe continue the conversation there About the error not showing the file, it should, I'll create a PR in a bit to add this. |
Thanks for the fix @DeMoorJasper ! |
Hey I'm having segfaults running
|
Just faulted again:
node v15.10.0 and parcel 2.0.0-nightly.610+8a4fa3ee |
AAaaand again, this time with different message:
|
Regarding the "unreachable code" one: nodejs/node#34506 |
Ah shoot, that sucks. Seems like all of these are errors that are impossible to debug? Can I install something that writes everything to disk so there's more information when it segfaults? I have an empty 8TB drive. I got my special segfault again btw:
|
Are you able to trigger this somewhat consistently? Getting a reproduction for that would be great. One way to debug this is starting Node inside a debugger (gdb or lldb). |
It happens randomly around once a day :(
Do you happen to know what I can prefix node in my package.json's scripts so that it always runs in lldb and just breaks when it segfaults? |
I tried to ctrl+c my parcel running in a loop because I wanted to run I suppose it happens when one ctrl+c's too early? BTW earlier today I got Further BTW: when moving away the main file that parcel serve watches and moving it back it's not redetected. Just writing here for my conscience and your information, am too lazy to report as closing my terminal window and rerunning serve solved it.
|
Yeah the default segfault is definitely reproducible. It takes like 10 mintues so it's not possible to attach a debugger manually to every run, but if it can be automated it should be debuggable.
Edit: slightly different variant from a day later:
Edit: a week later on parcel 2.0.0-nightly.619+28eec7be node v15.11.0:
Edit: another one, 9 days later:
Edit: new one from same day as last one
Edit: new one after 13 days:
Edit: 16 days later, parcel
Edit: 17 days later, I'm starting to see a pattern - everytime I switch branches without clearing cache it segfaults
|
I have a consistant segfault on cold builds, it's reproducible: When the cache folder exists, there is no such problem: How to reproduceVersions: 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 build Current workaround
(Only the first one segfaults) Package.json: https://github.com/GauBen/gauben.github.io/blob/source/package.json |
Let's handle this in a new issue: #5961 |
Hey, what should I do for all my errors in the future? Should I open separate issues?
|
Please open one for all "unreachable code", they might all be related. |
🐛 bug report
When building our project using the latest nightlies (Tried 562 - 566), the build fails on segmentation fault 11.
🎛 Configuration (.babelrc, package.json, cli command)
🤔 Expected Behavior
The build should complete successfully.
😯 Current Behavior
The build fails with a segmentation fault as follows:
💁 Possible Solution
Not sure, but perhaps this is the code responsible?
https://github.com/parcel-bundler/source-map/blob/2fba112dc6b29095aea1af052469d33ec6601c78/src/wasm/SourceMap.cpp#L140
🔦 Context
We have a large mono repo with about 12 sub packages. We use lerna and babel. Some packages are Typescript, some are Javascript.
💻 Code Sample
🌍 Your Environment
The text was updated successfully, but these errors were encountered: