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

Vitest crashes sometimes #1721

Closed
6 tasks done
vincentdchan opened this issue Jul 26, 2022 · 3 comments
Closed
6 tasks done

Vitest crashes sometimes #1721

vincentdchan opened this issue Jul 26, 2022 · 3 comments
Labels
duplicate This issue or pull request already exists needs reproduction

Comments

@vincentdchan
Copy link

Describe the bug

Run vitest, and coding. After a while, when I saved the file, the tsc reduild the folder, and then the vitest crashed.

After the error message is printed, the CPU run to 100%. The process doesn't exit.

#
# Fatal error in , line 0
# Check failed: result.second.
#
#
#
#FailureMessage Object: 0x175b4d368
 1: 0x100397ff4 node::NodePlatform::GetStackTracePrinter()::$_3::__invoke() [/Users/duzhongchen/.nvm/versions/node/v16.16.0/bin/node]
 2: 0x101139dd0 V8_Fatal(char const*, ...) [/Users/duzhongchen/.nvm/versions/node/v16.16.0/bin/node]
 3: 0x10071e684 v8::internal::GlobalBackingStoreRegistry::Register(std::__1::shared_ptr<v8::internal::BackingStore>) [/Users/duzhongchen/.nvm/versions/node/v16.16.0/bin/node]
 4: 0x10049adbc v8::ArrayBuffer::GetBackingStore() [/Users/duzhongchen/.nvm/versions/node/v16.16.0/bin/node]
 5: 0x100300980 node::ArrayBufferViewContents<unsigned char, 64ul>::Read(v8::Local<v8::ArrayBufferView>) [/Users/duzhongchen/.nvm/versions/node/v16.16.0/bin/node]
 6: 0x10031ca10 void node::Buffer::(anonymous namespace)::StringSlice<(node::encoding)3>(v8::FunctionCallbackInfo<v8::Value> const&) [/Users/duzhongchen/.nvm/versions/node/v16.16.0/bin/node]
 7: 0x1004f4ea8 v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) [/Users/duzhongchen/.nvm/versions/node/v16.16.0/bin/node]
 8: 0x1004f49a0 v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) [/Users/duzhongchen/.nvm/versions/node/v16.16.0/bin/node]
 9: 0x1004f422c v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) [/Users/duzhongchen/.nvm/versions/node/v16.16.0/bin/node]
