Skip to content

src: do not track BaseObjects via cleanup hooks - #33809

Closed
addaleax wants to merge 1 commit into
nodejs:masterfrom
addaleax:no-cleanup-hook-tracking
Closed

src: do not track BaseObjects via cleanup hooks#33809
addaleax wants to merge 1 commit into
nodejs:masterfrom
addaleax:no-cleanup-hook-tracking

Conversation

@addaleax

Copy link
Copy Markdown
Member

Since f59ec2a, BaseObject instances were tracked in heap snapshots
through their associated CleanupHookCallbacks which were stored on
the Environment; however, this is inaccurate, because:

Thus, this is a partial revert of f59ec2a.

Refs: #33468
Refs: #27018

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

Since f59ec2a, `BaseObject` instances were tracked in heap snapshots
through their associated `CleanupHookCallback`s which were stored on
the `Environment`; however, this is inaccurate, because:
- Edges in heap dumps imply a keeps-alive relationship, but cleanup
hooks do not keep the `BaseObject`s that they point to alive.
- It loses information about whether `BaseObject` instances are
GC roots: Even weak `BaseObject`s are now, practically speaking,
showing up as hanging off a GC root when that isn’t actually the case
(e.g. in the description of nodejs#33468).
Thus, this is a partial revert of f59ec2a.
Refs: nodejs#33468
Refs: nodejs#27018
@nodejs-github-botnodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label Jun 9, 2020
@addaleaxaddaleax added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jun 10, 2020
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@addaleax

Copy link
Copy Markdown
MemberAuthor

Landed in bafd544

addaleax added a commit that referenced this pull request Jun 11, 2020
Since f59ec2a, `BaseObject` instances were tracked in heap snapshots
through their associated `CleanupHookCallback`s which were stored on
the `Environment`; however, this is inaccurate, because:
- Edges in heap dumps imply a keeps-alive relationship, but cleanup
hooks do not keep the `BaseObject`s that they point to alive.
- It loses information about whether `BaseObject` instances are
GC roots: Even weak `BaseObject`s are now, practically speaking,
showing up as hanging off a GC root when that isn’t actually the case
(e.g. in the description of #33468).
Thus, this is a partial revert of f59ec2a.
Refs: #33468
Refs: #27018
PR-URL: #33809
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@addaleax
addaleax deleted the no-cleanup-hook-tracking branch June 11, 2020 21:40
codebytere pushed a commit that referenced this pull request Jun 18, 2020
Since f59ec2a, `BaseObject` instances were tracked in heap snapshots
through their associated `CleanupHookCallback`s which were stored on
the `Environment`; however, this is inaccurate, because:
- Edges in heap dumps imply a keeps-alive relationship, but cleanup
hooks do not keep the `BaseObject`s that they point to alive.
- It loses information about whether `BaseObject` instances are
GC roots: Even weak `BaseObject`s are now, practically speaking,
showing up as hanging off a GC root when that isn’t actually the case
(e.g. in the description of #33468).
Thus, this is a partial revert of f59ec2a.
Refs: #33468
Refs: #27018
PR-URL: #33809
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@codebyterecodebytere mentioned this pull request Jun 28, 2020
codebytere pushed a commit that referenced this pull request Jun 30, 2020
Since f59ec2a, `BaseObject` instances were tracked in heap snapshots
through their associated `CleanupHookCallback`s which were stored on
the `Environment`; however, this is inaccurate, because:
- Edges in heap dumps imply a keeps-alive relationship, but cleanup
hooks do not keep the `BaseObject`s that they point to alive.
- It loses information about whether `BaseObject` instances are
GC roots: Even weak `BaseObject`s are now, practically speaking,
showing up as hanging off a GC root when that isn’t actually the case
(e.g. in the description of #33468).
Thus, this is a partial revert of f59ec2a.
Refs: #33468
Refs: #27018
PR-URL: #33809
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
codebytere pushed a commit that referenced this pull request Jul 10, 2020
Since f59ec2a, `BaseObject` instances were tracked in heap snapshots
through their associated `CleanupHookCallback`s which were stored on
the `Environment`; however, this is inaccurate, because:
- Edges in heap dumps imply a keeps-alive relationship, but cleanup
hooks do not keep the `BaseObject`s that they point to alive.
- It loses information about whether `BaseObject` instances are
GC roots: Even weak `BaseObject`s are now, practically speaking,
showing up as hanging off a GC root when that isn’t actually the case
(e.g. in the description of #33468).
Thus, this is a partial revert of f59ec2a.
Refs: #33468
Refs: #27018
PR-URL: #33809
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@codebyterecodebytere mentioned this pull request Jul 13, 2020
codebytere pushed a commit that referenced this pull request Jul 14, 2020
Since f59ec2a, `BaseObject` instances were tracked in heap snapshots
through their associated `CleanupHookCallback`s which were stored on
the `Environment`; however, this is inaccurate, because:
- Edges in heap dumps imply a keeps-alive relationship, but cleanup
hooks do not keep the `BaseObject`s that they point to alive.
- It loses information about whether `BaseObject` instances are
GC roots: Even weak `BaseObject`s are now, practically speaking,
showing up as hanging off a GC root when that isn’t actually the case
(e.g. in the description of #33468).
Thus, this is a partial revert of f59ec2a.
Refs: #33468
Refs: #27018
PR-URL: #33809
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.c++Issues and PRs that require attention from people who are familiar with C++.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@addaleax@nodejs-github-bot@jasnell@cjihrig