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

Test failure: System.Security.Tests.SecureStringTests/ThreadSafe_Stress(executionTimeSeconds: 5) #36910

Closed
dotnet-mc-bot opened this Issue Apr 16, 2019 · 5 comments

Comments

Projects
None yet
5 participants
@dotnet-mc-bot
Copy link

dotnet-mc-bot commented Apr 16, 2019

Opened on behalf of @wfurt

The test System.Security.Tests.SecureStringTests/ThreadSafe_Stress(executionTimeSeconds: 5) has failed.

Failure Message:

System.AggregateException : One or more errors occurred. (The output byte buffer is too small to contain the encoded data, encoding 'Unicode (UTF-8)' fallback 'System.Text.EncoderReplacementFallback'.
Parameter name: bytes) (The output byte buffer is too small to contain the encoded data, encoding 'Unicode (UTF-8)' fallback 'System.Text.EncoderReplacementFallback'.
Parameter name: bytes)
---- System.ArgumentException : The output byte buffer is too small to contain the encoded data, encoding 'Unicode (UTF-8)' fallback 'System.Text.EncoderReplacementFallback'.
Parameter name: bytes
---- System.ArgumentException : The output byte buffer is too small to contain the encoded data, encoding 'Unicode (UTF-8)' fallback 'System.Text.EncoderReplacementFallback'.
Parameter name: bytes

Stack Trace:

   at System.Threading.Tasks.Task.WaitAllCore(Task[] tasks, Int32 millisecondsTimeout, CancellationToken cancellationToken) in /__w/1/s/src/System.Private.CoreLib/shared/System/Threading/Tasks/Task.cs:line 4815
   at System.Security.Tests.SecureStringTests.ThreadSafe_Stress(Int32 executionTimeSeconds)
----- Inner Stack Trace #1 (System.ArgumentException) -----
   at System.Text.Encoding.ThrowBytesOverflow() in /__w/1/s/src/System.Private.CoreLib/shared/System/Text/Encoding.cs:line 1188
   at System.Text.Encoding.ThrowBytesOverflow(EncoderNLS encoder, Boolean nothingEncoded) in /__w/1/s/src/System.Private.CoreLib/shared/System/Text/Encoding.cs:line 1204
   at System.Text.Encoding.GetBytesWithFallback(ReadOnlySpan`1 chars, Int32 originalCharsLength, Span`1 bytes, Int32 originalBytesLength, EncoderNLS encoder) in /__w/1/s/src/System.Private.CoreLib/shared/System/Text/Encoding.Internal.cs:line 689
   at System.Text.Encoding.GetBytesWithFallback(Char* pOriginalChars, Int32 originalCharCount, Byte* pOriginalBytes, Int32 originalByteCount, Int32 charsConsumedSoFar, Int32 bytesWrittenSoFar) in /__w/1/s/src/System.Private.CoreLib/shared/System/Text/Encoding.Internal.cs:line 499
   at System.Text.UTF8Encoding.GetBytes(Char* chars, Int32 charCount, Byte* bytes, Int32 byteCount) in /__w/1/s/src/System.Private.CoreLib/shared/System/Text/UTF8Encoding.cs:line 368
   at System.Security.SecureString.MarshalToStringCore(Boolean globalAlloc, Boolean unicode) in /__w/1/s/src/System.Private.CoreLib/shared/System/Security/SecureString.Unix.cs:line 206
   at System.Security.SecureString.MarshalToString(Boolean globalAlloc, Boolean unicode) in /__w/1/s/src/System.Private.CoreLib/shared/System/Security/SecureString.cs:line 182
   at System.Runtime.InteropServices.Marshal.SecureStringToCoTaskMemAnsi(SecureString s) in /__w/1/s/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/Marshal.cs:line 637
   at System.Security.Tests.SecureStringTests.<>c__DisplayClass22_1.<ThreadSafe_Stress>b__1() in /__w/1/s/src/System.Security.SecureString/tests/SecureStringTests.cs:line 490
   at System.Threading.Tasks.Task.InnerInvoke() in /__w/1/s/src/System.Private.CoreLib/shared/System/Threading/Tasks/Task.cs:line 2463
   at System.Threading.Tasks.Task.<>c.<.cctor>b__274_0(Object obj) in /__w/1/s/src/System.Private.CoreLib/shared/System/Threading/Tasks/Task.cs:line 2442
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) in /__w/1/s/src/System.Private.CoreLib/shared/System/Threading/ExecutionContext.cs:line 289
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) in /__w/1/s/src/System.Private.CoreLib/shared/System/Threading/ExecutionContext.cs:line 314
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) in /__w/1/s/src/System.Private.CoreLib/shared/System/Threading/Tasks/Task.cs:line 2403
----- Inner Stack Trace #2 (System.ArgumentException) -----
   at System.Text.Encoding.ThrowBytesOverflow() in /__w/1/s/src/System.Private.CoreLib/shared/System/Text/Encoding.cs:line 1188
   at System.Text.Encoding.ThrowBytesOverflow(EncoderNLS encoder, Boolean nothingEncoded) in /__w/1/s/src/System.Private.CoreLib/shared/System/Text/Encoding.cs:line 1204
   at System.Text.Encoding.GetBytesWithFallback(ReadOnlySpan`1 chars, Int32 originalCharsLength, Span`1 bytes, Int32 originalBytesLength, EncoderNLS encoder) in /__w/1/s/src/System.Private.CoreLib/shared/System/Text/Encoding.Internal.cs:line 588
   at System.Text.Encoding.GetBytesWithFallback(Char* pOriginalChars, Int32 originalCharCount, Byte* pOriginalBytes, Int32 originalByteCount, Int32 charsConsumedSoFar, Int32 bytesWrittenSoFar) in /__w/1/s/src/System.Private.CoreLib/shared/System/Text/Encoding.Internal.cs:line 499
   at System.Text.UTF8Encoding.GetBytes(Char* chars, Int32 charCount, Byte* bytes, Int32 byteCount) in /__w/1/s/src/System.Private.CoreLib/shared/System/Text/UTF8Encoding.cs:line 363
   at System.Security.SecureString.MarshalToStringCore(Boolean globalAlloc, Boolean unicode) in /__w/1/s/src/System.Private.CoreLib/shared/System/Security/SecureString.Unix.cs:line 230
   at System.Security.SecureString.MarshalToString(Boolean globalAlloc, Boolean unicode) in /__w/1/s/src/System.Private.CoreLib/shared/System/Security/SecureString.cs:line 184
   at System.Security.Tests.SecureStringTests.<>c__DisplayClass22_1.<ThreadSafe_Stress>b__1() in /__w/1/s/src/System.Security.SecureString/tests/SecureStringTests.cs:line 496
   at System.Threading.Tasks.Task.InnerInvoke() in /__w/1/s/src/System.Private.CoreLib/shared/System/Threading/Tasks/Task.cs:line 2463
   at System.Threading.Tasks.Task.<>c.<.cctor>b__274_0(Object obj) in /__w/1/s/src/System.Private.CoreLib/shared/System/Threading/Tasks/Task.cs:line 2442
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) in /__w/1/s/src/System.Private.CoreLib/shared/System/Threading/ExecutionContext.cs:line 289
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) in /__w/1/s/src/System.Private.CoreLib/shared/System/Threading/ExecutionContext.cs:line 314
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) in /__w/1/s/src/System.Private.CoreLib/shared/System/Threading/Tasks/Task.cs:line 2403

Build : 3.0 - 20190415.9 (Core Tests)
Failing configurations:

  • Fedora.29.Amd64-x64
    • Release
  • Fedora.28.Amd64-x64
    • Release
  • SLES.12.Amd64-x64
    • Release
  • OpenSuse.42.Amd64-x64
    • Release
  • Ubuntu.1810.Amd64-x64
    • Release
  • Ubuntu.1604.Amd64-x64
    • Release
  • Debian.9.Amd64-x64
    • Release
  • Debian.8.Amd64-x64
    • Release
  • Alpine.38.Amd64-x64
    • Release
  • OSX.1013.Amd64-x64
    • Release
@stephentoub

This comment has been minimized.

Copy link
Member

stephentoub commented Apr 16, 2019

@GrabYourPitchforks, your recent fix addressed this, right?

@danmosemsft

This comment has been minimized.

Copy link
Member

danmosemsft commented Apr 16, 2019

This is a dupe of mine..

@danmosemsft

This comment has been minimized.

Copy link
Member

danmosemsft commented Apr 16, 2019

@wfurt

This comment has been minimized.

Copy link
Member

wfurt commented Apr 16, 2019

I guess I'm too slow ;(. I did look at MC and I did not see associated issue.

@GrabYourPitchforks

This comment has been minimized.

Copy link
Member

GrabYourPitchforks commented Apr 17, 2019

Fixed as of #36922.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.