Skip to content

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Oct 8, 2025

Backport of #120432 to release/9.0-staging

/cc @BrzVlad

Customer Impact

  • Customer reported
  • Found internally

This impacts all platforms using mono. A customer reported a 40x regression on an XML Serialization benchmark when moving from .NET8 to .NET9. This regression is caused by the runtime triggering excessive GCs due to a bug in the heuristic. This is more likely to happen if the GC concurrent sweep phase takes longer and the application allocates large objects frequently. This likely impacts many applications, but with less noticeable performance impact.

Regression

  • Yes
  • No

This regressed in .NET9

Testing

Tested the fix on sample benchmark that it works correctly.

Risk

Low risk. The fix is localized and the previous condition was blatantly wrong by mistake.

…major collection

When we are in this method, major sweep hasn't yet finished so we check with some imprecise conservative values. min_heap_size is a conservative lower limit of the actual heap size. Allowance represents how much more we allow the heap to grow after the previous major collection. We were comparing the min_heap_size with the allowance by mistake, when we should have compared it with the next major trigger size (which is the heap_size after the last collection plus the allowance).
@BrzVlad BrzVlad added Servicing-consider Issue for next servicing release review area-GC-mono labels Oct 9, 2025
@dotnet-policy-service
Copy link
Contributor

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

@BrzVlad BrzVlad added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Oct 10, 2025
@PranavSenthilnathan
Copy link
Member

Reminder that PRs into release/9.0-staging need to be completed by 4pm Redmond time on October 13 to make it into the November servicing release. After that point you'll need to target release/9.0 if you want to make the November release.

@shnaz
Copy link

shnaz commented Oct 11, 2025

Reminder that PRs into release/9.0-staging need to be completed by 4pm Redmond time on October 13 to make it into the November servicing release. After that point you'll need to target release/9.0 if you want to make the November release.

@BrzVlad would this be possible? 😊We would appreciate it alot!

@BrzVlad BrzVlad merged commit b690555 into release/9.0-staging Oct 12, 2025
82 of 85 checks passed
@BrzVlad
Copy link
Member

BrzVlad commented Oct 12, 2025

@shnaz Yes, this is on track to be shipped with runtime version 9.0.11, in November.

@stephentoub stephentoub deleted the backport/pr-120432-to-release/9.0-staging branch October 17, 2025 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-GC-mono Servicing-approved Approved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants