Skip to content

Lots of NegotiateStream tests failing locally on Win11 #72152

Closed

Description

@stephentoub

When I run the System.Net.Security functional tests locally, I now get a bunch of failures, e.g

      System.Net.Security.Tests.NegotiateStreamStreamToStreamTest_Sync.NegotiateStream_StreamToStream_Authentication_TargetName_Success [FAIL]
        System.AggregateException : One or more errors occurred. (Authentication failed on the remote side (the stream might still be available for additional authentication attempts).) (Authenticatio
  n failed, see inner exception.)
        ---- System.Security.Authentication.AuthenticationException : Authentication failed on the remote side (the stream might still be available for additional authentication attempts).
        -------- System.ComponentModel.Win32Exception : Unspecified error
        ---- System.Security.Authentication.AuthenticationException : Authentication failed, see inner exception.
        -------- System.ComponentModel.Win32Exception : Not enough memory is available to complete this request
        Stack Trace:
          D:\repos\runtime\src\libraries\Common\tests\System\Threading\Tasks\TaskTimeoutExtensions.cs(88,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks)
          D:\repos\runtime\src\libraries\Common\tests\System\Threading\Tasks\TaskTimeoutExtensions.cs(55,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks, Int32 mill
  isecondsTimeout)
          D:\repos\runtime\src\libraries\System.Net.Security\tests\FunctionalTests\NegotiateStreamStreamToStreamTest.cs(144,0): at System.Net.Security.Tests.NegotiateStreamStreamToStreamTest.Negotiate
  Stream_StreamToStream_Authentication_TargetName_Success()
          --- End of stack trace from previous location ---
          ----- Inner Stack Trace #1 (System.Security.Authentication.AuthenticationException) -----
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(958,0): at System.Net.Security.NegotiateStream.ThrowCredentialException(Int64 error)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(872,0): at System.Net.Security.NegotiateStream.ReceiveBlobAsync[TIOAdapter](CancellationToken ca
  ncellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(844,0): at System.Net.Security.NegotiateStream.SendBlobAsync[TIOAdapter](Byte[] message, Cancell
  ationToken cancellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(899,0): at System.Net.Security.NegotiateStream.ReceiveBlobAsync[TIOAdapter](CancellationToken ca
  ncellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(844,0): at System.Net.Security.NegotiateStream.SendBlobAsync[TIOAdapter](Byte[] message, Cancell
  ationToken cancellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(708,0): at System.Net.Security.NegotiateStream.AuthenticateAsync[TIOAdapter](CancellationToken c
  ancellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(173,0): at System.Net.Security.NegotiateStream.AuthenticateAsClient(NetworkCredential credential
  , ChannelBinding binding, String targetName, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel allowedImpersonationLevel)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(160,0): at System.Net.Security.NegotiateStream.AuthenticateAsClient(NetworkCredential credential
  , String targetName)
          D:\repos\runtime\src\libraries\System.Net.Security\tests\FunctionalTests\NegotiateStreamStreamToStreamTest.cs(349,0): at System.Net.Security.Tests.NegotiateStreamStreamToStreamTest_Sync.<>c_
  _DisplayClass0_0.<AuthenticateAsClientAsync>b__0()
          D:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs(2399,0): at System.Threading.Tasks.Task.InnerInvoke()
          D:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs(2387,0): at System.Threading.Tasks.Task.<>c.<.cctor>b__273_0(Object obj)
          D:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\ExecutionContext.cs(268,0): at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThr
  ead, ExecutionContext executionContext, ContextCallback callback, Object state)
          --- End of stack trace from previous location ---
          D:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\ExecutionContext.cs(293,0): at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThr
  ead, ExecutionContext executionContext, ContextCallback callback, Object state)
          D:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs(2349,0): at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPo
  olThread)
          D:\repos\runtime\src\libraries\Common\tests\System\Threading\Tasks\TaskTimeoutExtensions.cs(120,0): at System.Threading.Tasks.TaskTimeoutExtensions.GetRealException(Task task)
          --- End of stack trace from previous location ---
          D:\repos\runtime\src\libraries\Common\tests\System\Threading\Tasks\TaskTimeoutExtensions.cs(120,0): at System.Threading.Tasks.TaskTimeoutExtensions.GetRealException(Task task)
          ----- Inner Stack Trace -----

          ----- Inner Stack Trace #2 (System.Security.Authentication.AuthenticationException) -----
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(922,0): at System.Net.Security.NegotiateStream.SendAuthResetSignalAndThrowAsync[TIOAdapter](Byte
  [] message, Exception exception, CancellationToken cancellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(759,0): at System.Net.Security.NegotiateStream.SendBlobAsync[TIOAdapter](Byte[] message, Cancell
  ationToken cancellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(899,0): at System.Net.Security.NegotiateStream.ReceiveBlobAsync[TIOAdapter](CancellationToken ca
  ncellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(844,0): at System.Net.Security.NegotiateStream.SendBlobAsync[TIOAdapter](Byte[] message, Cancell
  ationToken cancellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(899,0): at System.Net.Security.NegotiateStream.ReceiveBlobAsync[TIOAdapter](CancellationToken ca
  ncellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(708,0): at System.Net.Security.NegotiateStream.AuthenticateAsync[TIOAdapter](CancellationToken c
  ancellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(135,0): at System.Net.Security.NegotiateStream.AuthenticateAsServer(NetworkCredential credential
  , ExtendedProtectionPolicy policy, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel requiredImpersonationLevel)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(124,0): at System.Net.Security.NegotiateStream.AuthenticateAsServer()
          D:\repos\runtime\src\libraries\System.Net.Security\tests\FunctionalTests\NegotiateStreamStreamToStreamTest.cs(352,0): at System.Net.Security.Tests.NegotiateStreamStreamToStreamTest_Sync.<>c_
  _DisplayClass1_0.<AuthenticateAsServerAsync>b__0()
          D:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs(2399,0): at System.Threading.Tasks.Task.InnerInvoke()
          D:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs(2387,0): at System.Threading.Tasks.Task.<>c.<.cctor>b__273_0(Object obj)
          D:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\ExecutionContext.cs(268,0): at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThr
  ead, ExecutionContext executionContext, ContextCallback callback, Object state)
          --- End of stack trace from previous location ---
          D:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\ExecutionContext.cs(293,0): at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThr
  ead, ExecutionContext executionContext, ContextCallback callback, Object state)
          D:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs(2349,0): at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPo
  olThread)
          --- End of stack trace from previous location ---
          D:\repos\runtime\src\libraries\Common\tests\System\Threading\Tasks\TaskTimeoutExtensions.cs(120,0): at System.Threading.Tasks.TaskTimeoutExtensions.GetRealException(Task task)
          ----- Inner Stack Trace -----

      System.Net.Security.Tests.NegotiateStreamStreamToStreamTest_Sync_TestOverloadNullBinding.NegotiateStream_StreamToStream_Authentication_TargetName_Success [FAIL]
        System.AggregateException : One or more errors occurred. (Authentication failed on the remote side (the stream might still be available for additional authentication attempts).) (Authenticatio
  n failed, see inner exception.)
        ---- System.Security.Authentication.AuthenticationException : Authentication failed on the remote side (the stream might still be available for additional authentication attempts).
        -------- System.ComponentModel.Win32Exception : Unspecified error
        ---- System.Security.Authentication.AuthenticationException : Authentication failed, see inner exception.
        -------- System.ComponentModel.Win32Exception : Not enough memory is available to complete this request
        Stack Trace:
          D:\repos\runtime\src\libraries\Common\tests\System\Threading\Tasks\TaskTimeoutExtensions.cs(88,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks)
          D:\repos\runtime\src\libraries\Common\tests\System\Threading\Tasks\TaskTimeoutExtensions.cs(55,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks, Int32 mill
  isecondsTimeout)
          D:\repos\runtime\src\libraries\System.Net.Security\tests\FunctionalTests\NegotiateStreamStreamToStreamTest.cs(144,0): at System.Net.Security.Tests.NegotiateStreamStreamToStreamTest.Negotiate
  Stream_StreamToStream_Authentication_TargetName_Success()
          --- End of stack trace from previous location ---
          ----- Inner Stack Trace #1 (System.Security.Authentication.AuthenticationException) -----
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(958,0): at System.Net.Security.NegotiateStream.ThrowCredentialException(Int64 error)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(872,0): at System.Net.Security.NegotiateStream.ReceiveBlobAsync[TIOAdapter](CancellationToken ca
  ncellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(844,0): at System.Net.Security.NegotiateStream.SendBlobAsync[TIOAdapter](Byte[] message, Cancell
  ationToken cancellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(899,0): at System.Net.Security.NegotiateStream.ReceiveBlobAsync[TIOAdapter](CancellationToken ca
  ncellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(844,0): at System.Net.Security.NegotiateStream.SendBlobAsync[TIOAdapter](Byte[] message, Cancell
  ationToken cancellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(708,0): at System.Net.Security.NegotiateStream.AuthenticateAsync[TIOAdapter](CancellationToken c
  ancellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(173,0): at System.Net.Security.NegotiateStream.AuthenticateAsClient(NetworkCredential credential
  , ChannelBinding binding, String targetName, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel allowedImpersonationLevel)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(163,0): at System.Net.Security.NegotiateStream.AuthenticateAsClient(NetworkCredential credential
  , ChannelBinding binding, String targetName)
          D:\repos\runtime\src\libraries\System.Net.Security\tests\FunctionalTests\NegotiateStreamStreamToStreamTest.cs(367,0): at System.Net.Security.Tests.NegotiateStreamStreamToStreamTest_Sync_Test
  OverloadNullBinding.<>c__DisplayClass0_0.<AuthenticateAsClientAsync>b__0()
          D:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs(2399,0): at System.Threading.Tasks.Task.InnerInvoke()
          D:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs(2387,0): at System.Threading.Tasks.Task.<>c.<.cctor>b__273_0(Object obj)
          D:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\ExecutionContext.cs(268,0): at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThr
  ead, ExecutionContext executionContext, ContextCallback callback, Object state)
          --- End of stack trace from previous location ---
          D:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\ExecutionContext.cs(293,0): at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThr
  ead, ExecutionContext executionContext, ContextCallback callback, Object state)
          D:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs(2349,0): at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPo
  olThread)
          --- End of stack trace from previous location ---
          D:\repos\runtime\src\libraries\Common\tests\System\Threading\Tasks\TaskTimeoutExtensions.cs(120,0): at System.Threading.Tasks.TaskTimeoutExtensions.GetRealException(Task task)
          ----- Inner Stack Trace -----

          ----- Inner Stack Trace #2 (System.Security.Authentication.AuthenticationException) -----
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(922,0): at System.Net.Security.NegotiateStream.SendAuthResetSignalAndThrowAsync[TIOAdapter](Byte
  [] message, Exception exception, CancellationToken cancellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(759,0): at System.Net.Security.NegotiateStream.SendBlobAsync[TIOAdapter](Byte[] message, Cancell
  ationToken cancellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(899,0): at System.Net.Security.NegotiateStream.ReceiveBlobAsync[TIOAdapter](CancellationToken ca
  ncellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(844,0): at System.Net.Security.NegotiateStream.SendBlobAsync[TIOAdapter](Byte[] message, Cancell
  ationToken cancellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(899,0): at System.Net.Security.NegotiateStream.ReceiveBlobAsync[TIOAdapter](CancellationToken ca
  ncellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(708,0): at System.Net.Security.NegotiateStream.AuthenticateAsync[TIOAdapter](CancellationToken c
  ancellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(135,0): at System.Net.Security.NegotiateStream.AuthenticateAsServer(NetworkCredential credential
  , ExtendedProtectionPolicy policy, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel requiredImpersonationLevel)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(127,0): at System.Net.Security.NegotiateStream.AuthenticateAsServer(ExtendedProtectionPolicy pol
  icy)
          D:\repos\runtime\src\libraries\System.Net.Security\tests\FunctionalTests\NegotiateStreamStreamToStreamTest.cs(370,0): at System.Net.Security.Tests.NegotiateStreamStreamToStreamTest_Sync_Test
  OverloadNullBinding.<>c__DisplayClass1_0.<AuthenticateAsServerAsync>b__0()
          D:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs(2399,0): at System.Threading.Tasks.Task.InnerInvoke()
          D:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs(2387,0): at System.Threading.Tasks.Task.<>c.<.cctor>b__273_0(Object obj)
          D:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\ExecutionContext.cs(268,0): at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThr
  ead, ExecutionContext executionContext, ContextCallback callback, Object state)
          --- End of stack trace from previous location ---
          D:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\ExecutionContext.cs(293,0): at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThr
  ead, ExecutionContext executionContext, ContextCallback callback, Object state)
          D:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs(2349,0): at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPo
  olThread)
          --- End of stack trace from previous location ---
          D:\repos\runtime\src\libraries\Common\tests\System\Threading\Tasks\TaskTimeoutExtensions.cs(120,0): at System.Threading.Tasks.TaskTimeoutExtensions.GetRealException(Task task)
          ----- Inner Stack Trace -----

      System.Net.Security.Tests.NegotiateStreamStreamToStreamTest_BeginEnd.NegotiateStream_StreamToStream_Authentication_TargetName_Success [FAIL]
        System.AggregateException : One or more errors occurred. (Authentication failed on the remote side (the stream might still be available for additional authentication attempts).) (Authenticatio
  n failed, see inner exception.)
        ---- System.Security.Authentication.AuthenticationException : Authentication failed on the remote side (the stream might still be available for additional authentication attempts).
        -------- System.ComponentModel.Win32Exception : Unspecified error
        ---- System.Security.Authentication.AuthenticationException : Authentication failed, see inner exception.
        -------- System.ComponentModel.Win32Exception : Not enough memory is available to complete this request
        Stack Trace:
          D:\repos\runtime\src\libraries\Common\tests\System\Threading\Tasks\TaskTimeoutExtensions.cs(88,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks)
          D:\repos\runtime\src\libraries\Common\tests\System\Threading\Tasks\TaskTimeoutExtensions.cs(55,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks, Int32 mill
  isecondsTimeout)
          D:\repos\runtime\src\libraries\System.Net.Security\tests\FunctionalTests\NegotiateStreamStreamToStreamTest.cs(144,0): at System.Net.Security.Tests.NegotiateStreamStreamToStreamTest.Negotiate
  Stream_StreamToStream_Authentication_TargetName_Success()
          --- End of stack trace from previous location ---
          ----- Inner Stack Trace #1 (System.Security.Authentication.AuthenticationException) -----
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(958,0): at System.Net.Security.NegotiateStream.ThrowCredentialException(Int64 error)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(872,0): at System.Net.Security.NegotiateStream.ReceiveBlobAsync[TIOAdapter](CancellationToken ca
  ncellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(844,0): at System.Net.Security.NegotiateStream.SendBlobAsync[TIOAdapter](Byte[] message, Cancell
  ationToken cancellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(899,0): at System.Net.Security.NegotiateStream.ReceiveBlobAsync[TIOAdapter](CancellationToken ca
  ncellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(844,0): at System.Net.Security.NegotiateStream.SendBlobAsync[TIOAdapter](Byte[] message, Cancell
  ationToken cancellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(708,0): at System.Net.Security.NegotiateStream.AuthenticateAsync[TIOAdapter](CancellationToken c
  ancellationToken)
          D:\repos\runtime\src\libraries\Common\src\System\Threading\Tasks\TaskToApm.cs(41,0): at System.Threading.Tasks.TaskToApm.End(IAsyncResult asyncResult)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(121,0): at System.Net.Security.NegotiateStream.EndAuthenticateAsClient(IAsyncResult asyncResult)
          D:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\FutureFactory.cs(511,0): at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2
  endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
          --- End of stack trace from previous location ---
          D:\repos\runtime\src\libraries\Common\tests\System\Threading\Tasks\TaskTimeoutExtensions.cs(120,0): at System.Threading.Tasks.TaskTimeoutExtensions.GetRealException(Task task)
          ----- Inner Stack Trace -----

          ----- Inner Stack Trace #2 (System.Security.Authentication.AuthenticationException) -----
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(922,0): at System.Net.Security.NegotiateStream.SendAuthResetSignalAndThrowAsync[TIOAdapter](Byte
  [] message, Exception exception, CancellationToken cancellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(759,0): at System.Net.Security.NegotiateStream.SendBlobAsync[TIOAdapter](Byte[] message, Cancell
  ationToken cancellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(899,0): at System.Net.Security.NegotiateStream.ReceiveBlobAsync[TIOAdapter](CancellationToken ca
  ncellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(844,0): at System.Net.Security.NegotiateStream.SendBlobAsync[TIOAdapter](Byte[] message, Cancell
  ationToken cancellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(899,0): at System.Net.Security.NegotiateStream.ReceiveBlobAsync[TIOAdapter](CancellationToken ca
  ncellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(708,0): at System.Net.Security.NegotiateStream.AuthenticateAsync[TIOAdapter](CancellationToken c
  ancellationToken)
          D:\repos\runtime\src\libraries\Common\src\System\Threading\Tasks\TaskToApm.cs(41,0): at System.Threading.Tasks.TaskToApm.End(IAsyncResult asyncResult)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(154,0): at System.Net.Security.NegotiateStream.EndAuthenticateAsServer(IAsyncResult asyncResult)
          D:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\FutureFactory.cs(511,0): at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2
  endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
          --- End of stack trace from previous location ---
          D:\repos\runtime\src\libraries\Common\tests\System\Threading\Tasks\TaskTimeoutExtensions.cs(120,0): at System.Threading.Tasks.TaskTimeoutExtensions.GetRealException(Task task)
          ----- Inner Stack Trace -----

      System.Net.Security.Tests.NegotiateStreamStreamToStreamTest_Async_TestOverloadAllParameters.NegotiateStream_StreamToStream_Authentication_EmptyCredentials_Fails [FAIL]
        System.AggregateException : One or more errors occurred. (Authentication failed on the remote side (the stream might still be available for additional authentication attempts).) (Authenticatio
  n failed, see inner exception.)
        ---- System.Security.Authentication.AuthenticationException : Authentication failed on the remote side (the stream might still be available for additional authentication attempts).
        -------- System.ComponentModel.Win32Exception : Unspecified error
        ---- System.Security.Authentication.AuthenticationException : Authentication failed, see inner exception.
        -------- System.ComponentModel.Win32Exception : Not enough memory is available to complete this request
        Stack Trace:
          D:\repos\runtime\src\libraries\Common\tests\System\Threading\Tasks\TaskTimeoutExtensions.cs(88,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks)
          D:\repos\runtime\src\libraries\Common\tests\System\Threading\Tasks\TaskTimeoutExtensions.cs(55,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks, Int32 mill
  isecondsTimeout)
          D:\repos\runtime\src\libraries\System.Net.Security\tests\FunctionalTests\NegotiateStreamStreamToStreamTest.cs(201,0): at System.Net.Security.Tests.NegotiateStreamStreamToStreamTest.Negotiate
  Stream_StreamToStream_Authentication_EmptyCredentials_Fails()
          --- End of stack trace from previous location ---
          ----- Inner Stack Trace #1 (System.Security.Authentication.AuthenticationException) -----
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(958,0): at System.Net.Security.NegotiateStream.ThrowCredentialException(Int64 error)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(872,0): at System.Net.Security.NegotiateStream.ReceiveBlobAsync[TIOAdapter](CancellationToken ca
  ncellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(844,0): at System.Net.Security.NegotiateStream.SendBlobAsync[TIOAdapter](Byte[] message, Cancell
  ationToken cancellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(899,0): at System.Net.Security.NegotiateStream.ReceiveBlobAsync[TIOAdapter](CancellationToken ca
  ncellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(844,0): at System.Net.Security.NegotiateStream.SendBlobAsync[TIOAdapter](Byte[] message, Cancell
  ationToken cancellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(708,0): at System.Net.Security.NegotiateStream.AuthenticateAsync[TIOAdapter](CancellationToken c
  ancellationToken)
          D:\repos\runtime\src\libraries\Common\tests\System\Threading\Tasks\TaskTimeoutExtensions.cs(120,0): at System.Threading.Tasks.TaskTimeoutExtensions.GetRealException(Task task)
          ----- Inner Stack Trace -----

          ----- Inner Stack Trace #2 (System.Security.Authentication.AuthenticationException) -----
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(922,0): at System.Net.Security.NegotiateStream.SendAuthResetSignalAndThrowAsync[TIOAdapter](Byte
  [] message, Exception exception, CancellationToken cancellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(759,0): at System.Net.Security.NegotiateStream.SendBlobAsync[TIOAdapter](Byte[] message, Cancell
  ationToken cancellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(899,0): at System.Net.Security.NegotiateStream.ReceiveBlobAsync[TIOAdapter](CancellationToken ca
  ncellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(844,0): at System.Net.Security.NegotiateStream.SendBlobAsync[TIOAdapter](Byte[] message, Cancell
  ationToken cancellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(899,0): at System.Net.Security.NegotiateStream.ReceiveBlobAsync[TIOAdapter](CancellationToken ca
  ncellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(708,0): at System.Net.Security.NegotiateStream.AuthenticateAsync[TIOAdapter](CancellationToken c
  ancellationToken)
          D:\repos\runtime\src\libraries\Common\tests\System\Threading\Tasks\TaskTimeoutExtensions.cs(120,0): at System.Threading.Tasks.TaskTimeoutExtensions.GetRealException(Task task)
          ----- Inner Stack Trace -----

      System.Net.Security.Tests.NegotiateStreamStreamToStreamTest_Async_Array.NegotiateStream_StreamToStream_Authentication_EmptyCredentials_Fails [FAIL]
        System.AggregateException : One or more errors occurred. (Authentication failed on the remote side (the stream might still be available for additional authentication attempts).) (Authenticatio
  n failed, see inner exception.)
        ---- System.Security.Authentication.AuthenticationException : Authentication failed on the remote side (the stream might still be available for additional authentication attempts).
        -------- System.ComponentModel.Win32Exception : Unspecified error
        ---- System.Security.Authentication.AuthenticationException : Authentication failed, see inner exception.
        -------- System.ComponentModel.Win32Exception : Not enough memory is available to complete this request
        Stack Trace:
          D:\repos\runtime\src\libraries\Common\tests\System\Threading\Tasks\TaskTimeoutExtensions.cs(88,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks)
          D:\repos\runtime\src\libraries\Common\tests\System\Threading\Tasks\TaskTimeoutExtensions.cs(55,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks, Int32 mill
  isecondsTimeout)
          D:\repos\runtime\src\libraries\System.Net.Security\tests\FunctionalTests\NegotiateStreamStreamToStreamTest.cs(201,0): at System.Net.Security.Tests.NegotiateStreamStreamToStreamTest.Negotiate
  Stream_StreamToStream_Authentication_EmptyCredentials_Fails()
          --- End of stack trace from previous location ---
          ----- Inner Stack Trace #1 (System.Security.Authentication.AuthenticationException) -----
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(958,0): at System.Net.Security.NegotiateStream.ThrowCredentialException(Int64 error)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(872,0): at System.Net.Security.NegotiateStream.ReceiveBlobAsync[TIOAdapter](CancellationToken ca
  ncellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(844,0): at System.Net.Security.NegotiateStream.SendBlobAsync[TIOAdapter](Byte[] message, Cancell
  ationToken cancellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(899,0): at System.Net.Security.NegotiateStream.ReceiveBlobAsync[TIOAdapter](CancellationToken ca
  ncellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(844,0): at System.Net.Security.NegotiateStream.SendBlobAsync[TIOAdapter](Byte[] message, Cancell
  ationToken cancellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(708,0): at System.Net.Security.NegotiateStream.AuthenticateAsync[TIOAdapter](CancellationToken c
  ancellationToken)
          D:\repos\runtime\src\libraries\Common\tests\System\Threading\Tasks\TaskTimeoutExtensions.cs(120,0): at System.Threading.Tasks.TaskTimeoutExtensions.GetRealException(Task task)
          ----- Inner Stack Trace -----

          ----- Inner Stack Trace #2 (System.Security.Authentication.AuthenticationException) -----
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(922,0): at System.Net.Security.NegotiateStream.SendAuthResetSignalAndThrowAsync[TIOAdapter](Byte
  [] message, Exception exception, CancellationToken cancellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(759,0): at System.Net.Security.NegotiateStream.SendBlobAsync[TIOAdapter](Byte[] message, Cancell
  ationToken cancellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(899,0): at System.Net.Security.NegotiateStream.ReceiveBlobAsync[TIOAdapter](CancellationToken ca
  ncellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(844,0): at System.Net.Security.NegotiateStream.SendBlobAsync[TIOAdapter](Byte[] message, Cancell
  ationToken cancellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(899,0): at System.Net.Security.NegotiateStream.ReceiveBlobAsync[TIOAdapter](CancellationToken ca
  ncellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(708,0): at System.Net.Security.NegotiateStream.AuthenticateAsync[TIOAdapter](CancellationToken c
  ancellationToken)
          D:\repos\runtime\src\libraries\Common\tests\System\Threading\Tasks\TaskTimeoutExtensions.cs(120,0): at System.Threading.Tasks.TaskTimeoutExtensions.GetRealException(Task task)
          ----- Inner Stack Trace -----

      System.Net.Security.Tests.NegotiateStreamStreamToStreamTest_Async_TestOverloadProtectionLevel.NegotiateStream_StreamToStream_Authentication_EmptyCredentials_Fails [FAIL]
        System.AggregateException : One or more errors occurred. (Authentication failed on the remote side (the stream might still be available for additional authentication attempts).) (Authenticatio
  n failed, see inner exception.)
        ---- System.Security.Authentication.AuthenticationException : Authentication failed on the remote side (the stream might still be available for additional authentication attempts).
        -------- System.ComponentModel.Win32Exception : Unspecified error
        ---- System.Security.Authentication.AuthenticationException : Authentication failed, see inner exception.
        -------- System.ComponentModel.Win32Exception : Not enough memory is available to complete this request
        Stack Trace:
          D:\repos\runtime\src\libraries\Common\tests\System\Threading\Tasks\TaskTimeoutExtensions.cs(88,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks)
          D:\repos\runtime\src\libraries\Common\tests\System\Threading\Tasks\TaskTimeoutExtensions.cs(55,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks, Int32 mill
  isecondsTimeout)
          D:\repos\runtime\src\libraries\System.Net.Security\tests\FunctionalTests\NegotiateStreamStreamToStreamTest.cs(201,0): at System.Net.Security.Tests.NegotiateStreamStreamToStreamTest.Negotiate
  Stream_StreamToStream_Authentication_EmptyCredentials_Fails()
          --- End of stack trace from previous location ---
          ----- Inner Stack Trace #1 (System.Security.Authentication.AuthenticationException) -----
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(958,0): at System.Net.Security.NegotiateStream.ThrowCredentialException(Int64 error)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(872,0): at System.Net.Security.NegotiateStream.ReceiveBlobAsync[TIOAdapter](CancellationToken ca
  ncellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(844,0): at System.Net.Security.NegotiateStream.SendBlobAsync[TIOAdapter](Byte[] message, Cancell
  ationToken cancellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(899,0): at System.Net.Security.NegotiateStream.ReceiveBlobAsync[TIOAdapter](CancellationToken ca
  ncellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(844,0): at System.Net.Security.NegotiateStream.SendBlobAsync[TIOAdapter](Byte[] message, Cancell
  ationToken cancellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(708,0): at System.Net.Security.NegotiateStream.AuthenticateAsync[TIOAdapter](CancellationToken c
  ancellationToken)
          D:\repos\runtime\src\libraries\Common\tests\System\Threading\Tasks\TaskTimeoutExtensions.cs(120,0): at System.Threading.Tasks.TaskTimeoutExtensions.GetRealException(Task task)
          ----- Inner Stack Trace -----

          ----- Inner Stack Trace #2 (System.Security.Authentication.AuthenticationException) -----
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(922,0): at System.Net.Security.NegotiateStream.SendAuthResetSignalAndThrowAsync[TIOAdapter](Byte
  [] message, Exception exception, CancellationToken cancellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(759,0): at System.Net.Security.NegotiateStream.SendBlobAsync[TIOAdapter](Byte[] message, Cancell
  ationToken cancellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(899,0): at System.Net.Security.NegotiateStream.ReceiveBlobAsync[TIOAdapter](CancellationToken ca
  ncellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(844,0): at System.Net.Security.NegotiateStream.SendBlobAsync[TIOAdapter](Byte[] message, Cancell
  ationToken cancellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(899,0): at System.Net.Security.NegotiateStream.ReceiveBlobAsync[TIOAdapter](CancellationToken ca
  ncellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(708,0): at System.Net.Security.NegotiateStream.AuthenticateAsync[TIOAdapter](CancellationToken c
  ancellationToken)
          D:\repos\runtime\src\libraries\Common\tests\System\Threading\Tasks\TaskTimeoutExtensions.cs(120,0): at System.Threading.Tasks.TaskTimeoutExtensions.GetRealException(Task task)
          ----- Inner Stack Trace -----

      System.Net.Security.Tests.NegotiateStreamStreamToStreamTest_BeginEnd_TestOverloadNullBinding.NegotiateStream_StreamToStream_Authentication_EmptyCredentials_Fails [FAIL]
        System.AggregateException : One or more errors occurred. (Authentication failed on the remote side (the stream might still be available for additional authentication attempts).) (Authenticatio
  n failed, see inner exception.)
        ---- System.Security.Authentication.AuthenticationException : Authentication failed on the remote side (the stream might still be available for additional authentication attempts).
        -------- System.ComponentModel.Win32Exception : Unspecified error
        ---- System.Security.Authentication.AuthenticationException : Authentication failed, see inner exception.
        -------- System.ComponentModel.Win32Exception : Not enough memory is available to complete this request
        Stack Trace:
          D:\repos\runtime\src\libraries\Common\tests\System\Threading\Tasks\TaskTimeoutExtensions.cs(88,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks)
          D:\repos\runtime\src\libraries\Common\tests\System\Threading\Tasks\TaskTimeoutExtensions.cs(55,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks, Int32 mill
  isecondsTimeout)
          D:\repos\runtime\src\libraries\System.Net.Security\tests\FunctionalTests\NegotiateStreamStreamToStreamTest.cs(201,0): at System.Net.Security.Tests.NegotiateStreamStreamToStreamTest.Negotiate
  Stream_StreamToStream_Authentication_EmptyCredentials_Fails()
          --- End of stack trace from previous location ---
          ----- Inner Stack Trace #1 (System.Security.Authentication.AuthenticationException) -----
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(958,0): at System.Net.Security.NegotiateStream.ThrowCredentialException(Int64 error)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(872,0): at System.Net.Security.NegotiateStream.ReceiveBlobAsync[TIOAdapter](CancellationToken ca
  ncellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(844,0): at System.Net.Security.NegotiateStream.SendBlobAsync[TIOAdapter](Byte[] message, Cancell
  ationToken cancellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(899,0): at System.Net.Security.NegotiateStream.ReceiveBlobAsync[TIOAdapter](CancellationToken ca
  ncellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(844,0): at System.Net.Security.NegotiateStream.SendBlobAsync[TIOAdapter](Byte[] message, Cancell
  ationToken cancellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(708,0): at System.Net.Security.NegotiateStream.AuthenticateAsync[TIOAdapter](CancellationToken c
  ancellationToken)
          D:\repos\runtime\src\libraries\Common\src\System\Threading\Tasks\TaskToApm.cs(41,0): at System.Threading.Tasks.TaskToApm.End(IAsyncResult asyncResult)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(121,0): at System.Net.Security.NegotiateStream.EndAuthenticateAsClient(IAsyncResult asyncResult)
          D:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\FutureFactory.cs(511,0): at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2
  endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
          --- End of stack trace from previous location ---
          D:\repos\runtime\src\libraries\Common\tests\System\Threading\Tasks\TaskTimeoutExtensions.cs(120,0): at System.Threading.Tasks.TaskTimeoutExtensions.GetRealException(Task task)
          ----- Inner Stack Trace -----

          ----- Inner Stack Trace #2 (System.Security.Authentication.AuthenticationException) -----
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(922,0): at System.Net.Security.NegotiateStream.SendAuthResetSignalAndThrowAsync[TIOAdapter](Byte
  [] message, Exception exception, CancellationToken cancellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(759,0): at System.Net.Security.NegotiateStream.SendBlobAsync[TIOAdapter](Byte[] message, Cancell
  ationToken cancellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(899,0): at System.Net.Security.NegotiateStream.ReceiveBlobAsync[TIOAdapter](CancellationToken ca
  ncellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(844,0): at System.Net.Security.NegotiateStream.SendBlobAsync[TIOAdapter](Byte[] message, Cancell
  ationToken cancellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(899,0): at System.Net.Security.NegotiateStream.ReceiveBlobAsync[TIOAdapter](CancellationToken ca
  ncellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(708,0): at System.Net.Security.NegotiateStream.AuthenticateAsync[TIOAdapter](CancellationToken c
  ancellationToken)
          D:\repos\runtime\src\libraries\Common\src\System\Threading\Tasks\TaskToApm.cs(41,0): at System.Threading.Tasks.TaskToApm.End(IAsyncResult asyncResult)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(154,0): at System.Net.Security.NegotiateStream.EndAuthenticateAsServer(IAsyncResult asyncResult)
          D:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\FutureFactory.cs(511,0): at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2
  endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
          --- End of stack trace from previous location ---
          D:\repos\runtime\src\libraries\Common\tests\System\Threading\Tasks\TaskTimeoutExtensions.cs(120,0): at System.Threading.Tasks.TaskTimeoutExtensions.GetRealException(Task task)
          ----- Inner Stack Trace -----

      System.Net.Security.Tests.NegotiateStreamStreamToStreamTest_Sync.NegotiateStream_StreamToStream_Authentication_EmptyCredentials_Fails [FAIL]
        System.AggregateException : One or more errors occurred. (Authentication failed on the remote side (the stream might still be available for additional authentication attempts).) (Authenticatio
  n failed, see inner exception.)
        ---- System.Security.Authentication.AuthenticationException : Authentication failed on the remote side (the stream might still be available for additional authentication attempts).
        -------- System.ComponentModel.Win32Exception : Unspecified error
        ---- System.Security.Authentication.AuthenticationException : Authentication failed, see inner exception.
        -------- System.ComponentModel.Win32Exception : Not enough memory is available to complete this request
        Stack Trace:
          D:\repos\runtime\src\libraries\Common\tests\System\Threading\Tasks\TaskTimeoutExtensions.cs(88,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks)
          D:\repos\runtime\src\libraries\Common\tests\System\Threading\Tasks\TaskTimeoutExtensions.cs(55,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks, Int32 mill
  isecondsTimeout)
          D:\repos\runtime\src\libraries\System.Net.Security\tests\FunctionalTests\NegotiateStreamStreamToStreamTest.cs(201,0): at System.Net.Security.Tests.NegotiateStreamStreamToStreamTest.Negotiate
  Stream_StreamToStream_Authentication_EmptyCredentials_Fails()
          --- End of stack trace from previous location ---
          ----- Inner Stack Trace #1 (System.Security.Authentication.AuthenticationException) -----
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(958,0): at System.Net.Security.NegotiateStream.ThrowCredentialException(Int64 error)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(872,0): at System.Net.Security.NegotiateStream.ReceiveBlobAsync[TIOAdapter](CancellationToken ca
  ncellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(844,0): at System.Net.Security.NegotiateStream.SendBlobAsync[TIOAdapter](Byte[] message, Cancell
  ationToken cancellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(899,0): at System.Net.Security.NegotiateStream.ReceiveBlobAsync[TIOAdapter](CancellationToken ca
  ncellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(844,0): at System.Net.Security.NegotiateStream.SendBlobAsync[TIOAdapter](Byte[] message, Cancell
  ationToken cancellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(708,0): at System.Net.Security.NegotiateStream.AuthenticateAsync[TIOAdapter](CancellationToken c
  ancellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(173,0): at System.Net.Security.NegotiateStream.AuthenticateAsClient(NetworkCredential credential
  , ChannelBinding binding, String targetName, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel allowedImpersonationLevel)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(160,0): at System.Net.Security.NegotiateStream.AuthenticateAsClient(NetworkCredential credential
  , String targetName)
          D:\repos\runtime\src\libraries\System.Net.Security\tests\FunctionalTests\NegotiateStreamStreamToStreamTest.cs(349,0): at System.Net.Security.Tests.NegotiateStreamStreamToStreamTest_Sync.<>c_
  _DisplayClass0_0.<AuthenticateAsClientAsync>b__0()
          D:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs(2399,0): at System.Threading.Tasks.Task.InnerInvoke()
          D:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs(2387,0): at System.Threading.Tasks.Task.<>c.<.cctor>b__273_0(Object obj)
          D:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\ExecutionContext.cs(268,0): at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThr
  ead, ExecutionContext executionContext, ContextCallback callback, Object state)
          --- End of stack trace from previous location ---
          D:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\ExecutionContext.cs(293,0): at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThr
  ead, ExecutionContext executionContext, ContextCallback callback, Object state)
          D:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs(2349,0): at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPo
  olThread)
          --- End of stack trace from previous location ---
          D:\repos\runtime\src\libraries\Common\tests\System\Threading\Tasks\TaskTimeoutExtensions.cs(120,0): at System.Threading.Tasks.TaskTimeoutExtensions.GetRealException(Task task)
          ----- Inner Stack Trace -----

          ----- Inner Stack Trace #2 (System.Security.Authentication.AuthenticationException) -----
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(922,0): at System.Net.Security.NegotiateStream.SendAuthResetSignalAndThrowAsync[TIOAdapter](Byte
  [] message, Exception exception, CancellationToken cancellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(759,0): at System.Net.Security.NegotiateStream.SendBlobAsync[TIOAdapter](Byte[] message, Cancell
  ationToken cancellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(899,0): at System.Net.Security.NegotiateStream.ReceiveBlobAsync[TIOAdapter](CancellationToken ca
  ncellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(844,0): at System.Net.Security.NegotiateStream.SendBlobAsync[TIOAdapter](Byte[] message, Cancell
  ationToken cancellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(899,0): at System.Net.Security.NegotiateStream.ReceiveBlobAsync[TIOAdapter](CancellationToken ca
  ncellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(708,0): at System.Net.Security.NegotiateStream.AuthenticateAsync[TIOAdapter](CancellationToken c
  ancellationToken)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(135,0): at System.Net.Security.NegotiateStream.AuthenticateAsServer(NetworkCredential credential
  , ExtendedProtectionPolicy policy, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel requiredImpersonationLevel)
          D:\repos\runtime\src\libraries\System.Net.Security\src\System\Net\Security\NegotiateStream.cs(124,0): at System.Net.Security.NegotiateStream.AuthenticateAsServer()
          D:\repos\runtime\src\libraries\System.Net.Security\tests\FunctionalTests\NegotiateStreamStreamToStreamTest.cs(352,0): at System.Net.Security.Tests.NegotiateStreamStreamToStreamTest_Sync.<>c_
  _DisplayClass1_0.<AuthenticateAsServerAsync>b__0()
          D:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs(2399,0): at System.Threading.Tasks.Task.InnerInvoke()
          D:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs(2387,0): at System.Threading.Tasks.Task.<>c.<.cctor>b__273_0(Object obj)
          D:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\ExecutionContext.cs(268,0): at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThr
  ead, ExecutionContext executionContext, ContextCallback callback, Object state)
          --- End of stack trace from previous location ---
          D:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\ExecutionContext.cs(293,0): at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThr
  ead, ExecutionContext executionContext, ContextCallback callback, Object state)
          D:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs(2349,0): at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPo
  olThread)
          --- End of stack trace from previous location ---
          D:\repos\runtime\src\libraries\Common\tests\System\Threading\Tasks\TaskTimeoutExtensions.cs(120,0): at System.Threading.Tasks.TaskTimeoutExtensions.GetRealException(Task task)
          ----- Inner Stack Trace -----

...

cc: @filipnavara, @wfurt

Activity

  1. ghost added
    untriaged
    on Jul 14, 2022
  2. added this to the 7.0.0 milestone on Jul 14, 2022
  3. ghost removed
    untriaged
    on Jul 14, 2022
  4. stephentoub commented on Jul 14, 2022

    @stephentoub
    MemberAuthor

    @filipnavara, it looks like this is due to #71280. If I check out that commit, I still get all of these failures, but if I check out its parent (6c1d321), the failures disappear and all tests pass.

  5. stephentoub commented on Jul 14, 2022

    @stephentoub
    MemberAuthor

    Changing this line:

    _tokenBuffer ??= _tokenSize == 0 ? Array.Empty<byte>() : new byte[_tokenSize];

    from:

    _tokenBuffer ??= _tokenSize == 0 ? Array.Empty<byte>() : new byte[_tokenSize];

    to:

    if (_tokenBuffer == null || _tokenSize > _tokenBuffer.Length)
    {
        _tokenBuffer = _tokenSize == 0 ? Array.Empty<byte>() : new byte[_tokenSize];
    }

    makes all the test pass, but I don't know if that's the correct fix (or why this is only happening for me locally and not in CI or on other OSes).

  6. added
    untriaged
    on Jul 14, 2022
  7. filipnavara commented on Jul 14, 2022

    @filipnavara
    Member

    Is the machine where you tried it domain joined?

    (The proposed change would be fine but I have no idea how such condition could be reached.)

  8. filipnavara commented on Jul 14, 2022

    @filipnavara
    Member

    Does this fix it for you?

    diff --git a/src/libraries/Common/src/Interop/Windows/SspiCli/SecuritySafeHandles.cs b/src/libraries/Common/src/Interop/Windows/SspiCli/SecuritySafeHandles.cs
    index 8a8945f5dc515..8cd613b8c81de 100644
    --- a/src/libraries/Common/src/Interop/Windows/SspiCli/SecuritySafeHandles.cs
    +++ b/src/libraries/Common/src/Interop/Windows/SspiCli/SecuritySafeHandles.cs
    @@ -783,9 +783,13 @@ internal abstract partial class SafeDeleteContext : SafeHandle
     
                             outSecBuffer.size = outUnmanagedBuffer[index].cbBuffer;
                             outSecBuffer.type = outUnmanagedBuffer[index].BufferType;
    -                        outSecBuffer.token = outSecBuffer.size > 0 ?
    -                                    new Span<byte>((byte*)outUnmanagedBuffer[index].pvBuffer, outUnmanagedBuffer[0].cbBuffer).ToArray() :
    -                                    null;
    +
    +                        if (isSspiAllocated)
    +                        {
    +                            outSecBuffer.token = outSecBuffer.size > 0 ?
    +                                        new Span<byte>((byte*)outUnmanagedBuffer[index].pvBuffer, outUnmanagedBuffer[0].cbBuffer).ToArray() :
    +                                        null;
    +                        }
     
                             if (inSecBuffers.Count > 1 && inUnmanagedBuffer[1].BufferType == SecurityBufferType.SECBUFFER_EXTRA && inSecBuffers._item1.Type == SecurityBufferType.SECBUFFER_EMPTY)
                             {
  9. self-assigned this
    on Jul 14, 2022
  10. stephentoub commented on Jul 14, 2022

    @stephentoub
    MemberAuthor

    Is the machine where you tried it domain joined?

    Azure domain joined, yes.

    Will try out your suggested fix in a little while, thanks.

  11. stephentoub commented on Jul 14, 2022

    @stephentoub
    MemberAuthor

    Does this fix it for you?

    Yes

  12. ghost added
    in-pr
    on Jul 14, 2022
  13. removed
    untriaged
    on Jul 14, 2022
  14. ghost removed
    in-pr
    on Jul 14, 2022
  15. ghost locked as resolved and limited conversation to collaborators on Aug 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions