Repository navigation
test: rows hold their blocking side on a dedicated thread - #759
Merged
Merged
Conversation
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
Four test rows stop blocking a thread-pool thread on something only another pool item can release. One sentence goes into
testing-style.md, by the maintainer's decision. Test code and that sentence only, with no product change.Refs #753. Part of #758.
This isn't proven to be #753's cause
#753 showed up once in 18 runs under load here. A loop of only the classes involved was clean in 40 of 40, so neither loop can show a fix working. Thread-pool starvation from these rows is the leading hypothesis. These rows are fixed because the pattern is a defect by itself. #753 stays open until a window on CI passes with no hits.
What the sampling found
I sampled the test host's managed stacks every 5 s through 8 clean
net472runs, on 4 saturated cores (650 samples, 49 blocked pool stacks).The rows
SendAsync_Should_Return_A_Queued_Rent_Before_The_First_Send_Is_Released(four data rows, which alone held all four pool threads in two samples)Create_Should_Let_A_Timer_Callback_With_A_Registration_Race_DisposalCreateMessage_Should_Keep_Concurrent_Serializations_Separate(BlockingConverter)firststarts on a dedicated threadSendAsync_Should_Return_And_Clear_The_Rent_When_Refused_Behind_The_GateCancelOnWorkerAsync_Should_Return_Without_Waiting_And_Complete_Only_After_CallbacksEach moved row reaches its block with no yield first, on every data row and target.
DedicatedThread.Runis the one helper, and its comment states that limit. No bound changed, and there are no retries.The rule is stricter than the suite today
The sentence says what a test does. The remaining sites don't follow it yet: #758 lists them, and closes when each is fixed or has a recorded reason. That includes
SendAsync_Should_Expire_A_Queued_Call_Without_Closing_The_Socket, whose fix crashes CA2025 on rc.3 (AD0001, aNullReferenceExceptionin the analyzer). No suppression has been added, and it's retried at .NET 11 GA with #172.Checks
net10.0andnet472unless noted:net472onlyDisposetakes no locknet472onlyTask.Run. So it isn't caused by this move; recorded on #758The mutants for the first two rows ran on the commit before the last one, which doesn't touch them.