Skip to content

SIGABRT when a napi future resolves on a terminated node worker thread #2460

Description

@AndrewKumansley-at

Hey NAPI folks,

We use napi in conjunction with node worker threads that are subject to termination. When some (napi) async work extends beyond the life of a worker thread, instead of simply dropping any outstanding promises, we get a SIGABRT.

Here's a minimal repro:

https://github.com/AndrewKumansley-at/napi-repro

npm run build
./run_until_sigabrt.sh

It looks to me like there used to be a mechanism for detecting and short circuiting this case (THREAD_DESTROYED), but it was removed in 0dc1ef7.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions