Repository navigation
Fix BGC allocation context accounting - #134855
Merged
janvorli merged 2 commits intoNov 13, 2026
Merged
Conversation
Co-authored-by: Copilot App <[email protected]>
|
Azure Pipelines: Successfully started running 3 pipeline(s). 12 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
Tagging subscribers to this area: @anicka-net, @dotnet/gc |
janvorli
approved these changes
Oct 1, 2026
Member
|
@kkokosa the test could be improved by checking if background GC has occurred to make sure it always exercises the problematic path. |
Open
1 of 3 tasks
DaveBeusing
added a commit
to DaveBeusing/Forgeline
that referenced
this pull request
Oct 18, 2026
…ication Repair rendering foundation qualification and physical supply lifecycle Render preparation repeatedly acquired adapter diagnostics and computed unused work inside timed phases. Reuse render-owner observations and remove that work while preserving exact pixels, frame/resource lifetime and ten-second fence limits. Correct WARP admission, smoke progress, test-module isolation, HDR clear, audio publication and writer lifetime without increasing deadlines. The required terminal gate exposed inherited logistics and tactical stalls. Repair dock-exit turning, dispatchable loading completion, source selection, reconnaissance ownership and supported continuation, mature freight demand and formation-bound providers. Let misordered arrivals physically evacuate a reserved dock approach. Exclude currently identified non-combat infrastructure before tactical AI replaces a valid advance with an attack the combat system cannot execute. Existing visibility, collision, weapon and strategic deadline rules remain active; no resources or result are forced. Allocation CI failures also expose the .NET background-GC counter-accounting issue (dotnet/runtime#134724, dotnet/runtime#134855). A standalone Windows x64 .NET 10.0.12 diagnostic reports nonzero bytes in five of 256 empty intervals with concurrent GC, versus zero with it disabled; real allocation controls remain exactly 64 bytes in both. Disable concurrent GC only in Presentation.Tests. Restore the original measured loops, warmups and zero-byte assertions, removing insufficient dedicated-thread workarounds. Add a configuration guard and allocating positive control. Production GC settings remain unchanged. The two exact-zero HUD allocation benchmark steps also set process-local DOTNET_gcConcurrent=0; these separate executables do not inherit test-host runtimeconfig. The benchmark rejects uncontrolled exact-allocation mode before measurement. Native/scalability/frame-timing modes retain their original policy.
Co-authored-by: Copilot App <[email protected]>
This was referenced Oct 27, 2026
Closed
20 of 34 tasks
|
Independent repro, found through flaky zero-allocation tests (Linux arm64, .NET 8.0.33 and 10.0.14, workstation GC):
Is anything left before this comes out of draft? Generated with AI 🤖 |
janvorli
approved these changes
Nov 13, 2026
janvorli
marked this pull request as ready for review
November 13, 2026 19:03
This was referenced Nov 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #134724.
Background GC cleared abandoned allocation contexts without retiring their unused bytes, causing
GC.GetAllocatedBytesForCurrentThread()to report phantom allocations.The fix reuses the normal allocation-context accounting path and adds a server-GC join so one designated worker retires all contexts exactly once during the existing stop-the-world phase.
Note
This pull request description was generated by GitHub Copilot.