Skip to content

ClientAndServer_OneOrBothUseDefault_Ok - fails with NullReferenceException #2353

Closed

Description

@ViktorHofer

https://dnceng.visualstudio.com/public/_build/results?buildId=395007&view=ms.vss-test-web.build-test-results-tab&runId=12313218&resultId=165447&paneView=debug

Configuration: System.NullReferenceException : Object reference not set to an instance of an object.

System.NullReferenceException : Object reference not set to an instance of an object.
  at System.Net.Security.SslSessionsCache.CacheCredential(SafeFreeCredentials creds, Byte[] thumbPrint, SslProtocols sslProtocols, Boolean isServer, EncryptionPolicy encryptionPolicy) in /_/src/System.Net.Security/src/System/Net/Security/SslSessionsCache.cs:line 199
   at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output) in /_/src/System.Net.Security/src/System/Net/Security/SecureChannel.cs:line 843
   at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count) in /_/src/System.Net.Security/src/System/Net/Security/SecureChannel.cs:line 735
   at System.Net.Security.SslStream.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) in /_/src/System.Net.Security/src/System/Net/Security/SslStream.Implementation.cs:line 447
   at System.Net.Security.SslStream.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) in /_/src/System.Net.Security/src/System/Net/Security/SslStream.Implementation.cs:line 663
   at System.Net.Security.SslStream.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) in /_/src/System.Net.Security/src/System/Net/Security/SslStream.Implementation.cs:line 617
   at System.Net.Security.SslStream.PartialFrameCallback(AsyncProtocolRequest asyncRequest) in /_/src/System.Net.Security/src/System/Net/Security/SslStream.Implementation.cs:line 798
--- End of stack trace from previous location ---
   at System.Net.Security.SslStream.<ThrowIfExceptional>g__ThrowExceptional|141_0(ExceptionDispatchInfo e) in /_/src/System.Net.Security/src/System/Net/Security/SslStream.cs:line 844
   at System.Net.Security.SslStream.ThrowIfExceptional() in /_/src/System.Net.Security/src/System/Net/Security/SslStream.cs:line 845
   at System.Net.Security.SslStream.InternalEndProcessAuthentication(LazyAsyncResult lazyResult) in /_/src/System.Net.Security/src/System/Net/Security/SslStream.Implementation.cs:line 440
   at System.Net.Security.SslStream.EndProcessAuthentication(IAsyncResult result) in /_/src/System.Net.Security/src/System/Net/Security/SslStream.Implementation.cs:line 411
   at System.Net.Security.SslStream.EndAuthenticateAsClient(IAsyncResult asyncResult) in /_/src/System.Net.Security/src/System/Net/Security/SslStream.cs:line 241
   at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization) in /_/src/System.Private.CoreLib/shared/System/Threading/Tasks/FutureFactory.cs:line 513
--- End of stack trace from previous location ---
   at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks) in /_/src/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs:line 83
   at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks) in /_/src/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs:line 111
   at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks, Int32 millisecondsTimeout) in /_/src/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs:line 71
   at System.Net.Security.Tests.SslStreamSystemDefaultTest.ClientAndServer_OneOrBothUseDefault_Ok(Nullable`1 clientProtocols, Nullable`1 serverProtocols) in /_/src/System.Net.Security/tests/FunctionalTests/SslStreamSystemDefaultsTest.cs:line 63
--- End of stack trace from previous location ---

cc @davidsh, @wfurt, @scalablecory, @eiriktsarpalis, @karelz

Runfo Tracking Issue: Runtime test ClientAndServer_OneOrBothUseDefault_Ok

