Skip to content
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

check handle before shutdown in quic connection Dispose #56047

Merged
merged 2 commits into from
Jul 21, 2021

Conversation

wfurt
Copy link
Member

@wfurt wfurt commented Jul 20, 2021

fixes observed NRE failure in CI
https://helixre8s23ayyeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-pull-55877-merge-4b55bf7e17664f8d97/System.Net.Http.Functional.Tests/console.44cb6dd0.log?sv=2019-07-07&se=2021-08-09T20%3A59%3A05Z&sr=c&sp=rl&sig=fcVOgCzStvmdaDVp%2FQRDS0Df0FtzBFqHVkrAh4pCysk%3D

      Condition(s) not met: "CanTestCertificates"
Unhandled exception. System.ArgumentNullException: SafeHandle cannot be null. (Parameter 'pHandle')
   at System.StubHelpers.StubHelpers.SafeHandleAddRef(SafeHandle pHandle, Boolean& success) in /_/src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs:line 1273
   at System.Net.Quic.Implementations.MsQuic.MsQuicConnection.Dispose(Boolean disposing) in /_/src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/MsQuicConnection.cs:line 715
   at System.Net.Quic.Implementations.MsQuic.MsQuicConnection.Finalize() in /_/src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/MsQuicConnection.cs:line 684
./RunTests.sh: line 162:    22 Aborted                 (core dumped) "$RUNTIME_PATH/dotnet" exec --runtimeconfig System.Net.Http.Functional.Tests.runtimeconfig.json --depsfile System.Net.Http.Functional.Tests.deps.json xunit.console.dll System.Net.Http.Functional.Tests.dll -xml testResults.xml -nologo -nocolor -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing $RSP_FILE
/root/helix/work/workitem
----- end Tue Jul 20 21:05:32 UTC 2021 ----- exit code 134 ----------------------------------------------------------
exit code 134 means SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.

When constructor for outbound connection fail, _state.Handle can be null and this would be called from finalizer.

@wfurt wfurt requested review from geoffkizer and a team July 20, 2021 21:36
@wfurt wfurt self-assigned this Jul 20, 2021
@ghost
Copy link

ghost commented Jul 20, 2021

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

Issue Details

fixes observed NRE failure in CI
https://helixre8s23ayyeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-pull-55877-merge-4b55bf7e17664f8d97/System.Net.Http.Functional.Tests/console.44cb6dd0.log?sv=2019-07-07&se=2021-08-09T20%3A59%3A05Z&sr=c&sp=rl&sig=fcVOgCzStvmdaDVp%2FQRDS0Df0FtzBFqHVkrAh4pCysk%3D

      Condition(s) not met: "CanTestCertificates"
Unhandled exception. System.ArgumentNullException: SafeHandle cannot be null. (Parameter 'pHandle')
   at System.StubHelpers.StubHelpers.SafeHandleAddRef(SafeHandle pHandle, Boolean& success) in /_/src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs:line 1273
   at System.Net.Quic.Implementations.MsQuic.MsQuicConnection.Dispose(Boolean disposing) in /_/src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/MsQuicConnection.cs:line 715
   at System.Net.Quic.Implementations.MsQuic.MsQuicConnection.Finalize() in /_/src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/MsQuicConnection.cs:line 684
./RunTests.sh: line 162:    22 Aborted                 (core dumped) "$RUNTIME_PATH/dotnet" exec --runtimeconfig System.Net.Http.Functional.Tests.runtimeconfig.json --depsfile System.Net.Http.Functional.Tests.deps.json xunit.console.dll System.Net.Http.Functional.Tests.dll -xml testResults.xml -nologo -nocolor -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing $RSP_FILE
/root/helix/work/workitem
----- end Tue Jul 20 21:05:32 UTC 2021 ----- exit code 134 ----------------------------------------------------------
exit code 134 means SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.

When constructor for outbound connection fail, _state.Handle can be null and this would be called from finalizer.

Author: wfurt
Assignees: wfurt
Labels:

area-System.Net.Quic

Milestone: -

@wfurt
Copy link
Member Author

wfurt commented Jul 21, 2021

failing test is #55957

@wfurt wfurt merged commit 577136c into dotnet:main Jul 21, 2021
@karelz karelz added this to the 6.0.0 milestone Jul 22, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Aug 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants