Title: `AbortSignal.any()` can lose an abort when its source is garbage-collected · Issue #65995 · nodejs/node · GitHub
Open Graph Title: `AbortSignal.any()` can lose an abort when its source is garbage-collected · Issue #65995 · nodejs/node
X Title: `AbortSignal.any()` can lose an abort when its source is garbage-collected · Issue #65995 · nodejs/node
Description: Version Reproduced on v24.16.0, v26.1.0, v26.3.1, and v26.8.2. The same example works correctly on v22.14.0, v22.23.2, v24.0.0, and v25.8.2. Platform Linux 6.8.0-139-generic x86_64 Subsystem lib What steps will reproduce the bug? Save as...
Open Graph Description: Version Reproduced on v24.16.0, v26.1.0, v26.3.1, and v26.8.2. The same example works correctly on v22.14.0, v22.23.2, v24.0.0, and v25.8.2. Platform Linux 6.8.0-139-generic x86_64 Subsystem lib Wh...
X Description: Version Reproduced on v24.16.0, v26.1.0, v26.3.1, and v26.8.2. The same example works correctly on v22.14.0, v22.23.2, v24.0.0, and v25.8.2. Platform Linux 6.8.0-139-generic x86_64 Subsystem lib Wh...
Opengraph URL: https://github.com/nodejs/node/issues/65995
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`AbortSignal.any()` can lose an abort when its source is garbage-collected","articleBody":"### Version\n\nReproduced on v24.16.0, v26.1.0, v26.3.1, and v26.8.2. The same example works correctly on v22.14.0, v22.23.2, v24.0.0, and v25.8.2.\n\n### Platform\n\n```text\nLinux 6.8.0-139-generic x86_64\n```\n\n### Subsystem\n\nlib\n\n### What steps will reproduce the bug?\n\nSave as `repro.mjs` and run `node --expose-gc repro.mjs`:\n\n```js\nimport { setImmediate } from \"node:timers/promises\";\n\nlet controller = new AbortController();\nconst signal = AbortSignal.any([controller.signal]);\n\ncontroller.abort(\"stop\");\ncontroller = null;\n\nawait setImmediate();\nglobal.gc();\n\nconsole.log({ aborted: signal.aborted, reason: signal.reason });\nsignal.throwIfAborted();\nconsole.log(\"throwIfAborted() did not throw\");\n```\n\n### How often does it reproduce? Is there a required condition?\n\nAlways (20/20 attempts on v26.8.2).\n\n### What is the expected behavior? Why is that the expected behavior?\n\nExpected: `{ aborted: true, reason: 'stop' }`, followed by `throwIfAborted()` throwing `\"stop\"`.\n\nThe [DOM abort algorithm](https://dom.spec.whatwg.org/#abortsignal-signal-abort) sets dependent signals’ abort reasons during abortion, regardless of whether they have listeners.\n\n### What do you see instead?\n\n\n```\n{ aborted: false, reason: undefined }\nthrowIfAborted() did not throw\n```\n\n### Additional information\n\nThe likely cause is the lazy propagation introduced by #62367: a subsequent state check cannot recover the abort reason once the weakly referenced source has been collected.\n\nI would appreciate a revert of that ASAP, until a proper fix can be included, as this is hurting jsdom pretty substantially.","author":{"url":"https://github.com/domenic","@type":"Person","name":"domenic"},"datePublished":"2026-09-12T05:17:04Z","url":"https://github.com/nodejs/node/issues/65995"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:17aeb950-33f2-467a-7fc6-9bda4d1364bf |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E152:40612:26A75E:35218A:6AED48B1 |
| html-safe-nonce | f448776962938465c7d5dbb27ab608177117dc72d94c633c96c49d00cdf00f8c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMTUyOjQwNjEyOjI2QTc1RTozNTIxOEE6NkFFRDQ4QjEiLCJ2aXNpdG9yX2lkIjoiNTgwMTYwNDYzNTEwODkxOTQ3MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | c8be1c885b57f3f6dcb1325634dfbd3aed4f40706756f36f6f78ed7736f541f4 |
| hovercard-subject-tag | issue:5431353602 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/65995/issue_layout |
| twitter:image | https://opengraph.githubassets.com/54393f9898fd0cdf52b78760e3a19f1f5c015934b0c9a56c05da920b179e48a7/nodejs/node/issues/65995 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/54393f9898fd0cdf52b78760e3a19f1f5c015934b0c9a56c05da920b179e48a7/nodejs/node/issues/65995 |
| og:image:alt | Version Reproduced on v24.16.0, v26.1.0, v26.3.1, and v26.8.2. The same example works correctly on v22.14.0, v22.23.2, v24.0.0, and v25.8.2. Platform Linux 6.8.0-139-generic x86_64 Subsystem lib Wh... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | domenic |
| hostname | github.com |
| expected-hostname | github.com |
| None | 56fb42677ae87ed3e64410323d67980aa65d0485568a7858f874e7edfc6d1c11 |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9c9a37e2423ed382cf39f70b5aa4b4858b40a3b0 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width