Skip to content

Fix msl wait time extraction in GC - #135022

Merged
janvorli merged 1 commit into
dotnet:mainfrom
janvorli:fix-gc-size-adaptation-msl-wait-time
Oct 2, 2026
Merged

janvorli merged 1 commit into
dotnet:mainfrom
janvorli:fix-gc-size-adaptation-msl-wait-time

Conversation

@janvorli

@janvorli janvorli commented Oct 1, 2026

Copy link
Copy Markdown
Member

There is a bug in the gc_heap::get_msl_wait_time implementation that was introduced in .NET 9. The function has two output arguments soh_msl_wait_time and uoh_msl_wait_time, but instead of updating the values these args point to, it updates the args themselves. So it never reads out any value.

This change fixes it.

Close #134492

There is a bug in the gc_heap::get_msl_wait_time implementation that was
introduced in .NET 9. The function has two output arguments
soh_msl_wait_time and uoh_msl_wait_time, but instead of updating the
values these args point to, it updates the args themselves. So it never
reads out any value.

This change fixes it.

Close dotnet#134492
@janvorli
janvorli requested a review from kkokosa October 1, 2026 14:10
@janvorli janvorli self-assigned this Oct 1, 2026
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

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

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
13 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@janvorli
janvorli merged commit 097dbab into dotnet:main Oct 2, 2026
118 of 121 checks passed
@janvorli

janvorli commented Oct 2, 2026

Copy link
Copy Markdown
Member Author

/backport to release/11.0

@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

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

@janvorli

janvorli commented Oct 2, 2026

Copy link
Copy Markdown
Member Author

/backport to release/10.0

@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

@janvorli backporting to release/10.0 failed, the patch most likely resulted in conflicts. Please backport manually!

git am output
$ git cherry-pick 097dbabb2ce276f44a682c7a29d345443f993239

CONFLICT (modify/delete): src/coreclr/gc/dynamic_heap_count.cpp deleted in HEAD and modified in 097dbabb2ce (Fix msl wait time extraction in GC (#135022)).  Version 097dbabb2ce (Fix msl wait time extraction in GC (#135022)) of src/coreclr/gc/dynamic_heap_count.cpp left in tree.
error: could not apply 097dbabb2ce... Fix msl wait time extraction in GC (#135022)
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
hint: Disable this message with "git config set advice.mergeConflict false"


$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch

Applying: Fix msl wait time extraction in GC
Using index info to reconstruct a base tree...
A	src/coreclr/gc/dynamic_heap_count.cpp
Falling back to patching base and 3-way merge...
CONFLICT (modify/delete): src/coreclr/gc/dynamic_heap_count.cpp deleted in HEAD and modified in Fix msl wait time extraction in GC.  Version Fix msl wait time extraction in GC of src/coreclr/gc/dynamic_heap_count.cpp left in tree.
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 Fix msl wait time extraction in GC
Error: The process '/usr/bin/git' failed with exit code 128

Link to workflow output

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

2 participants