Skip to content

Conversation

@cshung
Copy link
Contributor

@cshung cshung commented Jul 28, 2022

Fixes #70262

If we happened to be in a case such that:

  1. settings.promote == 0,
  2. All gen1 regions satisfy the condition surv_ratio >= sip_surv_ratio_th, and
  3. All gen1 regions satisfy the condition old_card_surv_ratio >= sip_old_card_surv_ratio_th.

Note that when settings.promote == 0, new_gen_num computed by get_plan_gen_num for a gen 1 region will be 1, so the following condition is satisfied.

(new_gen_num < max_generation) && (sip_maxgen_regions_per_gen[gen_num] == regions_per_gen[gen_num])

But then gen_num == 1, now we will hit the assertion.

Note that we shouldn't be promoting regions if settings.promote == 0, if we make the change as in the PR to avoid promoting regions due to old card survival, we will never increase sip_maxgen_regions_per_gen and therefore we will not enter the branch leading to the assertion.

@ghost ghost added the area-GC-coreclr label Jul 28, 2022
@ghost ghost assigned cshung Jul 28, 2022
@ghost
Copy link

ghost commented Jul 28, 2022

Tagging subscribers to this area: @dotnet/gc
See info in area-owners.md if you want to be subscribed.

Issue Details

Fixes #70262

Author: cshung
Assignees: -
Labels:

area-GC-coreclr

Milestone: -

@cshung cshung merged commit 35b8617 into dotnet:main Jul 28, 2022
@cshung cshung deleted the public/avoid-promote-in-sip branch July 28, 2022 19:52
@ghost ghost locked as resolved and limited conversation to collaborators Aug 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Assertion failed: get_region_gen_num (region) == 0

2 participants