-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Improve NonDisposedSocket_SafeHandlesCollected test #50104
Improve NonDisposedSocket_SafeHandlesCollected test #50104
Conversation
Tagging subscribers to this area: @dotnet/ncl Issue DetailsAs reported in #50068, the test The problem is that currently any statistics or other starting points to diagnose it. This PR attempts to improve the test:
@geoffkizer @wfurt thoughts?
|
src/libraries/System.Net.Sockets/tests/FunctionalTests/DisposedSocketTests.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Net.Sockets/tests/FunctionalTests/DisposedSocketTests.cs
Show resolved
Hide resolved
I wonder if there should be some sort of debug-only logic in the Socket finalizer to try to detect that we are hanging. Like assert after a certain # of iterations? Regardless, this change seems worthwhile to help track down what's happening here. |
That makes sense but it should be a separate effort. Here I'm just trying to quickly bring #50068 to a somewhat better state, before someone just disables the test with a big hammer. |
As reported in #50068, the test
DisposedSocket.NonDisposedSocket_SafeHandlesCollected
seems to intermittently hang the entire pipeline, although I believe it's a very rare case.The problem is that currently there are no statistics on frequency and/or other starting points to diagnose it. This PR attempts to improve the test:
CreateHandlesAsync
or hang in the finalizer. We need to be able to distinguish between those reasons.@geoffkizer @wfurt thoughts?