Skip to content

fix(core): ensure references are cleared from idle scheduler - #70730

Open
crisbeto wants to merge 1 commit into
angular:mainfrom
crisbeto:70728/idle-error
Open

crisbeto wants to merge 1 commit into
angular:mainfrom
crisbeto:70728/idle-error

Conversation

@crisbeto

Copy link
Copy Markdown
Member

Fixes that the idle scheduler might fail to clear a reference if an error is thrown.

Fixes #70728.

Fixes that the idle scheduler might fail to clear a reference if an error is thrown.

Fixes angular#70728.
@crisbeto crisbeto added action: review The PR is still awaiting reviews from at least one requested reviewer target: patch This PR is targeted for the next patch release labels Sep 15, 2026
@angular-robot angular-robot Bot added the area: core Issues related to the framework runtime label Sep 15, 2026
@ngbot ngbot Bot added this to the Backlog milestone Sep 15, 2026
@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Sep 16, 2026
@crisbeto

Copy link
Copy Markdown
Member Author

Caretaker note: presubmit failure is pre-existing.

@COOLak

COOLak commented Sep 17, 2026

Copy link
Copy Markdown

Thank you for working on this. I reran the original issue reproduction against head d8645885bb5167df04732333774a8610f95550e2: the callback is removed, but both a one-time callback exception and a one-time _tick() exception still leave the expired idleId set. Remaining work and a fresh add() never receive a native callback (2 queued, 0 scheduled), in both idle-deadline and timeout-fallback modes. The no-error controls drain normally.

Full six-case results and exact reproduction adjustment: #70728 (comment)

Please also make clearing the in-flight handle exception-safe while preserving error propagation and re-entrancy protection, and cover the fresh-add-after-error case. The deadline-exhausted path deserves coverage because break inside finally can suppress a pending exception.

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

Labels

action: merge The PR is ready for merge by the caretaker area: core Issues related to the framework runtime merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

core: IdleScheduler permanently strands a bucket after a callback or ApplicationRef._tick throws

3 participants