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

[Bug]: Native Assert error when running big amount of tests #195

Open
2 of 3 tasks
muhammadyusuf-kurbonov opened this issue Nov 11, 2024 · 1 comment
Open
2 of 3 tasks
Labels
bug Something isn't working

Comments

@muhammadyusuf-kurbonov
Copy link
Contributor

Checklist

Actual behavior

Run all test

Expected behavior

After some tests I get:

#  /home/muhammadyusuf-kurbonov/.nvm/versions/node/v22.4.0/bin/node[114949]: void node::AsyncHooks::push_async_context(double, double, v8::Local<v8::Object>) at ../src/env.cc:126
  #  Assertion failed: (trigger_async_id) >= (-1)

----- Native stack trace -----

 1: 0xf734d7 node::Assert(node::AssertionInfo const&) [/home/muhammadyusuf-kurbonov/.nvm/versions/node/v22.4.0/bin/node]
 2: 0xee421a node::AsyncHooks::push_async_context(double, double, v8::Local<v8::Object>) [/home/muhammadyusuf-kurbonov/.nvm/versions/node/v22.4.0/bin/node]
 3: 0xe76928 node::InternalCallbackScope::InternalCallbackScope(node::Environment*, v8::Local<v8::Object>, node::async_context const&, int) [/home/muhammadyusuf-kurbonov/.nvm/versions/node/v22.4.0/bin/node]
 4: 0xe770af node::InternalMakeCallback(node::Environment*, v8::Local<v8::Object>, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*, node::async_context) [/home/muhammadyusuf-kurbonov/.nvm/versions/node/v22.4.0/bin/node]
 5: 0xe8fb6f node::AsyncWrap::MakeCallback(v8::Local<v8::Function>, int, v8::Local<v8::Value>*) [/home/muhammadyusuf-kurbonov/.nvm/versions/node/v22.4.0/bin/node]
 6: 0x114499c non-virtual thunk to node::crypto::CryptoJob<node::crypto::RandomBytesTraits>::AfterThreadPoolWork(int) [/home/muhammadyusuf-kurbonov/.nvm/versions/node/v22.4.0/bin/node]
 7: 0x1e6840d  [/home/muhammadyusuf-kurbonov/.nvm/versions/node/v22.4.0/bin/node]
 8: 0x1e6bde3  [/home/muhammadyusuf-kurbonov/.nvm/versions/node/v22.4.0/bin/node]
 9: 0x1e80b14  [/home/muhammadyusuf-kurbonov/.nvm/versions/node/v22.4.0/bin/node]
10: 0x1e6cb07 uv_run [/home/muhammadyusuf-kurbonov/.nvm/versions/node/v22.4.0/bin/node]
11: 0xe77d46 node::SpinEventLoopInternal(node::Environment*) [/home/muhammadyusuf-kurbonov/.nvm/versions/node/v22.4.0/bin/node]
12: 0xfc67b4  [/home/muhammadyusuf-kurbonov/.nvm/versions/node/v22.4.0/bin/node]
13: 0xfc724d node::NodeMainInstance::Run() [/home/muhammadyusuf-kurbonov/.nvm/versions/node/v22.4.0/bin/node]
14: 0xf29c8b node::Start(int, char**) [/home/muhammadyusuf-kurbonov/.nvm/versions/node/v22.4.0/bin/node]
15: 0x7fc4f6fe2248  [/lib64/libc.so.6]
16: 0x7fc4f6fe230b __libc_start_main [/lib64/libc.so.6]
17: 0xe743de _start [/home/muhammadyusuf-kurbonov/.nvm/versions/node/v22.4.0/bin/node]
Error: Test process exited with code null

Minimal, Reproducible Example

Can't share project (reproduce on empty project gives no success).

Output

2024-11-11 16:11:38.474 [info] Start test execution with env {"NODE_ENV":"test"}
2024-11-11 16:11:38.581 [debug] Syncing file {"$mid":1,"fsPath":"/home/muhammadyusuf-kurbonov/Projects/PROJ/backend/node_modules/.mocha-vscode/fullJsonStreamReporter.js","path":"/home/muhammadyusuf-kurbonov/Projects/PROJ/backend/node_modules/.mocha-vscode/fullJsonStreamReporter.js","scheme":"file"}
2024-11-11 16:12:13.900 [error] Error: Test process exited with code null
at ChildProcess. (/home/muhammadyusuf-kurbonov/.vscode/extensions/coderline.mocha-vscode-1.2.4/out/extension.js:592:708)
at ChildProcess.emit (node:events:519:28)
at ChildProcess._handle.onexit (node:internal/child_process:294:12)

Plugin Version Details

Name: Mocha for VS Code
Id: coderline.mocha-vscode
Description: Run and debug Mocha tests right within VS Code.
Version: 1.2.4
Publisher: CoderLine
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=coderline.mocha-vscode

VS Code Version Details

Version: 1.95.2
Commit: e8653663e8840adaf45af01eab5c627a5af81807
Date: 2024-11-07T11:07:22.054Z
Electron: 32.2.1
ElectronBuildId: 10427718
Chromium: 128.0.6613.186
Node.js: 20.18.0
V8: 12.8.374.38-electron.0
OS: Linux x64 6.11.6-300.fc41.x86_64

Further details

No response

@muhammadyusuf-kurbonov muhammadyusuf-kurbonov added the bug Something isn't working label Nov 11, 2024
@Danielku15
Copy link
Member

Interesting finding. Can you try debugging in VSCode standalone and see if the same thing happens?

  1. start a "JavaScript Debug Terminal" in VS Code
  2. enter the mocha test run command of your choice (or the same as you see in the output of the extension)

Might be a general VSCode problem when debugging these tests? Or maybe some sort of out-of-memory? Maybe you can obfuscate your real repo (similar structure, empty tests, randomized names) to get a reproducible example?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants