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

System.Runtime.Extensions.Tests: Assertion failed #61359

Closed
krwq opened this issue Nov 9, 2021 · 12 comments · Fixed by #64881
Closed

System.Runtime.Extensions.Tests: Assertion failed #61359

krwq opened this issue Nov 9, 2021 · 12 comments · Fixed by #64881
Assignees
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms'

Comments

@krwq
Copy link
Member

krwq commented Nov 9, 2021

Failed in: #61323

Click to expand log
===========================================================================================================
/datadisks/disk1/work/AA5D0994/w/A03008EC/e /datadisks/disk1/work/AA5D0994/w/A03008EC/e
  Discovering: System.Runtime.Extensions.Tests (method display = ClassAndMethod, method display options = None)
  Discovered:  System.Runtime.Extensions.Tests (found 921 of 1000 test cases)
  Starting:    System.Runtime.Extensions.Tests (parallel test collections = on, max threads = 2)
    System.Tests.EnvironmentTests.GetFolderPath_UWP_NotEmpty [SKIP]
      Condition(s) not met: "IsWindows10Version1709OrGreater", "IsInAppContainer"
    System.Tests.EnvironmentTests.GetFolderPath_UWP_ExistAndAccessible [SKIP]
      Condition(s) not met: "IsWindows10Version1709OrGreater", "IsInAppContainer"
    System.Tests.EnvironmentTests.UserInteractive_WindowsNano [SKIP]
      Condition(s) not met: "IsWindowsNanoServer"
    System.Numerics.Tests.BitOperationsTests.BitOps_PopCount_nuint_32 [SKIP]
      Condition(s) not met: "Is32BitProcess"
    System.Numerics.Tests.BitOperationsTests.BitOps_Log2_nuint_32 [SKIP]
      Condition(s) not met: "Is32BitProcess"
    System.Numerics.Tests.BitOperationsTests.BitOps_TrailingZeroCount_nuint_32 [SKIP]
      Condition(s) not met: "Is32BitProcess"
    System.Numerics.Tests.BitOperationsTests.BitOps_LeadingZeroCount_nuint_32 [SKIP]
      Condition(s) not met: "Is32BitProcess"
    System.Numerics.Tests.BitOperationsTests.BitOps_IsPow2_nuint_32 [SKIP]
      Condition(s) not met: "Is32BitProcess"
    System.Numerics.Tests.BitOperationsTests.BitOps_RoundUpToPow2_nuint_32 [SKIP]
      Condition(s) not met: "Is32BitProcess"
    System.Numerics.Tests.BitOperationsTests.BitOps_TrailingZeroCount_nint_32 [SKIP]
      Condition(s) not met: "Is32BitProcess"
    System.Numerics.Tests.BitOperationsTests.BitOps_IsPow2_nint_32 [SKIP]
      Condition(s) not met: "Is32BitProcess"