Build Definition Kind Run Name Console Core Dump Test Results Run Client
1254354 runtime PR 55298 net6.0-windows-Debug-x64-CoreCLR_release-Windows.10.Amd64.Client21H1.Open console.log runclient.py
1254354 runtime PR 55298 net6.0-windows-Debug-x64-CoreCLR_release-Windows.10.Amd64.Client21H1.Open console.log runclient.py
1254354 runtime PR 55298 net6.0-windows-Debug-x64-CoreCLR_release-Windows.10.Amd64.Client21H1.Open console.log runclient.py
1254354 runtime PR 55298 net6.0-windows-Debug-x64-CoreCLR_release-Windows.10.Amd64.Client21H1.Open console.log runclient.py
1254354 runtime PR 55298 net6.0-windows-Debug-x64-CoreCLR_release-Windows.10.Amd64.Client21H1.Open console.log runclient.py
1254354 runtime PR 55298 net6.0-windows-Debug-x64-CoreCLR_release-Windows.10.Amd64.Client21H1.Open console.log runclient.py
1254354 runtime PR 55298 net6.0-windows-Debug-x64-CoreCLR_release-Windows.10.Amd64.Client21H1.Open console.log runclient.py
1254354 runtime PR 55298 net6.0-windows-Debug-x64-CoreCLR_release-Windows.10.Amd64.Client21H1.Open console.log runclient.py
1254354 runtime PR 55298 net6.0-windows-Debug-x64-CoreCLR_release-Windows.10.Amd64.Client21H1.Open console.log runclient.py

Build Result Summary

Day Hit Count Week Hit Count Month Hit Count
0 0 1

Activity

  1. karelz commented on Dec 5, 2019

    @karelz
    Member

    Triage: @davidsh thinks we have a bug SslSessionCache (long existing probably)

  2. transferred this issue fromdotnet/corefxon Jan 29, 2020
  3. added this to the 5.0 milestone on Jan 29, 2020
  4. wfurt commented on Jan 29, 2020

    @wfurt
    Member

    I see ~ 3K failures in the last 90 days - all on Windows failing for few different reasons.
    #2352 is probably the same root cause.

  5. removed
    untriagedNew issue has not been triaged by the area owner
    on Feb 13, 2020
  6. changed the title [-]System.Net.Security.Tests.ApmSslStreamSystemDefaultTest.ClientAndServer_OneOrBothUseDefault_Ok(clientProtocols: Tls | Tls11 | Tls12, serverProtocols: null) test failing in CI with NullReferenceException[/-] [+]ClientAndServer_OneOrBothUseDefault_Ok- fails with NullReferenceException[/+] on Apr 3, 2020
  7. changed the title [-]ClientAndServer_OneOrBothUseDefault_Ok- fails with NullReferenceException[/-] [+]ClientAndServer_OneOrBothUseDefault_Ok - fails with NullReferenceException[/+] on Apr 3, 2020
  8. added
    tenet-reliabilityReliability/stability related issue (stress, load problems, etc.)
    on May 7, 2020
  9. karelz commented on May 7, 2020

    @karelz
    Member

    @wfurt thinks it is related/duplicate also to failures in #34337 and #30724 ... and to #2352 mentioned above.

  10. self-assigned this
    on May 11, 2020
  11. 5 remaining items

  12. aik-jahoda commented on May 22, 2020

    @aik-jahoda
    Contributor

    I'm able to reproduce similar null reference exception and I expect it is from the same root cause thus reopening.

  13. modified the milestones: 5.0, Future on Jun 5, 2020
  14. added
    blocking-clean-ciBlocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms'
    on Sep 2, 2020
  15. directhex commented on Sep 30, 2020

    @directhex
    Contributor
  16. aik-jahoda commented on Jan 7, 2021

    @aik-jahoda
    Contributor

    Closed by #36875, please reopen in case of next occurence

  17. modified the milestones: Future, 6.0.0 on Jan 26, 2021
  18. reopened this on Feb 8, 2021
  19. karelz commented on May 12, 2021

    @karelz
    Member

    No hits of NullReference anymore -- remaining ObjectDisposedException failures tracked in #30724.

  20. ghost locked as resolved and limited conversation to collaborators on Jun 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area-System.Net.Securityblocking-clean-ciBlocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms'bugos-windowstenet-reliabilityReliability/stability related issue (stress, load problems, etc.)test-run-coreTest failures in .NET Core test runs

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions