-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[mono][sgen] Add option to disable tarjan gc bridge optimization #121243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This option is also currently causing crashes in the gc bridge.
|
Tagging subscribers to this area: @BrzVlad |
There was a problem hiding this 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_tablefunction - Added support for
disable-non-bridge-sccGC 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
|
/ba-g android infra issue |
|
/backport to release/9.0-staging |
|
Started backporting to |
…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>
This option is also currently causing crashes in the gc bridge.