Process terminated. Assertion failed.
   at System.Number.FormatHalf(ValueStringBuilder& sb, Half value, ReadOnlySpan`1 format, NumberFormatInfo info) in /_/src/libraries/System.Private.CoreLib/src/System/Number.Formatting.cs:line 723
   at System.Number.FormatHalf(Half value, String format, NumberFormatInfo info) in /_/src/libraries/System.Private.CoreLib/src/System/Number.Formatting.cs:line 677
   at System.Half.ToString(String format, IFormatProvider provider) in /_/src/libraries/System.Private.CoreLib/src/System/Half.cs:line 483
   at Xunit.Sdk.ArgumentFormatter.Format(Object value, Int32 depth) in /_/src/xunit.assert/Asserts/Sdk/ArgumentFormatter.cs:line 120
   at Xunit.Sdk.TypeUtility.GetDisplayNameWithArguments(IMethodInfo method, String baseDisplayName, Object[] arguments, ITypeInfo[] genericTypes) in /_/src/xunit.execution/Sdk/TypeUtility.cs:line 204
   at Xunit.Sdk.XunitTheoryTestCaseRunner.AfterTestCaseStartingAsync() in /_/src/xunit.execution/Sdk/Frameworks/Runners/XunitTheoryTestCaseRunner.cs:line 112
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine) in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncMethodBuilderCore.cs:line 38
   at Xunit.Sdk.XunitTheoryTestCaseRunner.AfterTestCaseStartingAsync()
   at Xunit.Sdk.TestCaseRunner`1.RunAsync() in /_/src/xunit.execution/Sdk/Frameworks/Runners/TestCaseRunner.cs:line 81
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine) in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncMethodBuilderCore.cs:line 38
   at Xunit.Sdk.TestCaseRunner`1.RunAsync()
   at Xunit.Sdk.TestMethodRunner`1.RunTestCasesAsync() in /_/src/xunit.execution/Sdk/Frameworks/Runners/TestMethodRunner.cs:line 136
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine) in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncMethodBuilderCore.cs:line 38
   at Xunit.Sdk.TestMethodRunner`1.RunTestCasesAsync()
   at Xunit.Sdk.TestMethodRunner`1.RunAsync() in /_/src/xunit.execution/Sdk/Frameworks/Runners/TestMethodRunner.cs:line 106
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine) in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncMethodBuilderCore.cs:line 38
   at Xunit.Sdk.TestMethodRunner`1.RunAsync()
   at Xunit.Sdk.TestClassRunner`1.RunTestMethodsAsync() in /_/src/xunit.execution/Sdk/Frameworks/Runners/TestClassRunner.cs:line 213
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine) in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncMethodBuilderCore.cs:line 38
   at Xunit.Sdk.TestClassRunner`1.RunTestMethodsAsync()
   at Xunit.Sdk.TestClassRunner`1.RunAsync() in /_/src/xunit.execution/Sdk/Frameworks/Runners/TestClassRunner.cs:line 171
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine) in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncMethodBuilderCore.cs:line 38
   at Xunit.Sdk.TestClassRunner`1.RunAsync()
   at Xunit.Sdk.XunitTestCollectionRunner.RunTestClassAsync(ITestClass testClass, IReflectionTypeInfo class, IEnumerable`1 testCases) in /_/src/xunit.execution/Sdk/Frameworks/Runners/XunitTestCollectionRunner.cs:line 158
   at Xunit.Sdk.TestCollectionRunner`1.RunTestClassesAsync() in /_/src/xunit.execution/Sdk/Frameworks/Runners/TestCollectionRunner.cs:line 130
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine) in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncMethodBuilderCore.cs:line 38
   at Xunit.Sdk.TestCollectionRunner`1.RunTestClassesAsync()
   at Xunit.Sdk.TestCollectionRunner`1.RunAsync() in /_/src/xunit.execution/Sdk/Frameworks/Runners/TestCollectionRunner.cs:line 101
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine) in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncMethodBuilderCore.cs:line 38
   at Xunit.Sdk.TestCollectionRunner`1.RunAsync()
   at Xunit.Sdk.XunitTestAssemblyRunner.RunTestCollectionAsync(IMessageBus messageBus, ITestCollection testCollection, IEnumerable`1 testCases, CancellationTokenSource cancellationTokenSource) in /_/src/xunit.execution/Sdk/Frameworks/Runners/XunitTestAssemblyRunner.cs:line 235
   at Xunit.Sdk.XunitTestAssemblyRunner.<>c__DisplayClass14_2.<RunTestCollectionsAsync>b__2() in /_/src/xunit.execution/Sdk/Frameworks/Runners/XunitTestAssemblyRunner.cs:line 184
   at System.Threading.Tasks.Task`1.InnerInvoke() in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Future.cs:line 503
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/ExecutionContext.cs:line 183
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:line 2333
   at System.Threading.Tasks.Task.ExecuteEntry() in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:line 2246
   at System.Threading.Tasks.SynchronizationContextTaskScheduler.<>c.<.cctor>b__8_0(Object s) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/TaskScheduler.cs:line 631
   at Xunit.Sdk.MaxConcurrencySyncContext.RunOnSyncContext(SendOrPostCallback callback, Object state) in /_/src/xunit.execution/Sdk/MaxConcurrencySyncContext.cs:line 106
   at Xunit.Sdk.MaxConcurrencySyncContext.<>c__DisplayClass11_0.<WorkerThreadProc>b__0(Object _) in /_/src/xunit.execution/Sdk/MaxConcurrencySyncContext.cs:line 96
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/ExecutionContext.cs:line 183
   at Xunit.Sdk.MaxConcurrencySyncContext.WorkerThreadProc() in /_/src/xunit.execution/Sdk/MaxConcurrencySyncContext.cs:line 96
   at Xunit.Sdk.XunitWorkerThread.<>c.<QueueUserWorkItem>b__5_0(Object _) in /_/src/common/XunitWorkerThread.cs:line 37
   at System.Threading.Tasks.Task.InnerInvoke() in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:line 2393
   at System.Threading.Tasks.Task.<>c.<.cctor>b__272_0(Object obj) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:line 2375
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/ExecutionContext.cs:line 183
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:line 2333
   at System.Threading.Tasks.Task.ExecuteEntryUnsafe(Thread threadPoolThread) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:line 2271
   at System.Threading.Tasks.ThreadPoolTaskScheduler.<>c.<.cctor>b__10_0(Object s) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/ThreadPoolTaskScheduler.cs:line 35
   at System.Threading.Thread.StartCallback() in /_/src/coreclr/System.Private.CoreLib/src/System/Threading/Thread.CoreCLR.cs:line 105
./RunTests.sh: line 162: 24646 Aborted                 (core dumped) "$RUNTIME_PATH/dotnet" exec --runtimeconfig System.Runtime.Extensions.Tests.runtimeconfig.json --depsfile System.Runtime.Extensions.Tests.deps.json xunit.console.dll System.Runtime.Extensions.Tests.dll -xml testResults.xml -nologo -nocolor -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing $RSP_FILE
/datadisks/disk1/work/AA5D0994/w/A03008EC/e
----- end Tue Nov 9 03:41:09 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.
@ghost
Copy link

ghost commented Nov 9, 2021

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

Issue Details

Failed in: #61323

Click to expand log
===========================================================================================================
/datadisks/disk1/work/AA5D0994/w/A03008EC/e /datadisks/disk1/work/AA5D0994/w/A03008EC/e
  Discovering: System.Runtime.Extensions.Tests (method display = ClassAndMethod, method display options = None)
  Discovered:  System.Runtime.Extensions.Tests (found 921 of 1000 test cases)
  Starting:    System.Runtime.Extensions.Tests (parallel test collections = on, max threads = 2)
    System.Tests.EnvironmentTests.GetFolderPath_UWP_NotEmpty [SKIP]
      Condition(s) not met: "IsWindows10Version1709OrGreater", "IsInAppContainer"
    System.Tests.EnvironmentTests.GetFolderPath_UWP_ExistAndAccessible [SKIP]
      Condition(s) not met: "IsWindows10Version1709OrGreater", "IsInAppContainer"
    System.Tests.EnvironmentTests.UserInteractive_WindowsNano [SKIP]
      Condition(s) not met: "IsWindowsNanoServer"
    System.Numerics.Tests.BitOperationsTests.BitOps_PopCount_nuint_32 [SKIP]
      Condition(s) not met: "Is32BitProcess"
    System.Numerics.Tests.BitOperationsTests.BitOps_Log2_nuint_32 [SKIP]
      Condition(s) not met: "Is32BitProcess"
    System.Numerics.Tests.BitOperationsTests.BitOps_TrailingZeroCount_nuint_32 [SKIP]
      Condition(s) not met: "Is32BitProcess"
    System.Numerics.Tests.BitOperationsTests.BitOps_LeadingZeroCount_nuint_32 [SKIP]
      Condition(s) not met: "Is32BitProcess"
    System.Numerics.Tests.BitOperationsTests.BitOps_IsPow2_nuint_32 [SKIP]
      Condition(s) not met: "Is32BitProcess"
    System.Numerics.Tests.BitOperationsTests.BitOps_RoundUpToPow2_nuint_32 [SKIP]
      Condition(s) not met: "Is32BitProcess"
    System.Numerics.Tests.BitOperationsTests.BitOps_TrailingZeroCount_nint_32 [SKIP]
      Condition(s) not met: "Is32BitProcess"
    System.Numerics.Tests.BitOperationsTests.BitOps_IsPow2_nint_32 [SKIP]
      Condition(s) not met: "Is32BitProcess"
Process terminated. Assertion failed.
   at System.Number.FormatHalf(ValueStringBuilder& sb, Half value, ReadOnlySpan`1 format, NumberFormatInfo info) in /_/src/libraries/System.Private.CoreLib/src/System/Number.Formatting.cs:line 723
   at System.Number.FormatHalf(Half value, String format, NumberFormatInfo info) in /_/src/libraries/System.Private.CoreLib/src/System/Number.Formatting.cs:line 677
   at System.Half.ToString(String format, IFormatProvider provider) in /_/src/libraries/System.Private.CoreLib/src/System/Half.cs:line 483
   at Xunit.Sdk.ArgumentFormatter.Format(Object value, Int32 depth) in /_/src/xunit.assert/Asserts/Sdk/ArgumentFormatter.cs:line 120
   at Xunit.Sdk.TypeUtility.GetDisplayNameWithArguments(IMethodInfo method, String baseDisplayName, Object[] arguments, ITypeInfo[] genericTypes) in /_/src/xunit.execution/Sdk/TypeUtility.cs:line 204
   at Xunit.Sdk.XunitTheoryTestCaseRunner.AfterTestCaseStartingAsync() in /_/src/xunit.execution/Sdk/Frameworks/Runners/XunitTheoryTestCaseRunner.cs:line 112
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine) in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncMethodBuilderCore.cs:line 38
   at Xunit.Sdk.XunitTheoryTestCaseRunner.AfterTestCaseStartingAsync()
   at Xunit.Sdk.TestCaseRunner`1.RunAsync() in /_/src/xunit.execution/Sdk/Frameworks/Runners/TestCaseRunner.cs:line 81
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine) in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncMethodBuilderCore.cs:line 38
   at Xunit.Sdk.TestCaseRunner`1.RunAsync()
   at Xunit.Sdk.TestMethodRunner`1.RunTestCasesAsync() in /_/src/xunit.execution/Sdk/Frameworks/Runners/TestMethodRunner.cs:line 136
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine) in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncMethodBuilderCore.cs:line 38
   at Xunit.Sdk.TestMethodRunner`1.RunTestCasesAsync()
   at Xunit.Sdk.TestMethodRunner`1.RunAsync() in /_/src/xunit.execution/Sdk/Frameworks/Runners/TestMethodRunner.cs:line 106
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine) in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncMethodBuilderCore.cs:line 38
   at Xunit.Sdk.TestMethodRunner`1.RunAsync()
   at Xunit.Sdk.TestClassRunner`1.RunTestMethodsAsync() in /_/src/xunit.execution/Sdk/Frameworks/Runners/TestClassRunner.cs:line 213
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine) in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncMethodBuilderCore.cs:line 38
   at Xunit.Sdk.TestClassRunner`1.RunTestMethodsAsync()
   at Xunit.Sdk.TestClassRunner`1.RunAsync() in /_/src/xunit.execution/Sdk/Frameworks/Runners/TestClassRunner.cs:line 171
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine) in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncMethodBuilderCore.cs:line 38
   at Xunit.Sdk.TestClassRunner`1.RunAsync()
   at Xunit.Sdk.XunitTestCollectionRunner.RunTestClassAsync(ITestClass testClass, IReflectionTypeInfo class, IEnumerable`1 testCases) in /_/src/xunit.execution/Sdk/Frameworks/Runners/XunitTestCollectionRunner.cs:line 158
   at Xunit.Sdk.TestCollectionRunner`1.RunTestClassesAsync() in /_/src/xunit.execution/Sdk/Frameworks/Runners/TestCollectionRunner.cs:line 130
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine) in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncMethodBuilderCore.cs:line 38
   at Xunit.Sdk.TestCollectionRunner`1.RunTestClassesAsync()
   at Xunit.Sdk.TestCollectionRunner`1.RunAsync() in /_/src/xunit.execution/Sdk/Frameworks/Runners/TestCollectionRunner.cs:line 101
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine) in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncMethodBuilderCore.cs:line 38
   at Xunit.Sdk.TestCollectionRunner`1.RunAsync()
   at Xunit.Sdk.XunitTestAssemblyRunner.RunTestCollectionAsync(IMessageBus messageBus, ITestCollection testCollection, IEnumerable`1 testCases, CancellationTokenSource cancellationTokenSource) in /_/src/xunit.execution/Sdk/Frameworks/Runners/XunitTestAssemblyRunner.cs:line 235
   at Xunit.Sdk.XunitTestAssemblyRunner.<>c__DisplayClass14_2.<RunTestCollectionsAsync>b__2() in /_/src/xunit.execution/Sdk/Frameworks/Runners/XunitTestAssemblyRunner.cs:line 184
   at System.Threading.Tasks.Task`1.InnerInvoke() in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Future.cs:line 503
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/ExecutionContext.cs:line 183
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:line 2333
   at System.Threading.Tasks.Task.ExecuteEntry() in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:line 2246
   at System.Threading.Tasks.SynchronizationContextTaskScheduler.<>c.<.cctor>b__8_0(Object s) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/TaskScheduler.cs:line 631
   at Xunit.Sdk.MaxConcurrencySyncContext.RunOnSyncContext(SendOrPostCallback callback, Object state) in /_/src/xunit.execution/Sdk/MaxConcurrencySyncContext.cs:line 106
   at Xunit.Sdk.MaxConcurrencySyncContext.<>c__DisplayClass11_0.<WorkerThreadProc>b__0(Object _) in /_/src/xunit.execution/Sdk/MaxConcurrencySyncContext.cs:line 96
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/ExecutionContext.cs:line 183
   at Xunit.Sdk.MaxConcurrencySyncContext.WorkerThreadProc() in /_/src/xunit.execution/Sdk/MaxConcurrencySyncContext.cs:line 96
   at Xunit.Sdk.XunitWorkerThread.<>c.<QueueUserWorkItem>b__5_0(Object _) in /_/src/common/XunitWorkerThread.cs:line 37
   at System.Threading.Tasks.Task.InnerInvoke() in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:line 2393
   at System.Threading.Tasks.Task.<>c.<.cctor>b__272_0(Object obj) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:line 2375
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/ExecutionContext.cs:line 183
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:line 2333
   at System.Threading.Tasks.Task.ExecuteEntryUnsafe(Thread threadPoolThread) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:line 2271
   at System.Threading.Tasks.ThreadPoolTaskScheduler.<>c.<.cctor>b__10_0(Object s) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/ThreadPoolTaskScheduler.cs:line 35
   at System.Threading.Thread.StartCallback() in /_/src/coreclr/System.Private.CoreLib/src/System/Threading/Thread.CoreCLR.cs:line 105
./RunTests.sh: line 162: 24646 Aborted                 (core dumped) "$RUNTIME_PATH/dotnet" exec --runtimeconfig System.Runtime.Extensions.Tests.runtimeconfig.json --depsfile System.Runtime.Extensions.Tests.deps.json xunit.console.dll System.Runtime.Extensions.Tests.dll -xml testResults.xml -nologo -nocolor -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing $RSP_FILE
/datadisks/disk1/work/AA5D0994/w/A03008EC/e
----- end Tue Nov 9 03:41:09 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.
Author: krwq
Assignees: -
Labels:

area-System.Numerics

Milestone: -

@krwq
Copy link
Member Author

krwq commented Nov 9, 2021

cc: @tannergooding

@danmoseley
Copy link
Member

Debug.Assert(((precision != -1) && (precision < HalfPrecision)) || (BitConverter.HalfToInt16Bits(value) == BitConverter.HalfToInt16Bits(NumberToHalf(ref number))));

(Libraries Test Run checked coreclr Linux x64 Debug)

Guess - it's one of the Half values used as theory data (see BitConverterBase.cs) as it's constructing the test name.

@am11
Copy link
Member

am11 commented Feb 6, 2022

Failed again in #64851 on linux x64 - console log. Intermittent nature of failure suggests that perhaps some unsafe API operation is not reliable? 🤔

I tried text:.*FormatHalf.* on runfo to check how frequently it is failing, but it crashed the app so I didn't try again. 😅

@danmoseley
Copy link
Member

We should break this assert into several, and log the values (including the half value.. carefully.)

@am11
Copy link
Member

am11 commented Feb 6, 2022

carefully

Ah, that's the key; otherwise we can potentially run into infinite recursion here (if debug message has Half value).

@jkotas
Copy link
Member

jkotas commented Feb 6, 2022

We should break this assert into several, and log the values (including the half value.. carefully.)

I doubt that it would help. It has very high chance to make the repro go away. This is likely either going to be uninitialized variable somewhere or a codegen bug.

I will take a look at the crash dump.

@jkotas
Copy link
Member

jkotas commented Feb 6, 2022

This is a codegen bug in OptimizedTier1 version of System.BitConverter.HalfToInt16Bits. The return value is expected to be sign-extended, but it is zero-extended instead.

The bug manifest itself as test failure only when we switch from QuickJitted version of HalfToInt16Bits to OptimizedTier1 version between the two calls to HalfToInt16Bits in the failing assert. It explains why the test failure is very rare.

More details based on the dump from #64851:

...
    0x7fb2694e6fe0: movswq -0x10(%rbp), %rdi
    0x7fb2694e6fe5: callq  0x7fb2673ec2e0 // HalfToInt16Bits
    0x7fb2694e6fea: movl   %eax, -0x7c(%rbp) <-- the value returned from HalfToInt16Bits is expected to be sign-extended
    0x7fb2694e6fed: leaq   -0x60(%rbp), %rdi
    0x7fb2694e6ff1: callq  0x7fb2673fedd0 // NumberToHalf
    0x7fb2694e6ff6: movw   %ax, -0x88(%rbp)
    0x7fb2694e6ffd: movswq -0x88(%rbp), %rdi
    0x7fb2694e7005: callq  0x7fb2673ec2e0 // HalfToInt16Bits
    0x7fb2694e700a: cmpl   -0x7c(%rbp), %eax <-- the value returned from HalfToInt16Bits is expected to be sign-extended
    0x7fb2694e700d: sete   %dil
    0x7fb2694e7011: movzbl %dil, %edi
    0x7fb2694e7015: movl   %edi, -0x8c(%rbp)
...
(lldb) ip2md 0x7fb2694ef5d0
MethodDesc:   00007fb2675a2e20
Method Name:          System.BitConverter.HalfToInt16Bits(System.Half)
...
     CodeAddr:           00007fb2694ef5d0  (OptimizedTier1)
     NativeCodeVersion:  00007FB214170F50
     CodeAddr:           00007fb2694e9270  (QuickJitted)
     NativeCodeVersion:  0000000000000000
(lldb) disassemble --start 00007fb2694e9270
    0x7fb2694e9270: pushq  %rbp
    0x7fb2694e9271: subq   $0x10, %rsp
    0x7fb2694e9275: leaq   0x10(%rsp), %rbp
    0x7fb2694e927a: movl   %edi, -0x8(%rbp)
    0x7fb2694e927d: movswq -0x8(%rbp), %rax <- the value returned from HalfToInt16Bits is sign-extended. Correct.
    0x7fb2694e9282: addq   $0x10, %rsp
    0x7fb2694e9286: popq   %rbp
    0x7fb2694e9287: retq
(lldb) disassemble --start 00007fb2694ef5d0
    0x7fb2694ef5d0: movzwl %di, %eax <- the value returned from HalfToInt16Bits is zero-extended. This is the bug!
    0x7fb2694ef5d3: retq

@jkotas jkotas added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Feb 6, 2022
@ghost
Copy link

ghost commented Feb 6, 2022

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

Issue Details

Failed in: #61323

Click to expand log
===========================================================================================================
/datadisks/disk1/work/AA5D0994/w/A03008EC/e /datadisks/disk1/work/AA5D0994/w/A03008EC/e
  Discovering: System.Runtime.Extensions.Tests (method display = ClassAndMethod, method display options = None)
  Discovered:  System.Runtime.Extensions.Tests (found 921 of 1000 test cases)
  Starting:    System.Runtime.Extensions.Tests (parallel test collections = on, max threads = 2)
    System.Tests.EnvironmentTests.GetFolderPath_UWP_NotEmpty [SKIP]
      Condition(s) not met: "IsWindows10Version1709OrGreater", "IsInAppContainer"
    System.Tests.EnvironmentTests.GetFolderPath_UWP_ExistAndAccessible [SKIP]
      Condition(s) not met: "IsWindows10Version1709OrGreater", "IsInAppContainer"
    System.Tests.EnvironmentTests.UserInteractive_WindowsNano [SKIP]
      Condition(s) not met: "IsWindowsNanoServer"
    System.Numerics.Tests.BitOperationsTests.BitOps_PopCount_nuint_32 [SKIP]
      Condition(s) not met: "Is32BitProcess"
    System.Numerics.Tests.BitOperationsTests.BitOps_Log2_nuint_32 [SKIP]
      Condition(s) not met: "Is32BitProcess"
    System.Numerics.Tests.BitOperationsTests.BitOps_TrailingZeroCount_nuint_32 [SKIP]
      Condition(s) not met: "Is32BitProcess"
    System.Numerics.Tests.BitOperationsTests.BitOps_LeadingZeroCount_nuint_32 [SKIP]
      Condition(s) not met: "Is32BitProcess"
    System.Numerics.Tests.BitOperationsTests.BitOps_IsPow2_nuint_32 [SKIP]
      Condition(s) not met: "Is32BitProcess"
    System.Numerics.Tests.BitOperationsTests.BitOps_RoundUpToPow2_nuint_32 [SKIP]
      Condition(s) not met: "Is32BitProcess"
    System.Numerics.Tests.BitOperationsTests.BitOps_TrailingZeroCount_nint_32 [SKIP]
      Condition(s) not met: "Is32BitProcess"
    System.Numerics.Tests.BitOperationsTests.BitOps_IsPow2_nint_32 [SKIP]
      Condition(s) not met: "Is32BitProcess"
Process terminated. Assertion failed.
   at System.Number.FormatHalf(ValueStringBuilder& sb, Half value, ReadOnlySpan`1 format, NumberFormatInfo info) in /_/src/libraries/System.Private.CoreLib/src/System/Number.Formatting.cs:line 723
   at System.Number.FormatHalf(Half value, String format, NumberFormatInfo info) in /_/src/libraries/System.Private.CoreLib/src/System/Number.Formatting.cs:line 677
   at System.Half.ToString(String format, IFormatProvider provider) in /_/src/libraries/System.Private.CoreLib/src/System/Half.cs:line 483
   at Xunit.Sdk.ArgumentFormatter.Format(Object value, Int32 depth) in /_/src/xunit.assert/Asserts/Sdk/ArgumentFormatter.cs:line 120
   at Xunit.Sdk.TypeUtility.GetDisplayNameWithArguments(IMethodInfo method, String baseDisplayName, Object[] arguments, ITypeInfo[] genericTypes) in /_/src/xunit.execution/Sdk/TypeUtility.cs:line 204
   at Xunit.Sdk.XunitTheoryTestCaseRunner.AfterTestCaseStartingAsync() in /_/src/xunit.execution/Sdk/Frameworks/Runners/XunitTheoryTestCaseRunner.cs:line 112
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine) in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncMethodBuilderCore.cs:line 38
   at Xunit.Sdk.XunitTheoryTestCaseRunner.AfterTestCaseStartingAsync()
   at Xunit.Sdk.TestCaseRunner`1.RunAsync() in /_/src/xunit.execution/Sdk/Frameworks/Runners/TestCaseRunner.cs:line 81
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine) in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncMethodBuilderCore.cs:line 38
   at Xunit.Sdk.TestCaseRunner`1.RunAsync()
   at Xunit.Sdk.TestMethodRunner`1.RunTestCasesAsync() in /_/src/xunit.execution/Sdk/Frameworks/Runners/TestMethodRunner.cs:line 136
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine) in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncMethodBuilderCore.cs:line 38
   at Xunit.Sdk.TestMethodRunner`1.RunTestCasesAsync()
   at Xunit.Sdk.TestMethodRunner`1.RunAsync() in /_/src/xunit.execution/Sdk/Frameworks/Runners/TestMethodRunner.cs:line 106
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine) in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncMethodBuilderCore.cs:line 38
   at Xunit.Sdk.TestMethodRunner`1.RunAsync()
   at Xunit.Sdk.TestClassRunner`1.RunTestMethodsAsync() in /_/src/xunit.execution/Sdk/Frameworks/Runners/TestClassRunner.cs:line 213
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine) in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncMethodBuilderCore.cs:line 38
   at Xunit.Sdk.TestClassRunner`1.RunTestMethodsAsync()
   at Xunit.Sdk.TestClassRunner`1.RunAsync() in /_/src/xunit.execution/Sdk/Frameworks/Runners/TestClassRunner.cs:line 171
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine) in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncMethodBuilderCore.cs:line 38
   at Xunit.Sdk.TestClassRunner`1.RunAsync()
   at Xunit.Sdk.XunitTestCollectionRunner.RunTestClassAsync(ITestClass testClass, IReflectionTypeInfo class, IEnumerable`1 testCases) in /_/src/xunit.execution/Sdk/Frameworks/Runners/XunitTestCollectionRunner.cs:line 158
   at Xunit.Sdk.TestCollectionRunner`1.RunTestClassesAsync() in /_/src/xunit.execution/Sdk/Frameworks/Runners/TestCollectionRunner.cs:line 130
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine) in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncMethodBuilderCore.cs:line 38
   at Xunit.Sdk.TestCollectionRunner`1.RunTestClassesAsync()
   at Xunit.Sdk.TestCollectionRunner`1.RunAsync() in /_/src/xunit.execution/Sdk/Frameworks/Runners/TestCollectionRunner.cs:line 101
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine) in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncMethodBuilderCore.cs:line 38
   at Xunit.Sdk.TestCollectionRunner`1.RunAsync()
   at Xunit.Sdk.XunitTestAssemblyRunner.RunTestCollectionAsync(IMessageBus messageBus, ITestCollection testCollection, IEnumerable`1 testCases, CancellationTokenSource cancellationTokenSource) in /_/src/xunit.execution/Sdk/Frameworks/Runners/XunitTestAssemblyRunner.cs:line 235
   at Xunit.Sdk.XunitTestAssemblyRunner.<>c__DisplayClass14_2.<RunTestCollectionsAsync>b__2() in /_/src/xunit.execution/Sdk/Frameworks/Runners/XunitTestAssemblyRunner.cs:line 184
   at System.Threading.Tasks.Task`1.InnerInvoke() in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Future.cs:line 503
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/ExecutionContext.cs:line 183
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:line 2333
   at System.Threading.Tasks.Task.ExecuteEntry() in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:line 2246
   at System.Threading.Tasks.SynchronizationContextTaskScheduler.<>c.<.cctor>b__8_0(Object s) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/TaskScheduler.cs:line 631
   at Xunit.Sdk.MaxConcurrencySyncContext.RunOnSyncContext(SendOrPostCallback callback, Object state) in /_/src/xunit.execution/Sdk/MaxConcurrencySyncContext.cs:line 106
   at Xunit.Sdk.MaxConcurrencySyncContext.<>c__DisplayClass11_0.<WorkerThreadProc>b__0(Object _) in /_/src/xunit.execution/Sdk/MaxConcurrencySyncContext.cs:line 96
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/ExecutionContext.cs:line 183
   at Xunit.Sdk.MaxConcurrencySyncContext.WorkerThreadProc() in /_/src/xunit.execution/Sdk/MaxConcurrencySyncContext.cs:line 96
   at Xunit.Sdk.XunitWorkerThread.<>c.<QueueUserWorkItem>b__5_0(Object _) in /_/src/common/XunitWorkerThread.cs:line 37
   at System.Threading.Tasks.Task.InnerInvoke() in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:line 2393
   at System.Threading.Tasks.Task.<>c.<.cctor>b__272_0(Object obj) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:line 2375
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/ExecutionContext.cs:line 183
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:line 2333
   at System.Threading.Tasks.Task.ExecuteEntryUnsafe(Thread threadPoolThread) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:line 2271
   at System.Threading.Tasks.ThreadPoolTaskScheduler.<>c.<.cctor>b__10_0(Object s) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/ThreadPoolTaskScheduler.cs:line 35
   at System.Threading.Thread.StartCallback() in /_/src/coreclr/System.Private.CoreLib/src/System/Threading/Thread.CoreCLR.cs:line 105
./RunTests.sh: line 162: 24646 Aborted                 (core dumped) "$RUNTIME_PATH/dotnet" exec --runtimeconfig System.Runtime.Extensions.Tests.runtimeconfig.json --depsfile System.Runtime.Extensions.Tests.deps.json xunit.console.dll System.Runtime.Extensions.Tests.dll -xml testResults.xml -nologo -nocolor -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing $RSP_FILE
/datadisks/disk1/work/AA5D0994/w/A03008EC/e
----- end Tue Nov 9 03:41:09 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.
Author: krwq
Assignees: -
Labels:

area-System.Numerics, area-CodeGen-coreclr, untriaged

Milestone: -

@jkotas jkotas added blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' and removed area-System.Numerics labels Feb 6, 2022
@jkotas
Copy link
Member

jkotas commented Feb 6, 2022

@dotnet/jit-contrib @JulieLeeMSFT This intermittent bug is affecting CI stability. Could you please give it a high priority?

@jakobbotsch
Copy link
Member

This sounds suspiciously much like #58373, I will take a look.

@jakobbotsch jakobbotsch self-assigned this Feb 6, 2022
@EgorBo
Copy link
Member

EgorBo commented Feb 6, 2022

Thanks for the repro! Standalone repro:

using System;
using System.Runtime.CompilerServices;
using System.Threading;

public class Test
{
    public static void Main()
    {
        for (int i = 0; i < 100; i++)
        {
            Console.WriteLine(HalfToInt16Bits((Half)(-3.14f)));
            Thread.Sleep(16);
        }
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    public static unsafe short HalfToInt16Bits(Half value)
    {
        return *((short*)&value);
    }

}

image

jakobbotsch added a commit to jakobbotsch/runtime that referenced this issue Feb 6, 2022
This ensures we normalize returned indirs of locals, even when we fold
it into an access of a promoted local's field. This may change a signed
indir into access of an unsigned field, which may need a sign-extending
cast to be inserted.

It is not ideal that fgMorphRetInd can 'lose' this information, but
given that it is a specialized optimization it seems the simplest
solution is to just rely on the follow-up normalization.

Fix dotnet#61359
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Feb 6, 2022
@jakobbotsch jakobbotsch removed the untriaged New issue has not been triaged by the area owner label Feb 6, 2022
jakobbotsch added a commit that referenced this issue Feb 7, 2022
This ensures we normalize returned indirs of locals, even when we fold
it into an access of a promoted local's field. This may change a signed
indir into access of an unsigned field, which may need a sign-extending
cast to be inserted.

It is not ideal that fgMorphRetInd can 'lose' this information, but
given that it is a specialized optimization it seems the simplest
solution is to just rely on the follow-up normalization.

Fix #61359
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Feb 7, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Mar 9, 2022
github-actions bot pushed a commit that referenced this issue Mar 1, 2023
This ensures we normalize returned indirs of locals, even when we fold
it into an access of a promoted local's field. This may change a signed
indir into access of an unsigned field, which may need a sign-extending
cast to be inserted.

It is not ideal that fgMorphRetInd can 'lose' this information, but
given that it is a specialized optimization it seems the simplest
solution is to just rely on the follow-up normalization.

Fix #61359
carlossanlop pushed a commit that referenced this issue Mar 10, 2023
* Normalize returns after optimizing returned indirs

This ensures we normalize returned indirs of locals, even when we fold
it into an access of a promoted local's field. This may change a signed
indir into access of an unsigned field, which may need a sign-extending
cast to be inserted.

It is not ideal that fgMorphRetInd can 'lose' this information, but
given that it is a specialized optimization it seems the simplest
solution is to just rely on the follow-up normalization.

Fix #61359

* Conservative fix

* Remove spurious diff

---------

Co-authored-by: Jakob Botsch Nielsen <jakob.botsch.nielsen@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms'
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants