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

Segmentation fault when workers exit #308

Closed
fmmoret opened this issue Aug 16, 2022 · 1 comment
Closed

Segmentation fault when workers exit #308

fmmoret opened this issue Aug 16, 2022 · 1 comment

Comments

@fmmoret
Copy link

fmmoret commented Aug 16, 2022

I get segfaults on node 16 and node 18 when I use these in workers.

I'm on linux gnu x64


Replication steps:

Just run node segfault.js with:

segfault.js

var import_worker_threads = require("worker_threads");

if (import_worker_threads.isMainThread) {
  const worker = new import_worker_threads.Worker("./segfault");
} else {
  var import_napi_rs = require("@napi-rs/package-template");
}

If the parent thread has also imported it, it seems to work fine:

segfault.js with parent import:

var import_worker_threads = require("worker_threads");
var import_napi_rs = require("@napi-rs/package-template");

if (import_worker_threads.isMainThread) {
  const worker = new import_worker_threads.Worker("./segfault");
}
@fmmoret
Copy link
Author

fmmoret commented Aug 16, 2022

@Brooooooklyn should I bubble this all the way up to https://github.com/napi-rs/napi-rs or some other place?

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

2 participants