Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Sementation fault since node-sass 4.7.1 #2169

Closed
Vinnl opened this issue Nov 28, 2017 · 8 comments
Closed

Sementation fault since node-sass 4.7.1 #2169

Vinnl opened this issue Nov 28, 2017 · 8 comments

Comments

@Vinnl
Copy link

Vinnl commented Nov 28, 2017

  • npm version (npm -v): 3.10.10
  • Yarn version: 1.3.2 (I'm using Yarn)
  • Node version (node -v): 6.11.2
  • Node Process (node -p process.versions):
{ http_parser: '2.7.0',
  node: '6.11.2',
  v8: '5.1.281.103',
  uv: '1.11.0',
  zlib: '1.2.11',
  ares: '1.10.1-DEV',
  icu: '58.2',
  modules: '48',
  openssl: '1.0.2l' }
  • Node Platform (node -p process.platform): linux
  • Node architecture (node -p process.arch): x64
  • node-sass version (node -p "require('node-sass').info"): 4.7.1 (manually inserted - I didn't get this command to run in Docker)
  • npm node-sass versions (npm ls node-sass): I couldn't get this to run in Docker either...

I'm running my project in a Docker image. However, this recently started running into segmentation faults, and some git bisecting taught me that this started occurring after an upgrade of node-sass. I then further narrowed it down to the segfault not occurring with node-sass 4.6.1, but occurring from 4.7.1 onwards. This, of course, makes PR #2128 suspect. The issue sounds similar to #2031, but since that predates 4.7.1, I figured it was probably a different one. However, most of that issue went over my head.

Unfortunately, I don't know much more about segfaults than that they are related to memory management. Thus, if there's any additional things I can try or information I can gather, let me know.

I'm running inside the node:6-alpine Docker image (using this Dockerfile.

This is, I think, the relevant but not very informative output:

web_1       | [2] Project is running at http://0.0.0.0:8000/
web_1       | [2] webpack output is served from /
web_1       | [2] 404s will fallback to /index.html
web_1       | [2] Segmentation fault (core dumped)
web_1       | [2] error Command failed with exit code 139.

At this point my Webpack server wasn't actually running, and I Ctrl+C'd out.

@Vinnl
Copy link
Author

Vinnl commented Nov 28, 2017

Update: I also tried it with the node:8-alpine Docker image, and that works fine. (Unfortunately, I have to use 6 for now...)

@tom-pryor
Copy link

Yeah, we ran into the same problem. Fortunately we were able to use node 8 which doesn't have this problem.

@saper
Copy link
Member

saper commented Nov 28, 2017

#2031 is not a problem with node-sass, it's the problem with anything musl, including alpine.

Can you publish something to reproduce this?

Can you reproduce the problem and get a backtrace like this #2031 (comment) ?

@Vinnl did you try top20/node:8-alpine as patched by @jubel-han in #2031 (comment) - or something similar for node 6 (stackfix should work for node 6 as well) ?

@nschonni
Copy link
Contributor

Between 6 and 8, the Node docker images updated the version of Apline used

@Vinnl
Copy link
Author

Vinnl commented Nov 29, 2017

@saper I don't think I'll be able to make a minimally reproducible version (unless there already is a basic node-sass project somewhere that I could set up in a Docker image?), but it should be reproducible by cloning this repo and then checking out commit 03d9aebe.

Unfortunately, the backtrace/stackfix goes a bit over my head, so that doesn't look like I would be able to reproduce it, and since it works in the regular Node 8 image, the one already made probably works as well.

@nschonni makes an interesting point: the Node 6 image uses Alpine 3.4, and the Node 8 image uses Alpine 3.6.

@tom-pryor
Copy link

tom-pryor commented Nov 29, 2017

I don't think the version of Alpine matters. Our base image that we add node to is still using Alpine 3.4 - we installed Node 8 by specifying the edge repo in the apk add command.

For reference:

RUN apk add \
    --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \
    --no-cache \
    nodejs

@cdcme
Copy link

cdcme commented Jan 24, 2018

I experienced this issue, as well. My fix was to also to use node 8. I also force an npm rebuild of node-sass in that image. This resolves the issue for me.

@saper
Copy link
Member

saper commented Mar 18, 2018

This is the same as #2031. Do not use Alpine for node < 8.

@saper saper closed this as completed Mar 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants