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

lib: clean up persisted signals when they are settled #56001

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

geeksilva97
Copy link
Contributor

@geeksilva97 geeksilva97 commented Nov 26, 2024

Refs #55328
Fixes #55328

This PR adds a finalizer to the non-composed signals used in AbortSignal.any. With that finalizer, those settled signals can be removed from gcPersistentSignals.

Comparison

This comparison shows that settled signals are being collected.

image

@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label Nov 26, 2024
@geeksilva97 geeksilva97 changed the title lib: settle signals when controller's signal is GCed lib: unpersist signals when they are settled Nov 26, 2024
@geeksilva97 geeksilva97 changed the title lib: unpersist signals when they are settled lib: clean up persisted signals when they are settled Nov 26, 2024
Copy link

codecov bot commented Nov 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.96%. Comparing base (3bb1d28) to head (9d3074e).
Report is 14 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #56001   +/-   ##
=======================================
  Coverage   87.95%   87.96%           
=======================================
  Files         656      656           
  Lines      188310   188325   +15     
  Branches    35963    35975   +12     
=======================================
+ Hits       165630   165657   +27     
+ Misses      15854    15842   -12     
  Partials     6826     6826           
Files with missing lines Coverage Δ
lib/internal/abort_controller.js 98.11% <100.00%> (+0.05%) ⬆️

... and 27 files with indirect coverage changes

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

@aduh95 aduh95 added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Nov 27, 2024
@nodejs-github-bot
Copy link
Collaborator

Copy link
Member

@jazelly jazelly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not blocking, but looks like this fixed the repro reported by the OP, but not the one mentioned at #55328 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AbortController/AbortSignal memory leak
5 participants