[release/10.0] Throttle finalization a bit when doing GC stress.#119044
Conversation
|
Tagging subscribers to this area: @mangod9 |
fd9d7b7 to
89b20dc
Compare
|
/azp run runtime-coreclr gcstress-extra, runtime-coreclr gcstress0x3-gcstress0xc |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
The error: Can we run GC stress in |
jeffschwMSFT
left a comment
There was a problem hiding this comment.
approved. please get a code review. we can merge when ready
89b20dc to
af4a130
Compare
|
/azp run runtime-coreclr gcstress-extra, runtime-coreclr gcstress0x3-gcstress0xc |
|
Azure Pipelines successfully started running 2 pipeline(s). |
af4a130 to
352edb7
Compare
352edb7 to
22797dc
Compare
|
/azp run runtime-coreclr gcstress-extra |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@jeffschwMSFT I think we can merge this. Some tests are failing because some pipelines appear to not have permissions to run in The change achieves its purpose though - the GC stress on osx-arm64 passes and takes under one hour. Errors: |
|
Thanks!! |
Fixes: #114581
Backport of #118879 to release/10.0
/cc @VSadov
Customer Impact
This is an internal test-only change.
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-arm64now 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
[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 DEBUGas GC stress infra is not included in Release builds.