Segmentation fault (core dumped) on Github Actions running Node.js 12.x
See original GitHub issue🐛 Bug Report
Running tests on Github Actions using Node.js 12.x gives a segmentation fault very frequently when the tests are done.
To Reproduce
Steps to reproduce the behavior:
- Create jest tests
- Create Github workflow to test on Node.js 12.x
- Run the workflow
Expected behavior
The tests succeed (or fail) normally.
Link to repl or repo (highly encouraged)
https://github.com/Ionaru/typeorm-utils/runs/1281969729?check_suite_focus=true
envinfo
System:
OS: Linux 5.4 Ubuntu 18.04.5 LTS (Bionic Beaver)
CPU: (2) x64 Intel(R) Xeon(R) Platinum 8171M CPU @ 2.60GHz
Binaries:
Node: 12.19.0 - /opt/hostedtoolcache/node/12.19.0/x64/bin/node
Yarn: 1.22.5 - /usr/bin/yarn
npm: 6.14.8 - /opt/hostedtoolcache/node/12.19.0/x64/bin/npm
npmPackages:
jest: ^26.6.0 => 26.6.0
Issue Analytics
- State:
- Created 3 years ago
- Reactions:20
- Comments:13 (1 by maintainers)
Top Results From Across the Web
Non-deterministic segfault (only triggered on GitHub Actions ...
I'm encountering a strange segfault error in my package tests that appears to be non-deterministic, and is only triggered during CI with GitHub...
Read more >How to Debug Node.js Segmentation Faults | HTTP Toolkit
A segmentation fault occurs when a program attempts to access a memory location ... When Node.js itself has a bug somewhere, and segfaults...
Read more >Segmentation fault - how to diagnose? - Google Groups
Hi all. I'm using node 0.8.14 and I've got a test suite that results in a segmentation fault on both OSX and whatever...
Read more >How to collect core dump file of a crashing program that is ...
Resolution · To look for core dumps using the GUI, run the command: for RHEL6 · To get a list of crashes on...
Read more >How to solve npm error "npm ERR! code ELIFECYCLE"
Step 1: $ npm cache clean --force. Step 2: Delete node_modules by $ rm -rf node_modules ( rmdir /S /Q node_modules in windows)...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I just solved the problem by setting maxWorkers to 3.
I have a guess experimental-vm-modules flag spends one more available worker and jest-worker must use os.CPUS - 2 or something like this.
cc @SimenB
Haivng this issue as well running tests on the
node:16-alpine
container – the tests were working fine previously, and now the same tests fail during the setup phase. They run fine locally with the same configuration. Same issue with node 18, and we can’t go below 16 with our dependencies