-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Node SEA with useSnapshot
cannot start worker thread
#56077
Labels
single-executable
Issues and PRs related to single-executable applications
snapshot
Issues and PRs related to the startup snapshot
Comments
This also breaks the esm loader hooks because it also runs in a thread. |
Looks like here: Lines 322 to 350 in 03ec900
|
VoltrexKeyva
added
the
single-executable
Issues and PRs related to single-executable applications
label
Dec 2, 2024
Hmm, looks like we just need to skip the SEA stuff for worker threads during bootstrap, since that's meant for the main thread anyway. |
nodejs-github-bot
pushed a commit
that referenced
this issue
Dec 7, 2024
Snapshot main functions are only loaded for main threads in single executable applications. Update the check to avoid asserting it in worker threads - this allows worker threads to be spawned in snapshot main functions bundled into a single executable application. PR-URL: #56120 Fixes: #56077 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
aduh95
pushed a commit
that referenced
this issue
Dec 10, 2024
Snapshot main functions are only loaded for main threads in single executable applications. Update the check to avoid asserting it in worker threads - this allows worker threads to be spawned in snapshot main functions bundled into a single executable application. PR-URL: #56120 Fixes: #56077 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
ruyadorno
pushed a commit
that referenced
this issue
Dec 20, 2024
Snapshot main functions are only loaded for main threads in single executable applications. Update the check to avoid asserting it in worker threads - this allows worker threads to be spawned in snapshot main functions bundled into a single executable application. PR-URL: #56120 Fixes: #56077 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
single-executable
Issues and PRs related to single-executable applications
snapshot
Issues and PRs related to the startup snapshot
Version
v22.11.0
Platform
Subsystem
sea
What steps will reproduce the bug?
Generate a SEA and start a worker thread in it
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior? Why is that the expected behavior?
Thread can be started.
What do you see instead?
Native stack trace
Additional information
The text was updated successfully, but these errors were encountered: