Skip to content

Revert #112403#123966

Merged
agocke merged 1 commit intodotnet:mainfrom
agocke:revert-112403
Feb 9, 2026
Merged

Revert #112403#123966
agocke merged 1 commit intodotnet:mainfrom
agocke:revert-112403

Conversation

@agocke
Copy link
Member

@agocke agocke commented Feb 3, 2026

Reverts: #112403

This change appears to cause hangs in some cases. This may cause some performance loss in high pinning scenarios.

@dotnet-policy-service
Copy link
Contributor

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

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request reverts PR #112403, which introduced logic changes for handling pin promotion/demotion in the GC (Garbage Collector) that caused hangs in some scenarios. The revert removes the problematic optimization and restores the previous working implementation.

Changes:

  • Reverts pin promotion decision logic to use simpler inline checks instead of extracted helper functions
  • Restores the demote_gen1_p flag for non-regions builds, replacing decide_promote_gen1_pins_p
  • Inlines the attribute_pin_higher_gen_alloc logic back into call sites
  • Simplifies decide_on_demotion_pin_surv function signature and implementation for regions builds

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/coreclr/gc/gcpriv.h Reverts function signatures and field declarations - removes decide_promote_gen1_pins_p, restores demote_gen1_p, removes helper function declarations
src/coreclr/gc/gc.cpp Reverts implementation changes - removes extracted helper functions, inlines pin allocation attribution logic at call sites, restores original demotion decision logic, includes minor whitespace corrections

@agocke agocke merged commit 2dde8af into dotnet:main Feb 9, 2026
107 of 109 checks passed
@github-project-automation github-project-automation bot moved this to Done in AppModel Feb 9, 2026
@agocke agocke deleted the revert-112403 branch February 9, 2026 18:29
@agocke
Copy link
Member Author

agocke commented Feb 9, 2026

/backport to release/10.0

@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2026

Started backporting to release/10.0 (link to workflow run)

@github-actions github-actions bot mentioned this pull request Feb 9, 2026
4 tasks
agocke added a commit that referenced this pull request Feb 19, 2026
Backport of #123966 to release/10.0

/cc @agocke

## Customer Impact

- [X] Customer reported
- [ ] Found internally

Customer reported that they saw GC deadlocks after upgrading to .NET 10.
This PR is the cause. After revert, deadlocks went away.

## Regression

- [X] Yes
- [ ] No

## Testing

A private build was shared with the customer and confirmed that this PR
was the cause of the regression.

## Risk

Low. This will return us to the .NET 9 state. This PR was intended to
work around issues with high pinning scenarios, but the previous state
was well-understood and acceptable.

Co-authored-by: Andy Gocke <andy@commentout.net>
iremyux pushed a commit to iremyux/dotnet-runtime that referenced this pull request Mar 2, 2026
This change appears to cause hangs in some cases. This may cause some
performance loss in high pinning scenarios.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants