Uh oh!
There was an error while loading. Please reload this page.
src: enter isolate before destructing IsolateData - #51138
Merged
Conversation
MVP fix for a worker_threads crash where ~WorkerThreadData() -> ~IsolateData() -> Isolate::DetachCppHeap() kicks off a round of garbage collection that expects an entered isolate. No test because the crash is not reliably reproducable but the bug is pretty clearly described in the linked issue and is obvious once you see it, IMO. Fixes: nodejs#51129
This comment was marked as outdated.
This comment was marked as outdated.
targos
commented
Dec 13, 2023
Member
@nodejs/cpp-reviewers |
lpinca
commented
Dec 13, 2023
Member
@nodejs/workers |
santigimeno
approved these changes
Dec 13, 2023
joyeecheung
approved these changes
Dec 14, 2023
legendecas
approved these changes
Dec 14, 2023
This comment was marked as outdated.
This comment was marked as outdated.
benjamingr
approved these changes
Dec 14, 2023
tniessen
approved these changes
Dec 15, 2023
Member
By the way it just occurred to me - consider this non-blocking - why can we not just do this directly in the IsolateData destructor instead? That would correct this for the embedder-facing |
bnoordhuis
commented
Dec 16, 2023
MemberAuthor
I considered that but I'm not 100% sure it won't cause deadlocks. |
UlisesGascon
approved these changes
Dec 20, 2023
Qard
approved these changes
Dec 20, 2023
This comment was marked as outdated.
This comment was marked as outdated.
nodejs-github-bot
commented
Dec 23, 2023
Collaborator
nodejs-github-bot
commented
Dec 24, 2023
Collaborator
nodejs-github-bot
commented
Dec 25, 2023
Collaborator
nodejs-github-bot
commented
Dec 25, 2023
Collaborator
Landed in aa87b77 |
RafaelGSS pushed a commit
that referenced
this pull request
Jan 2, 2024
MVP fix for a worker_threads crash where ~WorkerThreadData() -> ~IsolateData() -> Isolate::DetachCppHeap() kicks off a round of garbage collection that expects an entered isolate. No test because the crash is not reliably reproducable but the bug is pretty clearly described in the linked issue and is obvious once you see it, IMO. Fixes: #51129 PR-URL: #51138 Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Merged
richardlau pushed a commit
that referenced
this pull request
Mar 25, 2024
MVP fix for a worker_threads crash where ~WorkerThreadData() -> ~IsolateData() -> Isolate::DetachCppHeap() kicks off a round of garbage collection that expects an entered isolate. No test because the crash is not reliably reproducable but the bug is pretty clearly described in the linked issue and is obvious once you see it, IMO. Fixes: #51129 PR-URL: #51138 Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
MVP fix for a worker_threads crash where ~WorkerThreadData() -> ~IsolateData() -> Isolate::DetachCppHeap() kicks off a round of garbage collection that expects an entered isolate.
No test because the crash is not reliably reproducable but the bug is pretty clearly described in the linked issue and is obvious once you see it, IMO.
Fixes: #51129