setup-node icon indicating copy to clipboard operation
setup-node copied to clipboard

Occasionally error: 1823 Segmentation fault (core dumped) npm install

Open aladdin-add opened this issue 1 year ago • 2 comments

Description:

Occasionally when running npm install:

Run npm install
/home/runner/work/_temp/9d355b[4](https://github.com/eslint/eslint/actions/runs/8598532822/job/23559533208?pr=18289#step:4:5)d-c108-413d-9445-84fc1608c1c2.sh: line 1:  1823 Segmentation fault      (core dumped) npm install
Error: Process completed with exit code 139.

Action version: actions/setup-node@v4 Specify the action version

Platform:

  • [x ] Ubuntu
  • [ ] macOS
  • [ ] Windows

Runner type:

  • [ x] Hosted
  • [ ] Self-hosted

Tools version: lts/* + npm

Repro steps:
https://github.com/eslint/eslint/actions/runs/8598532822/job/23559533208?pr=18289

Expected behavior: install successfully.

Actual behavior: as above.

aladdin-add avatar Apr 08 '24 10:04 aladdin-add

another repro: https://github.com/eslint-community/eslint-plugin-n/actions/runs/8598111786/job/23558240907

aladdin-add avatar Apr 08 '24 10:04 aladdin-add

Hello @aladdin-add, Thank you for creating the issue and we will look into it :)

aparnajyothi-y avatar Apr 08 '24 14:04 aparnajyothi-y

Hi @aladdin-add , We've successfully executed the workflow without encountering any errors. Here's the screenshot for your reference. If you encounter the same error in future, below are some troubleshooting steps which might resolve this issue:

  1. Delete the node_modules directory and package-lock.json file, then run npm install again
- name: Install dependencies
    run: |
      rm -rf node_modules package-lock.json
      npm install
  1. Check whether there are any incompatible versions of packages in your package.json file.
  2. Ensure that Node.js is up-to-date
steps:
- name: Setup Node.js environment
  uses: actions/setup-node@v4
  with:
    node-version: '20' # or any latest stable version
Screenshot 2024-05-02 at 5 17 49 PM

gowridurgad avatar May 07 '24 05:05 gowridurgad

Yes, it's not 100% reproduceable: it disappeared when I re-run it. Just filed it in case someone else encountered.

some more info:

  1. eslint was not using lockfile: https://github.com/eslint/eslint?tab=readme-ov-file#why-doesnt-eslint-lock-dependency-versions
  2. the failed job was already using node lts(20.x)

Please feel free to close if you think there is no concrete action here. :)

aladdin-add avatar May 07 '24 05:05 aladdin-add

Hi @aladdin-add, I'm going to close the issue for now because the error was not reproducible. If you have further questions or if you manage to reproduce the issue, please feel free to reopen it or create a new one. Thank you!

gowridurgad avatar May 15 '24 05:05 gowridurgad