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 file on parcel build when png file is included #7408

Closed
plynchnlm opened this issue Dec 5, 2021 · 4 comments · Fixed by #7457
Closed

Segmentation file on parcel build when png file is included #7408

plynchnlm opened this issue Dec 5, 2021 · 4 comments · Fixed by #7457

Comments

@plynchnlm
Copy link

plynchnlm commented Dec 5, 2021

🐛 bug report

parcel build consistently produces a segmentation fault when I build my app. It produces working files, so I can still use it, but instead of a normal exit it seg faults.

I narrowed down the cause to a single png file. If I build an HTML file which has nothing except an img tag for that png, I get a seg fault.

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

I don't have any babel configuration files. I am running "parcel build .tmp/test.html", to run on my test file, so I think that ignores package.json (at least the source section).

🤔 Expected Behavior

The build should exit normally.

😯 Current Behavior

$ parcel build .tmp/test.html
✨ Built in 655ms

dist/test.html 126 B 224ms
dist/doctor.30144a06.png 425 B 73ms
Segmentation fault

🔦 Context

Typically when writing deployment scripts, one checks the exit status of the build before proceeding. Because of the seg fault, I am not able to determine from the exit status that the build succeeded.

💻 Code Sample

My test.html file just has:

$ cat .tmp/test.html 
<!doctype html>
<html>
<body>
  <img class="lf-icon-doctor" src="../source/images/doctor.png" alt="user" >
</body>
</html>

The docotr.png is this one: https://github.com/lhncbc/lforms-fhir-app/blob/master/app/assets/images/doctor.png

🌍 Your Environment

Software Version(s)
Parcel 2.0.1
Node v14.16.1
npm/Yarn npm: 6.14.12
Operating System Red Hat Enterprise Linux Workstation release 7.9 (Maipo)
@folknor
Copy link

folknor commented Dec 14, 2021

I am unable to reproduce the segfault on linux using 2.0.0-nightly.945 and node v16.13.1. I have not tried the 2.0.1 release or node v14.x.

@devongovett
Copy link
Member

@plynchnlm can you run getconf GNU_LIBC_VERSION on your system and paste the output? I believe there is a bug in some older versions of glibc that might cause this segfault on exit.

@plynchnlm
Copy link
Author

$ getconf GNU_LIBC_VERSION
glibc 2.17

@devongovett
Copy link
Member

Thanks. 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.

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

Successfully merging a pull request may close this issue.

3 participants