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.

Segfault on Linux

See original GitHub issue

Describe the bug

I am trying to convert my large project over to using vitest. I have a monorepo with some frontend and some node packages and I’m running several copies of vitest in parallel to test them. I can run all the tests just fine on my macOS dev machine.

When I run the tests in GitHub actions (ubuntu-latest), 2/3 of the node packages segfault and the frontend tests and one node package runs successfully. I’ve tried run --run, --threads=false, min/max 1 thread, etc, no difference

I have no error message other than segmentation fault. If you can guide me how to get more debugging information on GHA (since I can’t repro locally) I can provide that.

I posted about this on discord a few days ago: https://discord.com/channels/917386801235247114/918057998914568213/985767695926571028

One of the packages crashes after running tests for a couple minutes The other crashes right after finishing everything:

[test:*common] > platform@1.0.0 test:common
[test:*common] > npm run -w platform-common test
[test:*common] 
[test:*common] 
[test:*common] > platform-common@1.0.0 test
[test:*common] > vitest run --run --threads=false
[test:*common] 
[test:*common] 
[test:*common]  RUN v0.14.2/home/runner/work/platform/platform/packages/common
[test:*common] 
[test:*common]  √ src/config/env.test.ts  (2 tests) 27ms 22 MB heap used
[test:*common]  √ src/util/array.test.ts  (1 test) 2ms 22 MB heap used
[test:*common]  √ src/util/foo.test.ts  (8 tests) 13ms 23 MB heap used
[test:*common] 
[test:*common] Test Files 3 passed (3)
[test:*common]      Tests 11 passed (11)
[test:*common]       Time  1.82s (in thread 42ms, 4333.93%)
[test:*common] 
[test:*common] Segmentation fault (core dumped)
[test:*common] npm ERR! Lifecycle script `test` failed with error: 

Reproduction

How do I get more info?

System Info

System:
    OS: macOS 12.4
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 952.24 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.15.0 - /usr/local/bin/node
    Yarn: 1.22.17 - /usr/local/bin/yarn
    npm: 8.12.1 - /usr/local/bin/npm
  Browsers:
    Brave Browser: 102.1.39.120
    Safari: 15.5
  npmPackages:
    @vitejs/plugin-react: ^1.3.2 => 1.3.2
    vitest: ^0.14.2 => 0.14.2


### Used Package Manager

npm

### Validations

- [X] Follow our [Code of Conduct](https://github.com/vitest-dev/vitest/blob/main/CODE_OF_CONDUCT.md)
- [X] Read the [Contributing Guidelines](https://github.com/vitest-dev/vitest/blob/main/CONTRIBUTING.md).
- [X] Read the [docs](https://vitest.dev/guide/).
- [X] Check that there isn't [already an issue](https://github.com/vitest-dev/vitest/issues) that reports the same bug to avoid creating a duplicate.
- [X] Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/vitest-dev/vitest/discussions) or join our [Discord Chat Server](https://chat.vitest.dev).
- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
Aslemammadcommented, Jul 3, 2022

@revmischa Thank you for collaborating in discord!

0reactions
revmischacommented, Jul 3, 2022

I found that upgrading my @aws-sdk/* deps fixed this issue

Read more comments on GitHub >

github_iconTop Results From Across the Web

What Is a Segmentation Fault in Linux?
A segmentation fault, or segfault, is a memory error in which a program tries to access a memory address that does not exist...
Read more >
What is a segmentation fault on Linux? - Stack Overflow
A 'segfault' is when a program accesses protected or invalid memory; usually due to poor memory management or buggy ...
Read more >
What is a "segmentation violation"? | Support - SUSE
When segfaults are occurring frequently, or with different processes or without a clear pattern to them, this can indicate that a system's ...
Read more >
Detecting and Solving Segmentation Faults in Linux Containers
A segmentation fault is nothing but the error that occurs due to failed attempts to access Linux OS's memory regions. These types of...
Read more >
Why Does The Segmentation Fault Occur on Linux / UNIX ...
A segmentation fault occurs when a program attempts to access a memory location that it is not allowed to access, or attempts to...
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