Skip to content
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

src: drain platform tasks before taking startup snapshot #56403

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

legendecas
Copy link
Member

@legendecas legendecas commented Dec 30, 2024

Drain the loop and platform tasks before creating a snapshot. This is
necessary to ensure that the no roots are held by the the platform
tasks, which may reference objects associated with a context. For
example, a WeakRef may schedule an per-isolate platform task as a GC
root, and referencing an object in a context, causing an assertion in
the snapshot creator that objects must be serialized with a context.

Refs: #56292

Drain the loop and platform tasks before creating a snapshot. This is
necessary to ensure that the no roots are held by the the platform
tasks, which may reference objects associated with a context. For
example, a WeakRef may schedule an per-isolate platform task as a GC
root, and referencing an object in a context, causing an assertion in
the snapshot creator.
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/startup

@nodejs-github-bot 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. labels Dec 30, 2024
Copy link

codecov bot commented Dec 30, 2024

Codecov Report

Attention: Patch coverage is 71.42857% with 2 lines in your changes missing coverage. Please review.

Project coverage is 88.54%. Comparing base (c94a9db) to head (4642ec5).
Report is 14 commits behind head on main.

Files with missing lines Patch % Lines
src/node_snapshotable.cc 71.42% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #56403      +/-   ##
==========================================
- Coverage   88.55%   88.54%   -0.02%     
==========================================
  Files         657      657              
  Lines      190658   190738      +80     
  Branches    36589    36603      +14     
==========================================
+ Hits       168837   168888      +51     
- Misses      15009    15035      +26     
- Partials     6812     6815       +3     
Files with missing lines Coverage Δ
src/node_snapshotable.cc 75.13% <71.42%> (ø)

... and 42 files with indirect coverage changes

@legendecas legendecas added the request-ci Add this label to start a Jenkins CI on a PR. label Dec 30, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 30, 2024
@nodejs-github-bot
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants