Skip to content

lib: release fired timeout in AbortSignal.any() - #66619

Open
lazerg wants to merge 1 commit into
nodejs:mainfrom
lazerg:fix/issue-66611-abortsignal-any-fired-timeout
Open

lazerg wants to merge 1 commit into
nodejs:mainfrom
lazerg:fix/issue-66611-abortsignal-any-fired-timeout

Conversation

@lazerg

@lazerg lazerg commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Fixes: #66611
Refs: #57867

AbortSignal.any() adds every AbortSignal.timeout() input to gcPersistentSignals before it checks whether that input has already aborted. For a timeout that already fired, it then returns early. The timeout never fires again, so nothing removes it from the set, and it is never collected.

This moves the aborted check in front of the timeout handling, so an aborted input is never added to the set. The new test fails without the change, and the reproduction from the issue goes from 200/200 to 1/200 retained timeouts.

Signed-off-by: lazerg <lazerg2@gmail.com>
Assisted-by: Claude
@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label Oct 9, 2026
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Caution

AgentScan found account activity patterns that may be consistent with automation. This is a heuristic, not proof that this pull request was opened by an agent or violates policy. AI-assisted contributions are permitted, but automated tooling must not open pull requests without advance approval, and contributors must personally understand, test, verify, and take responsibility for every submitted change. See the AgentScan analysis, AI use policy, and automation policy for additional context.

@codecov

codecov Bot commented Oct 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.43%. Comparing base (f9defa6) to head (38a2e11).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #66619      +/-   ##
==========================================
- Coverage   90.43%   90.43%   -0.01%     
==========================================
  Files         791      791              
  Lines      276563   276585      +22     
  Branches    53115    53118       +3     
==========================================
+ Hits       250117   250125       +8     
- Misses      16850    16860      +10     
- Partials     9596     9600       +4     
Files with missing lines Coverage Δ
lib/internal/abort_controller.js 95.40% <100.00%> (ø)

... and 23 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agentscan:community-flagged needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AbortSignal.any() keeps an AbortSignal.timeout() that has already fired alive forever

2 participants