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

stop relying on process._fatalException #18

Closed
3 tasks
isaacs opened this issue Nov 13, 2022 · 2 comments
Closed
3 tasks

stop relying on process._fatalException #18

isaacs opened this issue Nov 13, 2022 · 2 comments

Comments

@isaacs
Copy link
Member

isaacs commented Nov 13, 2022

Since node 16, the approach used here has been causing C++ assertion errors and stack dumps in some cases when handling a rejected promise.

$ node --unhandled-rejections=strict test/fixtures/promise-rejections.js
CAUGHT unhandledRejection happy
node[33732]: ../src/api/callback.cc:141:void node::InternalCallbackScope::Close(): Assertion `(env_->execution_async_id()) == (0)' failed.
 1: 0x10010a200 node::Abort() [/usr/local/bin/node]
 2: 0x10010a040 node::AppendExceptionLine(node::Environment*, v8::Local<v8::Value>, v8::Local<v8::Message>, node::ErrorHandlingMode) [/usr/local/bin/node]
 3: 0x100054d8c node::InternalCallbackScope::Close() [/usr/local/bin/node]
 4: 0x1000547c4 node::InternalCallbackScope::~InternalCallbackScope() [/usr/local/bin/node]
 5: 0x1000b19d4 node::Environment::RunAndClearNativeImmediates(bool) [/usr/local/bin/node]
 6: 0x1000b12d8 node::Environment::CheckImmediate(uv_check_s*) [/usr/local/bin/node]
 7: 0x100a22b9c uv__run_check [/usr/local/bin/node]
 8: 0x100a1c8f8 uv_run [/usr/local/bin/node]
 9: 0x1000556d4 node::SpinEventLoop(node::Environment*) [/usr/local/bin/node]
10: 0x100145128 node::NodeMainInstance::Run() [/usr/local/bin/node]
11: 0x1000d8ec8 node::LoadSnapshotDataAndRun(node::SnapshotData const**, node::InitializationResult const*) [/usr/local/bin/node]
12: 0x1000d9190 node::Start(int, char**) [/usr/local/bin/node]
13: 0x1a802fe50 start [/usr/lib/dyld]
Abort trap: 6
@isaacs
Copy link
Member Author

isaacs commented Nov 13, 2022

Moving new support level to node >=14 is probably a good idea for plenty of other reasons, and it has all the requisite methods and events.

@isaacs
Copy link
Member Author

isaacs commented Nov 15, 2022

fixed on v3

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

1 participant