Skip to content
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

NodeJs fatal error when running tests #319

Closed
6 tasks done
Demivan opened this issue Dec 26, 2021 · 5 comments · Fixed by #335
Closed
6 tasks done

NodeJs fatal error when running tests #319

Demivan opened this issue Dec 26, 2021 · 5 comments · Fixed by #335
Labels
help wanted Extra attention is needed

Comments

@Demivan
Copy link
Member

Demivan commented Dec 26, 2021

Describe the bug

When running tests on Windows I get a core dump from Node.

It is not consistent. Sometimes it works: https://github.com/fluent-vue/rollup-plugin-fluent-vue/runs/4635574629?check_suite_focus=true#step:6:17 and sometimes not: https://github.com/fluent-vue/rollup-plugin-fluent-vue/runs/4635579648?check_suite_focus=true

I don't think it is the same as #317. I tried to get stack trace for that issue to compare but it didn't work.

Reproduction

https://github.com/fluent-vue/rollup-plugin-fluent-vue

System Info

System:
    OS: Windows 10 10.0.17763
    CPU: (2) x64 Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz
    Memory: 4.99 GB / 7.00 GB
  Binaries:
    Node: 16.13.1 - C:\hostedtoolcache\windows\node\16.13.1\x64\node.EXE
    Yarn: 1.22.17 - C:\npm\prefix\yarn.CMD
    npm: 8.1.2 - C:\hostedtoolcache\windows\node\16.13.1\x64\npm.CMD
  Browsers:
    Internet Explorer: 11.0.17763.2145
  npmPackages:
    vite: ^2.7.7 => 2.7.7 
    vitest: ^0.0.114 => 0.0.114 

Used Package Manager

pnpm

Logs

https://github.com/fluent-vue/rollup-plugin-fluent-vue/runs/4635579648?check_suite_focus=true


FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal.

 1: 00007FF6417E30AF v8::internal::CodeObjectRegistry::~CodeObjectRegistry+112511
 2: 00007FF641772216 DSA_meth_get_flags+65542
 3: 00007FF6417730CD node::OnFatalError+301
 4: 00007FF6420AD5D5 v8::V8::ToLocalEmpty+53
 5: 00007FF64176A2B6 DSA_meth_get_flags+32934
 6: 00007FF64175DC1B v8::base::CPU::has_sse+42267
 7: 00007FF641845BF7 uv_timer_stop+1207
 8: 00007FF6418421CB uv_async_send+331
 9: 00007FF64184195C uv_loop_init+1292
10: 00007FF641841AFA uv_run+202
11: 00007FF641810C05 node::SpinEventLoop+309
12: 00007FF6416AB4D0 v8::internal::wasm::SignatureMap::Freeze+35776
13: 00007FF6416A6B28 v8::internal::wasm::SignatureMap::Freeze+16920
14: 00007FF6418322DD uv_poll_stop+557
15: 00007FF642643DF0 v8::internal::compiler::RepresentationChanger::Uint32OverflowOperatorFor+146416
16: 00007FFB0E117974 BaseThreadInitThunk+20
17: 00007FFB10DEA2F1 RtlUserThreadStart+33

Validations

@Demivan Demivan changed the title NodeJs core dump when running tests on Windows NodeJs fatal error when running tests on Windows Dec 26, 2021
@Demivan
Copy link
Member Author

Demivan commented Dec 26, 2021

And I get similar issue on linux too. But with different project (will sent a link when I'm done with the branch)

Like with Windows all tests pass but after that node crashes.

  System:
    OS: Linux 5.15 Arch Linux
    CPU: (16) x64 AMD Ryzen 7 3700X 8-Core Processor
    Memory: 2.39 GB / 15.60 GB
    Container: Yes
    Shell: 3.3.1 - /bin/fish
  Binaries:
    Node: 17.3.0 - /usr/bin/node
    Yarn: 1.22.17 - /usr/bin/yarn
    npm: 8.3.0 - /usr/bin/npm
  Browsers:
    Chromium: 96.0.4664.110
    Firefox: 95.0.2
  npmPackages:
    vite: ^2.7.7 => 2.7.7 
    vitest: ^0.0.114 => 0.0.114 
FATAL ERROR: v8::FromJust Maybe value is Nothing.
 1: 0x55cc11bca6b1 node::Abort() [node]
 2: 0x55cc11ad0ceb node::FatalError(char const*, char const*) [node]
 3: 0x55cc11daa3fb v8::Utils::ReportApiFailure(char const*, char const*) [node]
 4: 0x55cc11bcf0fe node::fs::FileHandle::CloseReq::Resolve() [node]
 5: 0x55cc11bcfa5a  [node]
 6: 0x7f22568dc302  [/usr/lib/libuv.so.1]
 7: 0x7f22568dffcd  [/usr/lib/libuv.so.1]
 8: 0x7f22568f4266  [/usr/lib/libuv.so.1]
 9: 0x7f22568e0897 uv_run [/usr/lib/libuv.so.1]
10: 0x55cc11afe1b7 node::SpinEventLoop(node::Environment*) [node]
11: 0x55cc11c9f98c node::worker::Worker::Run() [node]
12: 0x55cc11c9fe18  [node]
13: 0x7f2255bb1259  [/usr/lib/libpthread.so.0]
14: 0x7f2255ada5e3 clone [/usr/lib/libc.so.6]

@antfu
Copy link
Member

antfu commented Dec 26, 2021

Yeah, I got that sometimes as well. Not sure how to debug it. Help wanted.

@antfu antfu added bug help wanted Extra attention is needed labels Dec 26, 2021
@userquin
Copy link
Member

I think it is something related with pnpm/shell/npx, on windows all tests pass individually, but running nr ci or pnpm run test:ui or pnpm run test:all on the repo fails a number of times, the error switchs from the windows cmd shell, to npx to node, it is weird.

Take a look at the video on discussions room on vitest repo (50s of video running test:all a few times until the test pass again). If I change something, then nr ci works first time, then will fail again (if nothing changes).

@Demivan Demivan changed the title NodeJs fatal error when running tests on Windows NodeJs fatal error when running tests Dec 27, 2021
@Demivan
Copy link
Member Author

Demivan commented Dec 27, 2021

close: () => pool.destroy(),

Destroying the worker pool is causing the crash. Not sure why yet.

@antfu
Copy link
Member

antfu commented Dec 27, 2021

close: () => pool.destroy(),

Destroying the worker pool is causing the crash. Not sure why yet.

Oh really? It does make the error not appearing at least for me, Thanks! I think we don't actually have to have that line. Just commented it out and let's see how it goes

chaii3 pushed a commit to chaii3/vitest that referenced this issue May 13, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jun 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants