Skip to content

Conversation

@BrzVlad
Copy link
Member

@BrzVlad BrzVlad commented Oct 31, 2025

This option is also currently causing crashes in the gc bridge.

Copilot AI review requested due to automatic review settings October 31, 2025 11:18
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @BrzVlad
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 fixes an indexing bug in the Tarjan bridge color table dump function and adds a new GC parameter option for disabling non-bridge strongly connected components (SCCs).

  • Fixed incorrect loop counter increment in dump_color_table function
  • Added support for disable-non-bridge-scc GC parameter option

Reviewed Changes

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

File Description
src/mono/mono/metadata/sgen-tarjan-bridge.c Moved counter increment from outer loop to inner loop to correctly count color data entries instead of buckets
src/mono/mono/metadata/sgen-bridge.c Added parameter handling for the disable-non-bridge-scc configuration option

Copy link
Member

@lateralusX lateralusX left a comment

Choose a reason for hiding this comment

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

LGTM!

@BrzVlad
Copy link
Member Author

BrzVlad commented Nov 5, 2025

/ba-g android infra issue

@BrzVlad BrzVlad merged commit 3345865 into dotnet:main Nov 5, 2025
76 of 79 checks passed
@BrzVlad
Copy link
Member Author

BrzVlad commented Nov 5, 2025

/backport to release/9.0-staging

@github-actions
Copy link
Contributor

github-actions bot commented Nov 5, 2025

Started backporting to release/9.0-staging (link to workflow run)

BrzVlad added a commit that referenced this pull request Nov 6, 2025
…idge optimization (#121376)

Backport of #121243 to release/9.0-staging

/cc @BrzVlad

## Customer Impact

- [x] Customer reported
- [ ] Found internally

Applications on maui-android can randomly crash during GC. We've had a
few fixes for the tarjan bridge merged a few months ago, but there is
still one more issue. The problem is caused by a specific optimization
inside the tarjan gc bridge. The only workaround for a customer hitting
this failure is to configure an environment variable so that their app
uses a different gc bridge (which has worse performance). One customer
reported that using the older gc bridge makes the application unusable
due to degradation of performance. This PR allows users to opt out of a
smaller optimization and keep using the tarjan gc bridge, as a
workaround for .NET9.

## Regression

- [ ] Yes
- [x] No

## Testing

Tested on our own gc bridge tests, with scenario causing the issue.

## Risk

This PR has zero risk since it just adds support for disabling an
optimization. By default, there is no change in behavior. I plan to
backport to .NET10 the actual fix for this issue.

---------

Co-authored-by: Vlad Brezae <brezaevlad@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants