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

gatsby serve Command failed with signal "SIGSEGV" in rootless docker image #38108

Open
2 tasks done
paulsouche opened this issue May 25, 2023 · 3 comments
Open
2 tasks done
Labels
status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer type: bug An issue or pull request relating to a bug in Gatsby

Comments

@paulsouche
Copy link

Preliminary Checks

Description

Hello

The command gatsby serve --port 8080 --host 0.0.0.0 fails with SIGSEGV in a docker container when the user is not root.

I checked all the related issues and one in particular which seemed to be fixed in v5.3.1.

The project was using gatsby@^4.25.1 so I did a PR to bump gatsby@^5.10.0 but even with that, the command is still failing.

Thanks anyway for the great job

Reproduction Link

https://github.com/SocialGouv/recosante

Steps to Reproduce

  1. Clone the repo
  2. Update the frontend Dockerfile to use the nodejs:frontend user
  3. In root folder run docker-compose build frontend
  4. Run the container => exit code 139 SIGSEGV
    ...

Expected Result

The command should succeed even with a non root user

Actual Result

The command fails with a non root user

Environment

System:
    OS: Linux 5.19 Ubuntu 22.04.2 LTS 22.04.2 LTS (Jammy Jellyfish)
    CPU: (8) x64 Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz
    Shell: 5.8.1 - /usr/bin/zsh
  Binaries:
    Node: 18.16.0 - /tmp/yarn--1685005231996-0.33751789578990987/node
    Yarn: 1.22.19 - /tmp/yarn--1685005231996-0.33751789578990987/yarn
    npm: 9.5.1 - /usr/local/bin/npm
  Languages:
    Python: 3.10.6 - /usr/bin/python
  Browsers:
    Chrome: 113.0.5672.92
    Firefox: 113.0.1

Config Flags

NA

@paulsouche paulsouche added the type: bug An issue or pull request relating to a bug in Gatsby label May 25, 2023
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label May 25, 2023
@suresh-jbt
Copy link

Yes, Having the same issue with me as well with the latest version.
I'm using a Mac. It worked once after reinstalling node_modules but 2nd time it had throw same error.

@carlqt
Copy link

carlqt commented Oct 31, 2023

Yes, Having the same issue with me as well with the latest version. I'm using a Mac. It worked once after reinstalling node_modules but 2nd time it had throw same error.

My issue is closer to this. I'm not running it in a container.

As a workaround, I have to run gatsby clean before running gatsby develop

@amiiit
Copy link

amiiit commented Nov 16, 2023

Same here, I'm having to remove the .cache folder everytime before I start dev /:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

No branches or pull requests

5 participants
@amiiit @carlqt @paulsouche @suresh-jbt and others