-
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
worker: fix heap snapshot crash on exit #43123
Closed
Closed
Conversation
This file contains 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
nodejs-github-bot
added
c++
Issues and PRs that require attention from people who are familiar with C++.
needs-ci
PRs that need a full CI run.
worker
Issues and PRs related to Worker support.
labels
May 17, 2022
legendecas
changed the title
src: remove unnecessary Worker.parent_port_ tracking
worker: remove unnecessary Worker.parent_port_ tracking
May 17, 2022
legendecas
force-pushed
the
worker-exit-heap-snapshot
branch
from
May 17, 2022 04:42
40f8b6b
to
ec262f6
Compare
legendecas
force-pushed
the
worker-exit-heap-snapshot
branch
3 times, most recently
from
May 17, 2022 04:53
425642e
to
21fedfe
Compare
legendecas
changed the title
worker: remove unnecessary Worker.parent_port_ tracking
worker: fix heap snapshot crash on exit
May 17, 2022
legendecas
force-pushed
the
worker-exit-heap-snapshot
branch
from
May 17, 2022 05:33
21fedfe
to
ede519a
Compare
joyeecheung
approved these changes
May 17, 2022
Worker.parent_port_ can be released before the exit event of Worker. The parent_port_ is not owned by `node::worker::Worker`, thus the reference to it is not always valid, and accessing it at exit crashes the process. As the Worker.parent_port_ is only used in the memory info tracking, it can be safely removed.
legendecas
force-pushed
the
worker-exit-heap-snapshot
branch
from
May 17, 2022 12:55
ede519a
to
8560e8e
Compare
github-actions
bot
removed
the
request-ci
Add this label to start a Jenkins CI on a PR.
label
May 17, 2022
28 tasks
addaleax
approved these changes
May 18, 2022
27 tasks
Landed in 448d5d1 |
legendecas
added a commit
that referenced
this pull request
May 19, 2022
Worker.parent_port_ can be released before the exit event of Worker. The parent_port_ is not owned by `node::worker::Worker`, thus the reference to it is not always valid, and accessing it at exit crashes the process. As the Worker.parent_port_ is only used in the memory info tracking, it can be safely removed. PR-URL: #43123 Fixes: #43122 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
28 tasks
This was referenced May 21, 2022
bengl
pushed a commit
that referenced
this pull request
May 30, 2022
Worker.parent_port_ can be released before the exit event of Worker. The parent_port_ is not owned by `node::worker::Worker`, thus the reference to it is not always valid, and accessing it at exit crashes the process. As the Worker.parent_port_ is only used in the memory info tracking, it can be safely removed. PR-URL: #43123 Fixes: #43122 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Merged
juanarbol
pushed a commit
that referenced
this pull request
May 31, 2022
Worker.parent_port_ can be released before the exit event of Worker. The parent_port_ is not owned by `node::worker::Worker`, thus the reference to it is not always valid, and accessing it at exit crashes the process. As the Worker.parent_port_ is only used in the memory info tracking, it can be safely removed. PR-URL: #43123 Fixes: #43122 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
danielleadams
pushed a commit
that referenced
this pull request
Jun 27, 2022
Worker.parent_port_ can be released before the exit event of Worker. The parent_port_ is not owned by `node::worker::Worker`, thus the reference to it is not always valid, and accessing it at exit crashes the process. As the Worker.parent_port_ is only used in the memory info tracking, it can be safely removed. PR-URL: #43123 Fixes: #43122 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
targos
pushed a commit
that referenced
this pull request
Jul 12, 2022
Worker.parent_port_ can be released before the exit event of Worker. The parent_port_ is not owned by `node::worker::Worker`, thus the reference to it is not always valid, and accessing it at exit crashes the process. As the Worker.parent_port_ is only used in the memory info tracking, it can be safely removed. PR-URL: #43123 Fixes: #43122 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
targos
pushed a commit
that referenced
this pull request
Jul 31, 2022
Worker.parent_port_ can be released before the exit event of Worker. The parent_port_ is not owned by `node::worker::Worker`, thus the reference to it is not always valid, and accessing it at exit crashes the process. As the Worker.parent_port_ is only used in the memory info tracking, it can be safely removed. PR-URL: #43123 Fixes: #43122 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
guangwong
pushed a commit
to noslate-project/node
that referenced
this pull request
Oct 10, 2022
Worker.parent_port_ can be released before the exit event of Worker. The parent_port_ is not owned by `node::worker::Worker`, thus the reference to it is not always valid, and accessing it at exit crashes the process. As the Worker.parent_port_ is only used in the memory info tracking, it can be safely removed. PR-URL: nodejs/node#43123 Fixes: nodejs/node#43122 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
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.
Worker.parent_port_ can be released before the exit event of Worker. The parent_port_ is not owned by
node::worker::Worker
, thus the reference to it is not always valid, and accessing it at exit crashes theprocess.
As the Worker.parent_port_ is only used in the memory info tracking, and the corresponding MessagePort
object is already been tracking with the
Worker.messagePort
javascript property , it can be safely removed.Fixes: #43122