Skip to content

Fix root predicates - #98942

Merged
lukesandberg merged 3 commits into
gc-10-5-only-remove-removed-edgesfrom
gc-10-75-roots-are-transiently-retained
Sep 25, 2026
Merged

lukesandberg merged 3 commits into
gc-10-5-only-remove-removed-edgesfrom
gc-10-75-roots-are-transiently-retained

Conversation

@lukesandberg

@lukesandberg lukesandberg commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

Fix the definition of GC roots to account for all transient references

There was a categorical mistake in how uppers and collectible_dependents were interpreted. Both of these refer to a task above us and this is it is a reference but the reference might be comming from transient or persistent tasks. This is what kept confusing the 'root' definition

So the new definition is simply

  • You are collectible if there are no references (persistent or transient)
  • You are a root if there are only transient references, which includes transient uppers and collectible_dependents

The old definition expected roots to have no uppers at all, which isn't correct. A run_once task becomes an aggregation root and so the nested persistent tasks reference it as an upper. Those tasks should become gc roots since they are on the transient <--> persistent boundary and the only thing retaining them is references from transient tasks.

@lukesandberg
lukesandberg added this pull request to stack #98943 September 19, 2026 18:16
@github-actions

github-actions Bot commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

Tests Passed

Commit: a89a10a

@lukesandberg
lukesandberg force-pushed the gc-10-75-roots-are-transiently-retained branch from 9a92d80 to 22bf86e Compare September 19, 2026 18:17
@lukesandberg
lukesandberg marked this pull request as ready for review September 20, 2026 17:32
@lukesandberg
lukesandberg force-pushed the gc-10-75-roots-are-transiently-retained branch from a9c39a7 to 4a8c9c1 Compare September 20, 2026 18:40
@lukesandberg
lukesandberg force-pushed the gc-10-75-roots-are-transiently-retained branch from 4a8c9c1 to c50f2e8 Compare September 23, 2026 20:52
@lukesandberg
lukesandberg removed this pull request from stack #98943 September 23, 2026 21:45
@lukesandberg
lukesandberg force-pushed the gc-10-75-roots-are-transiently-retained branch from c50f2e8 to b756956 Compare September 23, 2026 21:45
@lukesandberg
lukesandberg added this pull request to stack #99126 September 23, 2026 21:45
@lukesandberg
lukesandberg force-pushed the gc-10-75-roots-are-transiently-retained branch from b756956 to 1a03e0e Compare September 23, 2026 22:23
@lukesandberg
lukesandberg force-pushed the gc-10-75-roots-are-transiently-retained branch from 1a03e0e to c9d4a5a Compare September 24, 2026 06:22
@lukesandberg
lukesandberg removed this pull request from stack #99126 September 24, 2026 06:27
@lukesandberg
lukesandberg force-pushed the gc-10-75-roots-are-transiently-retained branch from c9d4a5a to 57b9406 Compare September 24, 2026 06:27
@lukesandberg
lukesandberg added this pull request to stack #99146 September 24, 2026 06:27
@lukesandberg
lukesandberg force-pushed the gc-10-75-roots-are-transiently-retained branch from 57b9406 to 1641fa9 Compare September 24, 2026 16:09
@lukesandberg
lukesandberg force-pushed the gc-10-75-roots-are-transiently-retained branch 2 times, most recently from d95fd68 to dff1839 Compare September 24, 2026 16:44
@lukesandberg
lukesandberg force-pushed the gc-10-75-roots-are-transiently-retained branch from dff1839 to a89a10a Compare September 25, 2026 00:15
@lukesandberg
lukesandberg merged commit cb95ca3 into canary Sep 25, 2026
184 of 186 checks passed
@lukesandberg
lukesandberg deleted the gc-10-75-roots-are-transiently-retained branch September 25, 2026 02:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants