Skip to content

fix(async_hooks): defer destroy until execution scopes finish - #11761

Draft
proggeramlug wants to merge 5 commits into
mainfrom
codex/async-destroy-order-20261002
Draft

proggeramlug wants to merge 5 commits into
mainfrom
codex/async-destroy-order-20261002

Conversation

@proggeramlug

@proggeramlug proggeramlug commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

A timer callback checkpoint can drain queued destroy hooks before the enclosing async scope emits its after hook. Defer queue draining while the execution stack is nonempty, preserving queued resources until the next outer checkpoint. The regression checks nested scopes, retained queued resources and exactly one final drain. The old implementation fails the new unit with drain count 2 versus expected 0; the fixed eight-unit suite passes.

Current head is 00ad2a4f20224df7083ce8173852c6d90fd2940f, including main 7443a2b088564dfcbfa85dc82b9e97e26d9a0c2f and the PR-keyed changeset. Final-head Linux validation uses nightly 2026-08-20, LLVM 22.1.8 and pinned Node 26.5.1:

  • Release compiler and both matching static archives built; the original compiled issue_6764_async_hooks_lifecycle integration passed.
  • The retained-object interval variant matched Node under forced evacuation, verification, protected from-space and seeded schedule stress: 20 copying minors and 8,487 copied objects.
  • Full serial runtime: 4,747 passed, zero failed, five ignored. Full serial stdlib: 244 passed, zero failed.
  • CI-pinned cargo-xwin 0.23.0 was SHA256 verified; the Windows runtime/stdlib type-check passed in 116.91 seconds. Full script lint passed all 111 gates in 537.65 seconds. The compile tier and two CI-only commands were explicitly skipped.

Both current-head whole GC jobs succeeded: shadow root dominance and native statepoints root dominance. The earlier cancelled/skipped run is not used for approval.

Two earlier failed attempts remain recorded: the initial lint attempt lacked cargo-xwin, then passed after installing the pinned tool; a separate original-getter diagnostic reproduced the builtin-class-ID assertion 0xffff0024. Its combined runner reports failure despite both full-suite phases passing. That getter problem is repaired separately by #11766; this PR does not claim to fix it or that its failed diagnostic passed.

Draft pending final product coherence and hosted PR acceptance. The test-routing and shard-budget repairs in #11756 are relevant to the remaining queue CI. No overall CI or merge approval is claimed.

@coderabbitai

coderabbitai Bot commented Oct 2, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@proggeramlug proggeramlug added the run-extended-tests Opt PR into compile-smoke/parity/doc-tests/drizzle-mysql-smoke label Oct 2, 2026

This branch has not been deployed

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

Labels

run-extended-tests Opt PR into compile-smoke/parity/doc-tests/drizzle-mysql-smoke

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant