Skip to content

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Aug 25, 2025

Fixes: #114581

Backport of #118879 to release/10.0

/cc @VSadov

Customer Impact

This is an internal test-only change.

  • Customer reported
  • Found internally

This likely regressed slowly over time. On one hand we had improvements in finalization and suspension, on the other we've introduced patterns that rely on finalizable objects re-arming themselves as a way to perform some actions in response to gen2 GCs. (as in GC.ReRegisterForFinalize(this))

One unintended result is that a few such re-arming objects can consume a lot of resources when running under GC stress as these patterns end up causing a lot of GCs, which do not help with the coverage as they just keep re-arming each other and cause more GCs.

Some platforms like osx-arm64/win-arm64 now take hours to complete GC stress and often fail with a timeout.

This is unacceptable for a branch that may take servicing changes that require running GC stress.

Regression

  • Yes
  • No

[If yes, specify when the regression was introduced. Provide the PR or commit if known.]

Testing

GC stress testing was triggered on this PR.

Risk

Low.
All the changes are under #ifdef DEBUG as GC stress infra is not included in Release builds.

@VSadov VSadov added Servicing-consider Issue for next servicing release review test-enhancement Improvements of test source code area-VM-coreclr labels Aug 25, 2025
@dotnet-policy-service
Copy link
Contributor

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

@dotnet dotnet deleted a comment from azure-pipelines bot Aug 25, 2025
@dotnet dotnet deleted a comment from azure-pipelines bot Aug 25, 2025
@VSadov VSadov closed this Aug 25, 2025
@VSadov VSadov reopened this Aug 25, 2025
@VSadov VSadov force-pushed the backport/pr-118879-to-release/10.0 branch from fd9d7b7 to 89b20dc Compare August 25, 2025 15:49
@dotnet dotnet deleted a comment from azure-pipelines bot Aug 25, 2025
@VSadov
Copy link
Member

VSadov commented Aug 25, 2025

/azp run runtime-coreclr gcstress-extra, runtime-coreclr gcstress0x3-gcstress0xc

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@VSadov
Copy link
Member

VSadov commented Aug 25, 2025

The error:

##[error]Pipeline does not have permissions to use the referenced pool(s) NetCore-Svc-Public. For authorization details, refer to https://aka.ms/yamlauthz.

Can we run GC stress in release/10 ?

Copy link
Member

@jeffschwMSFT jeffschwMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved. please get a code review. we can merge when ready

@jeffschwMSFT jeffschwMSFT added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Aug 25, 2025
@VSadov VSadov force-pushed the backport/pr-118879-to-release/10.0 branch from 89b20dc to af4a130 Compare August 26, 2025 05:19
@VSadov
Copy link
Member

VSadov commented Aug 26, 2025

/azp run runtime-coreclr gcstress-extra, runtime-coreclr gcstress0x3-gcstress0xc

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@VSadov VSadov force-pushed the backport/pr-118879-to-release/10.0 branch from 352edb7 to 22797dc Compare August 29, 2025 05:34
@VSadov
Copy link
Member

VSadov commented Aug 29, 2025

/azp run runtime-coreclr gcstress-extra

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@dotnet dotnet deleted a comment from azure-pipelines bot Aug 29, 2025
@dotnet dotnet deleted a comment from azure-pipelines bot Aug 29, 2025
@dotnet dotnet deleted a comment from azure-pipelines bot Aug 29, 2025
@dotnet dotnet deleted a comment from azure-pipelines bot Aug 29, 2025
@dotnet dotnet deleted a comment from azure-pipelines bot Aug 29, 2025
@VSadov
Copy link
Member

VSadov commented Aug 29, 2025

@jeffschwMSFT I think we can merge this.

Some tests are failing because some pipelines appear to not have permissions to run in release/10.0. I do not think that is related to this PR.

The change achieves its purpose though - the GC stress on osx-arm64 passes and takes under one hour.

Errors:

##[error]Pipeline does not have permissions to use the referenced pool(s) NetCore-Svc-Public. For authorization details, refer to https://aka.ms/yamlauthz.

@jeffschwMSFT jeffschwMSFT merged commit 91276c8 into release/10.0 Aug 29, 2025
100 of 117 checks passed
@VSadov
Copy link
Member

VSadov commented Aug 29, 2025

Thanks!!

@VSadov VSadov deleted the backport/pr-118879-to-release/10.0 branch August 29, 2025 16:52
@github-actions github-actions bot locked and limited conversation to collaborators Sep 29, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-VM-coreclr Servicing-approved Approved for servicing release test-enhancement Improvements of test source code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants