question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:

  1. Create jest tests
  2. Create Github workflow to test on Node.js 12.x
  3. 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:open
  • Created 3 years ago
  • Reactions:20
  • Comments:13 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
TrySoundcommented, Sep 21, 2021

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

1reaction
dgrishamcommented, Aug 31, 2022

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found