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

Using worker threads causes some native modules to crash #265

Open
asztal opened this issue Sep 25, 2019 · 3 comments
Open

Using worker threads causes some native modules to crash #265

asztal opened this issue Sep 25, 2019 · 3 comments

Comments

@asztal
Copy link

asztal commented Sep 25, 2019

Is there a way to disable the node v12 behaviour where mocha-parallel-tests uses worker threads?

As great as it sounds, it's causing an issue with some native modules which are not context-aware and crash when loaded in a worker thread, for example node-sass:
sass/node-sass#2746

If I were to contribute such an option, how would you want it to be done (--some-option, environment variable, something else)?

@asztal asztal changed the title Using worker threads can be a breaking change Using worker threads causes some native modules to crash Sep 25, 2019
@1999
Copy link
Collaborator

1999 commented Sep 26, 2019

Interesting. My preference would be having an environment variable because it's more like an emergency measure rather than an intended behaviour change based on the flag. Happy to review the PR.

slava-t pushed a commit to slava-t/mocha-parallel-tests that referenced this issue Mar 18, 2020
@slava-t
Copy link

slava-t commented Mar 18, 2020

Created a pull request for this issue

slava-t pushed a commit to slava-t/mocha-parallel-tests that referenced this issue Mar 22, 2020
slava-t pushed a commit to slava-t/mocha-parallel-tests that referenced this issue Mar 22, 2020
@silasdavis
Copy link

I am wondering if I might be hitting something similar with the grpc native modules:

FATAL ERROR: HandleScope::HandleScope Entering the V8 API without proper locking in place
 1: 0x9dab80 node::Abort() [/home/silas/.nvm/versions/node/v12.15.0/bin/node]
 2: 0x9dbd36 node::OnFatalError(char const*, char const*) [/home/silas/.nvm/versions/node/v12.15.0/bin/node]
 3: 0xb3b22a v8::Utils::ReportApiFailure(char const*, char const*) [/home/silas/.nvm/versions/node/v12.15.0/bin/node]
 4: 0xb3c7ae v8::HandleScope::HandleScope(v8::Isolate*) [/home/silas/.nvm/versions/node/v12.15.0/bin/node]
 5: 0x94a98e node::InternalCallbackScope::InternalCallbackScope(node::Environment*, v8::Local<v8::Object>, node::async_context const&, node::InternalCallbackScope::ResourceExpectation) [/home/silas/.nvm/versions/node/v12.15.0/bin/node]
 6: 0x94b8a5 node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*, node::async_context) [/home/silas/.nvm/versions/node/v12.15.0/bin/node]
 7: 0x7fc130c89abc  [/home/silas/code/platform/node_modules/grpc/src/node/extension_binary/node-v72-linux-x64-glibc/grpc_node.node]
 8: 0x7fc130c94193  [/home/silas/code/platform/node_modules/grpc/src/node/extension_binary/node-v72-linux-x64-glibc/grpc_node.node]
 9: 0x12df7ec  [/home/silas/.nvm/versions/node/v12.15.0/bin/node]
10: 0x12d856c uv_run [/home/silas/.nvm/versions/node/v12.15.0/bin/node]
11: 0xa1d120 node::NodeMainInstance::Run() [/home/silas/.nvm/versions/node/v12.15.0/bin/node]
12: 0x9acb78 node::Start(int, char**) [/home/silas/.nvm/versions/node/v12.15.0/bin/node]
13: 0x7fc139b0a023 __libc_start_main [/usr/lib/libc.so.6]
14: 0x94a115  [/home/silas/.nvm/versions/node/v12.15.0/bin/node]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants