-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Segmentation fault when a breakpoint is attached in VS Code #795
Comments
I have also been having this problem, and have noticed it exists also in the Peeky testrunner project |
Another hint is that it happens even with threads disabled |
@TrickyPi What Vitest and Node version are you using. And what package manager? |
Vitest: v0.4.1 |
My vscode info: |
@TrickyPi, could you share your debugger launch config? |
I noticed that my "Node.js" version in vscode was the same as that of @TrickyPi, but the version I am running in command line was v16.14.0. I decided to downgrade my version of node (with nvm) to v14.16.0 (to match vscode's version) and the error stopped appearing. Here is the complete list of versions I tried: |
Strange... when I run with v16.14.0, I get the error. @TrickyPi, with node v16.14.0, are you running vs code from command line (to make sure that VS-Code is running on that version)? |
Strange. I fired up a virtual machine to start from a clean environment. Installed windows (thought maybe something to do with linux environment). Installed node 16.4.0 Version: 1.64.2 (user setup) Used simple project with just vite and vitest installed as dependencies, and still got segmentation fault |
I've managed to get to here before it segfaults: Here is the call stack, right up to the point before it segfaults:
From cachedRequest directRequest gets called and It's this: secondSeg.mp4which I'm guessing is related to nodejs/node#37648 why it only happens on debugger I don't know. Location in codeSystem Details
Segfault output
CC @connor4312 |
Thanks for the ping. Unfortunately not a whole lot we can do on the VS Code side for cases like this. |
@connor4312 do you have any inclination as to why it would only happen when in debug mode? But not when running node directly? |
Not really, though I am not an expert on V8 internals. But in general crashes when only in debug mode are not unprecedented. The debugger and the information it asks for will touch many more features of the runtime than any given program is likely to. |
Hey guys, just did a recent update on my computer and decided to run some tests to see if anything changed. Read on for the slightly longer story:I found that when I used YARN or NPM (as opossed to PNPM) to install dependencies, the debugger worked without any problems. So here is the list of the tools I used (with versions): VSCode: node: version: 16.14.0 With this configuration, here are the result: vite v. 2.8.4 and vitest v. 0.5.1If I use vite version 2.8.4 (with vitest 0.5.1): vite version 2.8.5 and vitest 0.5.8::YARN: works OK In my test project (https://github.com/raulcesar/vscode-debug-segfault), I have 2 commits with tags "SEGFAULT" and "NO-SEGFAULT" that illustrate the changes to dependencies. Anyway, I hope this helps, and just want to say that I am loving vite and vitest, and will be using them both in an upcoming project. |
I can also confirm that debugging works without segmentation faults on v0.5.9 |
should we close this issue then? |
Describe the bug
When running in VS Code with the recommended launch script from https://vitest.dev/guide/debugging.html, Vitest will error out with a 139 / Segmentation Fault if and only if a breakpoint is attached anywhere in the test file.
This seems unrelated to the other 2-3 segfault issues.
Reproduction
https://github.com/JoshuaKGoldberg/repros/tree/vitest-segmentation-fault
System Info
System: OS: Linux 5.10 Ubuntu 20.04.3 LTS (Focal Fossa) CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz Memory: 12.01 GB / 24.94 GB Container: Yes Shell: 5.0.17 - /bin/bash Binaries: Node: 16.13.0 - /usr/bin/node Yarn: 1.22.17 - /usr/local/bin/yarn npm: 8.1.0 - /usr/bin/npm npmPackages: vitest: ^0.4.1 => 0.4.1
Used Package Manager
yarn
Validations
The text was updated successfully, but these errors were encountered: