src,worker: fix race of WorkerHeapSnapshotTaker#44745
Merged
nodejs-github-bot merged 1 commit intonodejs:mainfrom Oct 6, 2022
Merged
src,worker: fix race of WorkerHeapSnapshotTaker#44745nodejs-github-bot merged 1 commit intonodejs:mainfrom
nodejs-github-bot merged 1 commit intonodejs:mainfrom
Conversation
addaleax
approved these changes
Sep 24, 2022
Contributor
Author
|
test/sequential/test-watch-mode.mjs failed. However, it is a known issue, fixed in #44739 |
Contributor
Author
|
@addaleax Could you help moving this PR forward? |
Any WorkerHeapSnapshotTaker instance should be fully owned by main thread. Remove buggy access to it from the worker thread.
aa28fc3 to
76845e1
Compare
Contributor
Author
|
Hey, any idea? :) |
Collaborator
jasnell
approved these changes
Oct 2, 2022
Contributor
Author
|
Shall we proceed to get this PR landed? |
juanarbol
approved these changes
Oct 4, 2022
Member
juanarbol
left a comment
There was a problem hiding this comment.
LGTM; I'm AFK, unless someone else is faster than me. I will land this one. Thanks for this 💚
Contributor
Author
|
Another 3 failure of running |
Collaborator
|
Landed in 66cedb4 |
danielleadams
pushed a commit
that referenced
this pull request
Oct 11, 2022
Any WorkerHeapSnapshotTaker instance should be fully owned by main thread. Remove buggy access to it from the worker thread. PR-URL: #44745 Fixes: #44515 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Juan José Arboleda <[email protected]>
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 free
to 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.
Fix: #44515 #39686
maybe more... there are serval crash reports about
worker heap snapshotWith one extra line of code, this concurency bug can be easily demonstrated and reproduced.
Since
BaseObjectPtris not thread safe(no synchronization around checking and manipulating the refcnt), the fix is to ensureWorkerHeapSnapshotTakeris not shared by worker thread and main thread