Repository navigation
Conversation
…fore LINQ StandInPipelines.SkippedBeforeSummary and OnDemandPrograms.Summary ran OrderByDescending over a ConcurrentDictionary other threads add to. Enumerable.ToArray sizes its array by the collection's Count and then calls CopyTo, which throws ArgumentException when an entry was added in between. On the sampler thread (--sample-threads) that is unhandled: a boot ended at 4,200 presents with 0xE0434352. ConcurrentDictionary.ToArray takes the entries under its locks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SKtJsfjasPuTLtS3mEXFru
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.
What changed
StandInPipelines.SkippedBeforeSummaryandOnDemandPrograms.Summarytake a snapshot withConcurrentDictionary.ToArray()before summing and sorting, instead of running LINQ over the dictionary itself.Why
Enumerable.ToArrayover anICollectionsizes its array byCountand then callsCopyTo. If another thread adds an entry in between,CopyTothrowsArgumentException. Both dictionaries are written by build threads and command lists while the sampler thread reads them. With--sample-threads 30, a boot on an RX 7800 XT ended at 4,200 presents with 0xE0434352:ConcurrentDictionary.ToArraytakes the entries under the dictionary's locks.OnDemandPrograms.Summaryhad the same pattern over_failures.How I checked
dotnet build: no errors or warnings.FiveStar.Architecture.Testspasses (30 tests).FiveStar.Loader.Tests: 207 passed, 18 skipped, 1 failed. The failure isCompileBudgetTests.A_compile_starts_only_while_memory_covers_it_what_the_running_ones_still_need_and_the_games_growth, which fails the same way onmain(72b7328) on this machine; it reads the machine's free memory.CountandCopyTo, which a unit test would only hit by chance.🤖 Generated with Claude Code
https://claude.ai/code/session_01SKtJsfjasPuTLtS3mEXFru