Conversation
Contributor
|
Tagging subscribers to this area: @dotnet/gc |
mangod9
reviewed
Oct 11, 2024
mangod9
approved these changes
Oct 11, 2024
Member
Author
|
/backport to release/9.0 |
Contributor
|
Started backporting to release/9.0: https://github.com/dotnet/runtime/actions/runs/11287169324 |
3 tasks
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
this was a regression introduced in #105545. this would only manifest during the beginning of a process when we needed to grow the # of heaps (and can grow) and we haven't done a gen2 GC yet so we set it to doing one.
the problem is the check I made did not include the ephemeral GC that may happen at the beginning of a BGC before we set
gc_background_runningto true. so at the end of that eph GC, we are incalculate_new_heap_countand settrigger_initial_gen2_pto true, not realizing we are already in a BGC.then during the
joined_generation_to_condemnat the beginning of the next GC, if our conclusion was still doing an eph GC we'd make it a BGC due totrigger_initial_gen2_pwhich obviously would cause problem if a BGC is already in progress (I do have an assert for this but we haven't seen this in a dbg build...).the fix is to simply use the right check -
is_bgc_in_progress()instead ofbackground_running_p()which includes that eph GC case.