10: 0x100c34d0c Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_BuiltinExit [/Users/duzhongchen/.nvm/versions/node/v16.16.0/bin/node]
11: 0xa3008e8d4
12: 0xa300912b4
13: 0xa301107ec
14: 0xa3009168c
15: 0xa3009189c
16: 0xa30069f8c
17: 0x100bf7e54 Builtins_AsyncFunctionAwaitResolveClosure [/Users/duzhongchen/.nvm/versions/node/v16.16.0/bin/node]
18: 0x100c7ccf8 Builtins_PromiseFulfillReactionJob [/Users/duzhongchen/.nvm/versions/node/v16.16.0/bin/node]
19: 0x100bea234 Builtins_RunMicrotasks [/Users/duzhongchen/.nvm/versions/node/v16.16.0/bin/node]
20: 0x100bc6524 Builtins_JSRunMicrotasksEntry [/Users/duzhongchen/.nvm/versions/node/v16.16.0/bin/node]
21: 0x100597e5c v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) [/Users/duzhongchen/.nvm/versions/node/v16.16.0/bin/node]
22: 0x100598290 v8::internal::(anonymous namespace)::InvokeWithTryCatch(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) [/Users/duzhongchen/.nvm/versions/node/v16.16.0/bin/node]
23: 0x10059837c v8::internal::Execution::TryRunMicrotasks(v8::internal::Isolate*, v8::internal::MicrotaskQueue*, v8::internal::MaybeHandle<v8::internal::Object>*) [/Users/duzhongchen/.nvm/versions/node/v16.16.0/bin/node]
24: 0x1005bafb8 v8::internal::MicrotaskQueue::RunMicrotasks(v8::internal::Isolate*) [/Users/duzhongchen/.nvm/versions/node/v16.16.0/bin/node]
25: 0x1005bb84c v8::internal::MicrotaskQueue::PerformCheckpoint(v8::Isolate*) [/Users/duzhongchen/.nvm/versions/node/v16.16.0/bin/node]
26: 0x100285db4 node::InternalCallbackScope::Close() [/Users/duzhongchen/.nvm/versions/node/v16.16.0/bin/node]
27: 0x1002857c4 node::InternalCallbackScope::~InternalCallbackScope() [/Users/duzhongchen/.nvm/versions/node/v16.16.0/bin/node]
28: 0x10033b660 node::fs::FileHandle::CloseReq::Resolve() [/Users/duzhongchen/.nvm/versions/node/v16.16.0/bin/node]
29: 0x10034e390 node::fs::FileHandle::ClosePromise()::$_0::__invoke(uv_fs_s*) [/Users/duzhongchen/.nvm/versions/node/v16.16.0/bin/node]
30: 0x100ba6bd4 uv__work_done [/Users/duzhongchen/.nvm/versions/node/v16.16.0/bin/node]
31: 0x100baa370 uv__async_io [/Users/duzhongchen/.nvm/versions/node/v16.16.0/bin/node]
32: 0x100bbc0e8 uv__io_poll [/Users/duzhongchen/.nvm/versions/node/v16.16.0/bin/node]
33: 0x100baa800 uv_run [/Users/duzhongchen/.nvm/versions/node/v16.16.0/bin/node]
34: 0x100286ccc node::SpinEventLoop(node::Environment*) [/Users/duzhongchen/.nvm/versions/node/v16.16.0/bin/node]
35: 0x1003cadf4 node::worker::Worker::Run() [/Users/duzhongchen/.nvm/versions/node/v16.16.0/bin/node]
36: 0x1003ce01c node::worker::Worker::StartThread(v8::FunctionCallbackInfo<v8::Value> const&)::$_3::__invoke(void*) [/Users/duzhongchen/.nvm/versions/node/v16.16.0/bin/node]
37: 0x1b10f426c _pthread_start [/usr/lib/system/libsystem_pthread.dylib]
38: 0x1b10ef08c thread_start [/usr/lib/system/libsystem_pthread.dylib]

Reproduction

Run vitest, and coding. After a while, when I saved the file, the tsc reduild the folder, and then the vitest crashed.

System Info

System:
    OS: macOS 12.4
    CPU: (10) arm64 Apple M1 Max
    Memory: 365.92 MB / 64.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.16.0 - ~/.nvm/versions/node/v16.16.0/bin/node
    Yarn: 1.22.18 - /opt/homebrew/bin/yarn
    npm: 8.11.0 - ~/.nvm/versions/node/v16.16.0/bin/npm
  Browsers:
    Safari: 15.5

Used Package Manager

pnpm

Validations

@sheremet-va
Copy link
Member

sheremet-va commented Jul 26, 2022

Vitest doesn't use tsc, so I have no idea what you are talking about. Please, provide reproduction. The issue will be closed in 3 days without any activity.

There is a similar issue in nodejs/node#43617 and #1191

@sheremet-va sheremet-va added the duplicate This issue or pull request already exists label Jul 26, 2022
@vincentdchan
Copy link
Author

I can't reproduce it in a new project. But it seems that it's a bug of Node.js you posted.

@vincentdchan
Copy link
Author

It seems that this error doesn't occur on Node.js 18. Upgrading Node.js maybe a solution. Closed.

@github-actions github-actions bot locked and limited conversation to collaborators Jun 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate This issue or pull request already exists needs reproduction
Projects
None yet
Development

No branches or pull requests

2 participants