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.Tests assembly crashing with mono runtime and xunit 2.5.1 #93597

Closed
ViktorHofer opened this issue Oct 17, 2023 · 6 comments · Fixed by #93616
Closed

System.Runtime.Tests assembly crashing with mono runtime and xunit 2.5.1 #93597

ViktorHofer opened this issue Oct 17, 2023 · 6 comments · Fixed by #93616
Assignees
Milestone

Comments

@ViktorHofer
Copy link
Member

ViktorHofer commented Oct 17, 2023

Console log: https://helixre107v0xdcypoyl9e7f.blob.core.windows.net/dotnet-runtime-refs-pull-92881-merge-0de2675ec7814f35b2/System.Runtime.Tests/1/console.a0baef1a.log?helixlogtype=result

The managed strack trace shows the Reverse_SZArray test method. Disabling the test meanwhile

----- start Tue Oct 17 10:19:22 UTC 2023 =============== To repro directly: =====================================================
pushd .
/root/helix/work/correlation/dotnet exec --runtimeconfig System.Runtime.Tests.runtimeconfig.json --depsfile System.Runtime.Tests.deps.json xunit.console.dll System.Runtime.Tests.dll -xml testResults.xml -nologo -nocolor -notrait category=AdditionalTimezoneChecks -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing 
popd
===========================================================================================================
/root/helix/work/workitem/e /root/helix/work/workitem/e
  Discovering: System.Runtime.Tests (method display = ClassAndMethod, method display options = None)
  Discovered:  System.Runtime.Tests (found 9164 of 9282 test cases)
  Starting:    System.Runtime.Tests (parallel test collections = on, max threads = 2)
    System.Runtime.Tests.DependentHandleTests.DependentIsCollectedOnTargetNotReachable [SKIP]
      Condition(s) not met: "IsPreciseGcSupported"
    System.Runtime.Tests.DependentHandleTests.TargetKeepsDependentAlive [SKIP]
      Condition(s) not met: "IsPreciseGcSupported"
    System.Runtime.Tests.DependentHandleTests.DependentIsCollectedOnTargetNotReachable_EvenWithReferenceCycles [SKIP]
      Condition(s) not met: "IsPreciseGcSupported"
    System.Runtime.Tests.DependentHandleTests.DependentIsCollectedAfterTargetIsSetToNull [SKIP]
      Condition(s) not met: "IsPreciseGcSupported"
    System.Runtime.Tests.DependentHandleTests.DependentDoesNotKeepTargetAlive [SKIP]
      Condition(s) not met: "IsPreciseGcSupported"
    System.Runtime.CompilerServices.Tests.ConditionalWeakTableTests.GetOrCreateValue [SKIP]
      Condition(s) not met: "IsPreciseGcSupported"
    System.Runtime.CompilerServices.Tests.ConditionalWeakTableTests.AddRemove_DropValue [SKIP]
      Condition(s) not met: "IsPreciseGcSupported"
    System.Runtime.CompilerServices.Tests.ConditionalWeakTableTests.Add [SKIP]
      Condition(s) not met: "IsPreciseGcSupported"
    System.Runtime.CompilerServices.Tests.ConditionalWeakTableTests.GetValue [SKIP]
      Condition(s) not met: "IsPreciseGcSupported"
    System.Runtime.CompilerServices.Tests.ConditionalWeakTableTests.GetEnumerator_CollectedItemsNotEnumerated [SKIP]
      Condition(s) not met: "IsPreciseGcSupported"
    System.Tests.GCTests.KeepAlive [SKIP]
      Condition(s) not met: "IsPreciseGcSupported"
    System.Tests.GCTests.LargeObjectHeapCompactionModeRoundTrips [SKIP]
      Condition(s) not met: "IsPreciseGcSupported"
    System.Tests.GCTests.Collect_CallsFinalizer [SKIP]
      Condition(s) not met: "IsPreciseGcSupported"
    System.Tests.GCTests.ReRegisterForFinalize [SKIP]
      Condition(s) not met: "IsPreciseGcSupported"
    System.Tests.GCTests.GetTotalMemoryTest_ForceCollection [SKIP]
      Condition(s) not met: "IsPreciseGcSupported"
    System.Tests.GCTests.KeepAlive_Null [SKIP]
      Condition(s) not met: "IsPreciseGcSupported"
    System.Threading.Tests.PeriodicTimerTests.PeriodicTimer_NoActiveOperations_TimerNotRooted [SKIP]
      Condition(s) not met: "IsPreciseGcSupported"
    System.Tests.ArrayEnumeratorTests_int.ICollection_Generic_Remove_ReferenceRemovedFromCollection [SKIP]
      Condition(s) not met: "IsPreciseGcSupported"
    System.Tests.GCExtendedTests.AllocateArrayTooLarge [SKIP]
      Condition(s) not met: "IsNotIntMaxValueArrayIndexSupported"
    System.Runtime.Tests.ControlledExecutionTests.RunWithoutCancelling [SKIP]
      Condition(s) not met: "IsNotMonoRuntime"
    System.Runtime.Tests.ControlledExecutionTests.CancelInFinallyThatSleepsAndThrows [SKIP]
      Condition(s) not met: "IsNotMonoRuntime"
    System.Runtime.Tests.ControlledExecutionTests.CancelInTryAndExitCatchNormally [SKIP]
      Condition(s) not met: "IsNotMonoRuntime"
    System.Runtime.Tests.ControlledExecutionTests.CancelOutsideOfTryCatchFinally [SKIP]
      Condition(s) not met: "IsNotMonoRuntime"
    System.Runtime.Tests.ControlledExecutionTests.CancelItselfOutsideOfTryCatchFinally [SKIP]
      Condition(s) not met: "IsNotMonoRuntime"
    System.Runtime.Tests.ControlledExecutionTests.CancelItselfFromFinally [SKIP]
      Condition(s) not met: "IsNotMonoRuntime"
    System.Runtime.Tests.ControlledExecutionTests.CancelBeforeRun [SKIP]
      Condition(s) not met: "IsNotMonoRuntime"
    System.Runtime.Tests.ControlledExecutionTests.CancelInTryAndThrowFromCatch [SKIP]
      Condition(s) not met: "IsNotMonoRuntime"
    System.Runtime.Tests.ControlledExecutionTests.CancelInFinallyThatSleeps [SKIP]
      Condition(s) not met: "IsNotMonoRuntime"
    System.Runtime.Tests.ControlledExecutionTests.TestNestedRunInvocation [SKIP]
      Condition(s) not met: "IsNotMonoRuntime"
    System.Tests.ArrayEnumeratorTests_string.ICollection_Generic_Remove_ReferenceRemovedFromCollection [SKIP]
      Condition(s) not met: "IsPreciseGcSupported"
    System.Tests.WeakReferenceTests.Generic [SKIP]
      Condition(s) not met: "IsPreciseGcSupported"
    System.Tests.WeakReferenceTests.NonGeneric [SKIP]
      Condition(s) not met: "IsPreciseGcSupported"
    System.Tests.ArgIteratorTests.ArgIterator_Throws_PlatformNotSupportedException [SKIP]
      Condition(s) not met: "IsArgIteratorNotSupported"
    System.Tests.ArraySegment_Tests_string.ICollection_Generic_Remove_ReferenceRemovedFromCollection [SKIP]
      Condition(s) not met: "IsPreciseGcSupported"
    System.Tests.TimeZoneInfoTests.UnsupportedImplicitConversionTest [SKIP]
      Condition(s) not met: "DoesNotSupportIanaNamesConversion"
    System.Tests.DateTimeOffsetTests.ToLocalTime_MaxValue [SKIP]
      Condition(s) not met: "IsMaxValuePositiveLocalOffset"
    System.Tests.DateTimeOffsetTests.ToLocalTime_MinValue [SKIP]
      Condition(s) not met: "IsMinValueNegativeLocalOffset"
    System.Tests.DateTimeOffsetTests.ToLocalTime_Ambiguous [SKIP]
      Condition(s) not met: "IsPacificTime"
    System.Tests.StringTests.IndexOf_SingleLetter(s: "Hello", target: '\0', startIndex: 0, count: 5, expected: -1) [SKIP]
      Target \0 is not supported in ICU
    System.Tests.StringTests.LastIndexOf_NullInStrings [SKIP]
      Condition(s) not met: "IsNlsGlobalization"
    System.Tests.StringTests.IndexOf_NullInStrings [SKIP]
      Condition(s) not met: "IsNlsGlobalization"
    System.Tests.StringTests.EndsWith_NullInStrings_NonOrdinal [SKIP]
      Condition(s) not met: "IsNlsGlobalization"
    System.Tests.StringTests.StartsWith_NullInStrings_NonOrdinal [SKIP]
      Condition(s) not met: "IsNlsGlobalization"
    System.Tests.StringTests.EndsWith_NullInStrings [SKIP]
      Condition(s) not met: "IsNlsGlobalization"
    System.Tests.StringTests.StartsWith_NullInStrings [SKIP]
      Condition(s) not met: "IsNlsGlobalization"
    System.Tests.ArraySegment_Tests_int.ICollection_Generic_Remove_ReferenceRemovedFromCollection [SKIP]
      Condition(s) not met: "IsPreciseGcSupported"
    System.Runtime.Tests.JitInfoTests.JitInfoIsNotPopulated [SKIP]
      Condition(s) not met: "IsMonoAOT"
System.String[*] doesn't implement interface System.Collections.Generic.IEnumerable

=================================================================
Native Crash Reporting

Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.

=================================================================
Native stacktrace:

0x7f1e2a5f1f71 - Unknown
0x7f1e2a5992de - Unknown
0x7f1e2a5f1811 - Unknown
0x7f1e2b8cdcf0 - Unknown
0x7f1e2aa11acf - Unknown
0x7f1e2a9e4ea5 - Unknown
0x7f1e2a68ee75 - Unknown
0x7f1e2a69f466 - Unknown
0x7f1e2a68f236 - Unknown
0x7f1e2a68f36e - Unknown
0x7f1e2a59ad15 - Unknown
0x7f1e2a59b38c - Unknown
0x7f1e2a59c361 - Unknown
0x40054296 - Unknown

=================================================================
External Debugger Dump:

[New LWP 25]
[New LWP 26]
[New LWP 27]
[New LWP 28]
[New LWP 31]
[New LWP 32]
[New LWP 33]
[New LWP 34]
[New LWP 35]
[New LWP 36]
[New LWP 45]
[New LWP 46]
Missing separate debuginfo for /root/helix/work/correlation/dotnet
Try: yum --enablerepo='debug' install /usr/lib/debug/.build-id/b1/c2d609aee37e50fac83dc62b1f274bff802c61.debug
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Missing separate debuginfo for /root/helix/work/correlation/host/fxr/9.0.0/libhostfxr.so
Try: yum --enablerepo='debug' install /usr/lib/debug/.build-id/73/ce349f1a94b5fac333231edd9eb69ab2d86307.debug
Missing separate debuginfo for /root/helix/work/correlation/shared/Microsoft.NETCore.App/9.0.0/libhostpolicy.so
Try: yum --enablerepo='debug' install /usr/lib/debug/.build-id/82/92b5cbf5d0735193a2a5b4bfda029bd8d3691f.debug
Dwarf Error: Cannot handle DW_FORM_strx1 in DWARF reader [in module /root/helix/work/correlation/shared/Microsoft.NETCore.App/9.0.0/libcoreclr.so.dbg]
Dwarf Error: Cannot handle DW_FORM_strx1 in DWARF reader [in module /root/helix/work/correlation/shared/Microsoft.NETCore.App/9.0.0/libSystem.Native.so.dbg]
0x00007f1e2b8c945c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
Id Target Id Frame

  • 1 Thread 0x7f1e2bcff740 (LWP 24) "dotnet" 0x00007f1e2b8c945c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
    2 Thread 0x7f1e29bff700 (LWP 25) "SGen worker" 0x00007f1e2b8c945c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
    3 Thread 0x7f1e27dff700 (LWP 26) ".NET EventPipe" 0x00007f1e2aae7301 in poll () from /lib64/libc.so.6
    4 Thread 0x7f1e27bfe700 (LWP 27) "Finalizer" 0x00007f1e2b8cbda6 in do_futex_wait.constprop () from /lib64/libpthread.so.0
    5 Thread 0x7f1e242ed700 (LWP 28) ".NET SigHandler" 0x00007f1e2b8ccab4 in read () from /lib64/libpthread.so.0
    6 Thread 0x7f1e24253700 (LWP 31) ".NET Long Runni" 0x00007f1e2b8c945c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
    7 Thread 0x7f1e1f9ff700 (LWP 32) ".NET TP Worker" 0x00007f1e2b8c9848 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
    8 Thread 0x7f1e1ee47700 (LWP 33) ".NET TP Gate" 0x00007f1e2b8c9848 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
    9 Thread 0x7f1e1ee06700 (LWP 34) ".NET TP Worker" 0x00007f1e2b8c9848 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
    10 Thread 0x7f1e1ec05700 (LWP 35) ".NET Long Runni" 0x00007f1e2b8c945c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
    11 Thread 0x7f1e1ea04700 (LWP 36) ".NET Long Runni" 0x00007f1e2b8cd672 in waitpid () from /lib64/libpthread.so.0
    12 Thread 0x7f1e1ce70700 (LWP 45) ".NET Timer" 0x00007f1e2b8c9848 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
    13 Thread 0x7f1d8854e700 (LWP 46) ".NET TP Worker" 0x00007f1e2b8c9848 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0

Thread 13 (Thread 0x7f1d8854e700 (LWP 46)):
#0 0x00007f1e2b8c9848 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1 0x00007f1e2a6a1753 in mono_os_cond_timedwait () from /root/helix/work/correlation/shared/Microsoft.NETCore.App/9.0.0/libcoreclr.so
#2 0x00007f1e2a6a5e09 in mono_lifo_semaphore_timed_wait () from /root/helix/work/correlation/shared/Microsoft.NETCore.App/9.0.0/libcoreclr.so
#3 0x0000000040a7e827 in ?? ()
#4 0x0000000000000002 in ?? ()
#5 0x0000000000000046 in ?? ()
#6 0x000000000027628c in ?? ()
#7 0x00007f1e29e09ee0 in ?? ()
#8 0x0000000000004e20 in ?? ()
#9 0x00007f1d6c0024e0 in ?? ()
#10 0x000000000027628c in ?? ()
#11 0x00007f1d8854d8d0 in ?? ()
#12 0x0000000000004e20 in ?? ()
#13 0x0000000040a7e63c in ?? ()
#14 0x00007f1e29e09ee0 in ?? ()
#15 0x0000000000004e20 in ?? ()
#16 0x0000000000000002 in ?? ()
#17 0x0000000040a7e2e8 in ?? ()
#18 0x0000000000000002 in ?? ()
#19 0x0000000000000046 in ?? ()
#20 0x0000000000000046 in ?? ()
#21 0x00007f1e29e09ee0 in ?? ()
#22 0x0000000000004e20 in ?? ()
#23 0x0000000000000000 in ?? ()

Thread 12 (Thread 0x7f1e1ce70700 (LWP 45)):
#0 0x00007f1e2b8c9848 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1 0x00007f1e2bb71a97 in SystemNative_LowLevelMonitor_TimedWait () from /root/helix/work/correlation/shared/Microsoft.NETCore.App/9.0.0//libSystem.Native.so
#2 0x0000000040a7dd27 in ?? ()
#3 0x0000000000000000 in ?? ()

Thread 11 (Thread 0x7f1e1ea04700 (LWP 36)):
#0 0x00007f1e2b8cd672 in waitpid () from /lib64/libpthread.so.0
#1 0x00007f1e2a5f20a2 in mono_dump_native_crash_info () from /root/helix/work/correlation/shared/Microsoft.NETCore.App/9.0.0/libcoreclr.so
#2 0x00007f1e2a5992de in mono_handle_native_crash () from /root/helix/work/correlation/shared/Microsoft.NETCore.App/9.0.0/libcoreclr.so
#3 0x00007f1e2a5f1811 in sigabrt_signal_handler () from /root/helix/work/correlation/shared/Microsoft.NETCore.App/9.0.0/libcoreclr.so
#4
#5 0x00007f1e2aa11acf in raise () from /lib64/libc.so.6
#6 0x00007f1e2a9e4ea5 in abort () from /lib64/libc.so.6
#7 0x00007f1e2a68ee75 in monoeg_assert_abort () from /root/helix/work/correlation/shared/Microsoft.NETCore.App/9.0.0/libcoreclr.so
#8 0x00007f1e2a69f466 in mono_log_write_logfile () from /root/helix/work/correlation/shared/Microsoft.NETCore.App/9.0.0/libcoreclr.so
#9 0x00007f1e2a68f236 in monoeg_g_logv () from /root/helix/work/correlation/shared/Microsoft.NETCore.App/9.0.0/libcoreclr.so
#10 0x00007f1e2a68f36e in monoeg_g_log () from /root/helix/work/correlation/shared/Microsoft.NETCore.App/9.0.0/libcoreclr.so
#11 0x00007f1e2a59ad15 in mini_resolve_imt_method () from /root/helix/work/correlation/shared/Microsoft.NETCore.App/9.0.0/libcoreclr.so
#12 0x00007f1e2a59b38c in common_call_trampoline () from /root/helix/work/correlation/shared/Microsoft.NETCore.App/9.0.0/libcoreclr.so
#13 0x00007f1e2a59c361 in mono_vcall_trampoline () from /root/helix/work/correlation/shared/Microsoft.NETCore.App/9.0.0/libcoreclr.so
#14 0x0000000040054296 in ?? ()
#15 0x00007f1d74002775 in ?? ()
#16 0x0000559cad84b0b0 in ?? ()
#17 0x00007f1e1ea00470 in ?? ()
#18 0x00007f1e1ea002a8 in ?? ()
#19 0x00007f1d74001ef0 in ?? ()
#20 0x00007f1d76b41ac0 in ?? ()
#21 0x0000000000000009 in ?? ()
#22 0x0000000000000000 in ?? ()

Thread 10 (Thread 0x7f1e1ec05700 (LWP 35)):
#0 0x00007f1e2b8c945c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1 0x00007f1e2bb71937 in SystemNative_LowLevelMonitor_Wait () from /root/helix/work/correlation/shared/Microsoft.NETCore.App/9.0.0//libSystem.Native.so
#2 0x0000000040a1683c in ?? ()
#3 0x00007f1e1ee5fa60 in ?? ()
#4 0xffffffffffffffff in ?? ()
#5 0x0000000000000000 in ?? ()

Thread 9 (Thread 0x7f1e1ee06700 (LWP 34)):
#0 0x00007f1e2b8c9848 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1 0x00007f1e2a6a1753 in mono_os_cond_timedwait () from /root/helix/work/correlation/shared/Microsoft.NETCore.App/9.0.0/libcoreclr.so
#2 0x00007f1e2a6a5e09 in mono_lifo_semaphore_timed_wait () from /root/helix/work/correlation/shared/Microsoft.NETCore.App/9.0.0/libcoreclr.so
#3 0x0000000040a7e827 in ?? ()
#4 0x0000000000000002 in ?? ()
#5 0x0000000000000046 in ?? ()
#6 0x000000000027628c in ?? ()
#7 0x00007f1e29e09ee0 in ?? ()
#8 0x0000000000004e20 in ?? ()
#9 0x00007f1d7c0024e0 in ?? ()
#10 0x000000000027628c in ?? ()
#11 0x00007f1e1ee058d0 in ?? ()
#12 0x0000000000004e20 in ?? ()
#13 0x0000000040a7e63c in ?? ()
#14 0x00007f1e29e09ee0 in ?? ()
#15 0x0000000000004e20 in ?? ()
#16 0x0000000000000002 in ?? ()
#17 0x0000000040a7e2e8 in ?? ()
#18 0x0000000000000002 in ?? ()
#19 0x0000000000000046 in ?? ()
#20 0x0000000000000046 in ?? ()
#21 0x00007f1e29e09ee0 in ?? ()
#22 0x0000000000004e20 in ?? ()
#23 0x0000000000000000 in ?? ()

Thread 8 (Thread 0x7f1e1ee47700 (LWP 33)):
#0 0x00007f1e2b8c9848 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1 0x00007f1e2bb71a97 in SystemNative_LowLevelMonitor_TimedWait () from /root/helix/work/correlation/shared/Microsoft.NETCore.App/9.0.0//libSystem.Native.so
#2 0x0000000040a7dd27 in ?? ()
#3 0x0000000000000000 in ?? ()

Thread 7 (Thread 0x7f1e1f9ff700 (LWP 32)):
#0 0x00007f1e2b8c9848 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1 0x00007f1e2bb71a97 in SystemNative_LowLevelMonitor_TimedWait () from /root/helix/work/correlation/shared/Microsoft.NETCore.App/9.0.0//libSystem.Native.so
#2 0x0000000040a7dd27 in ?? ()
#3 0x0000000000000000 in ?? ()

Thread 6 (Thread 0x7f1e24253700 (LWP 31)):
#0 0x00007f1e2b8c945c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1 0x00007f1e2bb71937 in SystemNative_LowLevelMonitor_Wait () from /root/helix/work/correlation/shared/Microsoft.NETCore.App/9.0.0//libSystem.Native.so
#2 0x0000000040a1683c in ?? ()
#3 0x00007f1e1df01bc0 in ?? ()
#4 0xffffffffffffffff in ?? ()
#5 0x00007f1e1f7bfb30 in ?? ()
#6 0x0000000000000001 in ?? ()
#7 0x00007f1e242527b0 in ?? ()
#8 0xffffffffffffffff in ?? ()
#9 0x00007f1e1f7bfb30 in ?? ()
#10 0x00007f1e0c029710 in ?? ()
#11 0x00007f1e24252730 in ?? ()
#12 0x00007f1e24252640 in ?? ()
#13 0x00007f1e0c029080 in ?? ()
#14 0x0000000040a1667c in ?? ()
#15 0x00007f1e1df01bf0 in ?? ()
#16 0x0000000040a1663c in ?? ()
#17 0x00007f1e1df01bf0 in ?? ()
#18 0x0000000040a15ce8 in ?? ()
#19 0x00007f1e242527b0 in ?? ()
#20 0x0000000000000000 in ?? ()

Thread 5 (Thread 0x7f1e242ed700 (LWP 28)):
#0 0x00007f1e2b8ccab4 in read () from /lib64/libpthread.so.0
#1 0x00007f1e2bb71086 in SignalHandlerLoop () from /root/helix/work/correlation/shared/Microsoft.NETCore.App/9.0.0//libSystem.Native.so
#2 0x00007f1e2b8c31ca in start_thread () from /lib64/libpthread.so.0
#3 0x00007f1e2a9fce73 in clone () from /lib64/libc.so.6

Thread 4 (Thread 0x7f1e27bfe700 (LWP 27)):
#0 0x00007f1e2b8cbda6 in do_futex_wait.constprop () from /lib64/libpthread.so.0
#1 0x00007f1e2b8cbe98 in __new_sem_wait_slow.constprop.0 () from /lib64/libpthread.so.0
#2 0x00007f1e2a75e6d8 in finalizer_thread () from /root/helix/work/correlation/shared/Microsoft.NETCore.App/9.0.0/libcoreclr.so
#3 0x00007f1e2a737359 in start_wrapper () from /root/helix/work/correlation/shared/Microsoft.NETCore.App/9.0.0/libcoreclr.so
#4 0x00007f1e2b8c31ca in start_thread () from /lib64/libpthread.so.0
#5 0x00007f1e2a9fce73 in clone () from /lib64/libc.so.6

Thread 3 (Thread 0x7f1e27dff700 (LWP 26)):
#0 0x00007f1e2aae7301 in poll () from /lib64/libc.so.6
#1 0x00007f1e2a68423e in ds_ipc_poll () from /root/helix/work/correlation/shared/Microsoft.NETCore.App/9.0.0/libcoreclr.so
#2 0x00007f1e2a681158 in ds_ipc_stream_factory_get_next_available_stream () from /root/helix/work/correlation/shared/Microsoft.NETCore.App/9.0.0/libcoreclr.so
#3 0x00007f1e2a67f7bf in server_thread () from /root/helix/work/correlation/shared/Microsoft.NETCore.App/9.0.0/libcoreclr.so
#4 0x00007f1e2a6836b1 in ep_rt_thread_mono_start_func () from /root/helix/work/correlation/shared/Microsoft.NETCore.App/9.0.0/libcoreclr.so
#5 0x00007f1e2b8c31ca in start_thread () from /lib64/libpthread.so.0
#6 0x00007f1e2a9fce73 in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7f1e29bff700 (LWP 25)):
#0 0x00007f1e2b8c945c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1 0x00007f1e2a7c6013 in thread_func () from /root/helix/work/correlation/shared/Microsoft.NETCore.App/9.0.0/libcoreclr.so
#2 0x00007f1e2b8c31ca in start_thread () from /lib64/libpthread.so.0
#3 0x00007f1e2a9fce73 in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f1e2bcff740 (LWP 24)):
#0 0x00007f1e2b8c945c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1 0x00007f1e2bb71937 in SystemNative_LowLevelMonitor_Wait () from /root/helix/work/correlation/shared/Microsoft.NETCore.App/9.0.0//libSystem.Native.so
#2 0x0000000040a1683c in ?? ()
#3 0x00007f1e1ff36430 in ?? ()
#4 0xffffffffffffffff in ?? ()
#5 0x00007f1e29d800a8 in ?? ()
#6 0x0000000000000001 in ?? ()
#7 0x00007fff346b6180 in ?? ()
#8 0xffffffffffffffff in ?? ()
#9 0x00007f1e29d800a8 in ?? ()
#10 0x0000559cad8d85b0 in ?? ()
#11 0x00007fff346b6100 in ?? ()
#12 0x00007fff346b6010 in ?? ()
#13 0x0000559cad837660 in ?? ()
#14 0x0000000040a1667c in ?? ()
#15 0x00007f1e1ff36460 in ?? ()
#16 0x0000000040a1663c in ?? ()
#17 0x00007f1e1ff36460 in ?? ()
#18 0x0000000040a15ce8 in ?? ()
#19 0x00007fff346b6180 in ?? ()
#20 0x0000000000000000 in ?? ()
[Inferior 1 (process 24) detached]

=================================================================
Basic Fault Address Reporting

Memory around native instruction pointer (0x7f1e2aa11acf):0x7f1e2aa11abf d2 4c 89 ce bf 02 00 00 00 b8 0e 00 00 00 0f 05 .L..............
0x7f1e2aa11acf 48 8b 8c 24 08 01 00 00 64 48 33 0c 25 28 00 00 H..$....dH3.%(..
0x7f1e2aa11adf 00 44 89 c0 75 19 48 81 c4 10 01 00 00 5b c3 66 .D..u.H......[.f
0x7f1e2aa11aef 90 48 8b 15 71 03 37 00 f7 d8 64 89 02 eb ba e8 .H..q.7...d.....

=================================================================
Managed Stacktrace:

  at <unknown> <0xffffffff>
  at Xunit.Sdk.CollectionTracker`1:GetEnumerator <0x00060>
  at Xunit.Sdk.CollectionTracker`1:GetSafeEnumerator <0x0002b>
  at Xunit.Sdk.CollectionTracker:CheckIfArraysAreEqual <0x003cb>
  at Xunit.Sdk.CollectionTracker:AreCollectionsEqual <0x000d7>
  at Xunit.Assert:Equal <0x0053f>
  at Xunit.Assert:Equal <0x00077>
  at System.Tests.ArrayTests:Reverse <0x000e3>
  at System.Tests.ArrayTests:Reverse_SZArray <0x000ab>
  at System.Object:InvokeStub_ArrayTests.Reverse_SZArray <0x000d2>
  at <Module>:invoke_object_object_Span`1<object> <0x000c1>
  at System.Reflection.MethodBaseInvoker:InvokeWithFewArgs <0x00597>
  at System.Reflection.RuntimeMethodInfo:Invoke <0x0031f>
  at System.Reflection.MethodBase:Invoke <0x00049>
  at Xunit.Sdk.TestInvoker`1:CallTestMethod <0x00043>
  at <<InvokeTestMethodAsync>b__1>d:MoveNext <0x0050f>
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore:Start <0x000b7>
  at System.Runtime.CompilerServices.AsyncTaskMethodBuilder:Start <0x0002b>
  at <>c__DisplayClass48_0:<InvokeTestMethodAsync>b__1 <0x000c7>
  at <AggregateAsync>d__4:MoveNext <0x000ea>
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore:Start <0x000bb>
  at Xunit.Sdk.ExecutionTimer:AggregateAsync <0x000bf>
  at <>c__DisplayClass48_0:<InvokeTestMethodAsync>b__0 <0x00137>
  at <RunAsync>d__9:MoveNext <0x0009c>
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore:Start <0x000af>
  at Xunit.Sdk.ExceptionAggregator:RunAsync <0x000bb>
  at <InvokeTestMethodAsync>d__48:MoveNext <0x00293>
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore:Start <0x000c3>
  at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start <0x0002b>
  at Xunit.Sdk.TestInvoker`1:InvokeTestMethodAsync <0x000ef>
  at Xunit.Sdk.XunitTestInvoker:InvokeTestMethodAsync <0x000f3>
  at <<RunAsync>b__47_0>d:MoveNext <0x00786>
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore:Start <0x000cb>
  at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start <0x0002b>
  at Xunit.Sdk.TestInvoker`1:<RunAsync>b__47_0 <0x000cf>
  at <RunAsync>d__10`1:MoveNext <0x0009c>
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore:Start <0x000af>
  at Xunit.Sdk.ExceptionAggregator:RunAsync <0x000bb>
  at Xunit.Sdk.TestInvoker`1:RunAsync <0x000d3>
  at Xunit.Sdk.XunitTestRunner:InvokeTestMethodAsync <0x000db>
  at <InvokeTestAsync>d__4:MoveNext <0x001f1>
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore:Start <0x000c3>
  at Xunit.Sdk.XunitTestRunner:InvokeTestAsync <0x000c7>
  at <>c__DisplayClass43_0:<RunAsync>b__0 <0x00038>
  at <RunAsync>d__10`1:MoveNext <0x000c3>
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore:Start <0x000b7>
  at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start <0x0002b>
  at Xunit.Sdk.ExceptionAggregator:RunAsync <0x000f3>
  at <RunAsync>d__43:MoveNext <0x004ff>
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore:Start <0x000cb>
  at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start <0x0002b>
  at Xunit.Sdk.TestRunner`1:RunAsync <0x000cf>
  at <RunTestAsync>d__11:MoveNext <0x00223>
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore:Start <0x000d3>
  at Xunit.Sdk.XunitTheoryTestCaseRunner:RunTestAsync <0x0008b>
  at <RunAsync>d__19:MoveNext <0x00403>
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore:Start <0x000c3>
  at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start <0x0002b>
  at Xunit.Sdk.TestCaseRunner`1:RunAsync <0x000cb>
  at Xunit.Sdk.XunitTheoryTestCase:RunAsync <0x000af>
  at Xunit.Sdk.XunitTestMethodRunner:RunTestCaseAsync <0x000a5>
  at <RunTestCasesAsync>d__32:MoveNext <0x001bb>
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore:Start <0x000cb>
  at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start <0x0002b>
  at Xunit.Sdk.TestMethodRunner`1:RunTestCasesAsync <0x000cf>
  at <RunAsync>d__31:MoveNext <0x001d9>
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore:Start <0x000b7>
  at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start <0x0002b>
  at Xunit.Sdk.TestMethodRunner`1:RunAsync <0x000c7>
  at Xunit.Sdk.XunitTestClassRunner:RunTestMethodAsync <0x000eb>
  at <RunTestMethodsAsync>d__38:MoveNext <0x00891>
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore:Start <0x000d3>
  at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start <0x0002b>
  at Xunit.Sdk.TestClassRunner`1:RunTestMethodsAsync <0x000d7>
  at <RunAsync>d__37:MoveNext <0x00432>
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore:Start <0x000c3>
  at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start <0x0002b>
  at Xunit.Sdk.TestClassRunner`1:RunAsync <0x000cb>
  at Xunit.Sdk.XunitTestCollectionRunner:RunTestClassAsync <0x000f7>
  at <RunTestClassesAsync>d__28:MoveNext <0x00394>
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore:Start <0x000cb>
  at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start <0x0002b>
  at Xunit.Sdk.TestCollectionRunner`1:RunTestClassesAsync <0x000cf>
  at <RunAsync>d__27:MoveNext <0x0042f>
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore:Start <0x000c3>
  at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start <0x0002b>
  at Xunit.Sdk.TestCollectionRunner`1:RunAsync <0x000cb>
  at Xunit.Sdk.XunitTestAssemblyRunner:RunTestCollectionAsync <0x000c7>
  at <>c__DisplayClass14_2:<RunTestCollectionsAsync>b__2 <0x00060>
  at System.Threading.Tasks.Task`1:InnerInvoke <0x00078>
  at <>c:<.cctor>b__281_0 <0x0002f>
  at System.Threading.ExecutionContext:RunInternal <0x000e2>
  at System.Threading.Tasks.Task:ExecuteWithThreadLocal <0x002b3>
  at System.Threading.Tasks.Task:ExecuteEntry <0x000d7>
  at <>c:<.cctor>b__8_0 <0x00057>
  at Xunit.Sdk.MaxConcurrencySyncContext:RunOnSyncContext <0x0004f>
  at <>c__DisplayClass11_0:<WorkerThreadProc>b__0 <0x0004b>
  at System.Threading.ExecutionContext:RunInternal <0x000e2>
  at System.Threading.ExecutionContext:Run <0x0004b>
  at System.Object:lambda_method2 <0x0008a>
  at Xunit.Sdk.ExecutionContextHelper:Run <0x0005e>
  at Xunit.Sdk.MaxConcurrencySyncContext:WorkerThreadProc <0x001eb>
  at <>c:<QueueUserWorkItem>b__5_0 <0x0006b>
  at System.Threading.Tasks.Task:InnerInvoke <0x000a2>
  at <>c:<.cctor>b__281_0 <0x0002f>
  at System.Threading.ExecutionContext:RunInternal <0x000e2>
  at System.Threading.Tasks.Task:ExecuteWithThreadLocal <0x002b3>
  at System.Threading.Tasks.Task:ExecuteEntryUnsafe <0x000a3>
  at <>c:<.cctor>b__10_0 <0x0005b>
  at System.Threading.Thread:StartCallback <0x0012e>
  at System.Object:runtime_invoke_void__this__ <0x00091>

=================================================================
./RunTests.sh: line 204: 24 Aborted (core dumped) "$RUNTIME_PATH/dotnet" exec --runtimeconfig System.Runtime.Tests.runtimeconfig.json --depsfile System.Runtime.Tests.deps.json xunit.console.dll System.Runtime.Tests.dll -xml testResults.xml -nologo -nocolor -notrait category=AdditionalTimezoneChecks -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing $RSP_FILE
/root/helix/work/workitem/e
----- end Tue Oct 17 10:20:13 UTC 2023 ----- 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.

@ViktorHofer ViktorHofer added the runtime-mono specific to the Mono runtime label Oct 17, 2023
@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Oct 17, 2023
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Oct 17, 2023
@marek-safar marek-safar added this to the 9.0.0 milestone Oct 17, 2023
@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Oct 17, 2023
@marek-safar marek-safar removed runtime-mono specific to the Mono runtime needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Oct 17, 2023
@marek-safar
Copy link
Contributor

@vargaz @lambdageek it looks like we are missing some of the magic array interfaces or covariance on it?

@vargaz
Copy link
Contributor

vargaz commented Oct 17, 2023

When did this start to happen ? Does it only happen with xunit 2.5.1 ?

@ViktorHofer
Copy link
Member Author

ViktorHofer commented Oct 17, 2023

Started happening with #92881. It's definitely the xunit upgrade as the stack trace hints on that.

@lambdageek
Copy link
Member

lambdageek commented Oct 17, 2023

edit... nevermind. I messed something up.

@lambdageek
Copy link
Member

lambdageek commented Oct 17, 2023

Ok, for real here's a repro (tried with .NET 8 RC2)

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net8.0</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
  </PropertyGroup>

  <PropertyGroup Condition="true">
      <UseMonoRuntime>true</UseMonoRuntime>
      <SelfContained>true</SelfContained>
  </PropertyGroup>

</Project>
using System.Collections.Generic;
using System.Runtime.CompilerServices;

var expected = new int[] {5,4,3,2,1};

const int LowerBound = 5;

var expectedNzlba = NonZeroLowerBoundArray(expected, LowerBound);

Helper(expectedNzlba);

[MethodImpl(MethodImplOptions.NoInlining)]
void Helper(Array a) {
        IEnumerable<int> ie = null;
        try {
                ie = (IEnumerable<int>)a;
        } catch (InvalidCastException) {
                Console.WriteLine ("caught ICE, good");
                return;
        }
        ie.GetEnumerator(); // mono crashes here
}

Array NonZeroLowerBoundArray(Array szArrayContents, int lowerBound)
{
        Array array = Array.CreateInstance(szArrayContents.GetType().GetElementType(), new int[] { szArrayContents.Length }, new int[] { lowerBound });
        for (int i = 0; i < szArrayContents.Length; i++)
        {
                array.SetValue(szArrayContents.GetValue(i), i + lowerBound);
        }
        return array;
}

@lambdageek lambdageek modified the milestones: 9.0.0, 8.0.0 Oct 17, 2023
@lambdageek
Copy link
Member

Updated the standalone repro a little bit.

running with the interp we end up with a BadImageFormateException: Method has no body at the call to GetEnumerator.

The IL for ie = (IEnumerable<int>)a is

            IL_0002: ldarg.1
            IL_0003: castclass class [System.Runtime]System.Collections.Generic.IEnumerable`1<int32>
            IL_0008: stloc.0

and it looks like that should throw an ICE, but doesn't on mono. i guess we don't check the bound for some reason?

@lambdageek lambdageek self-assigned this Oct 17, 2023
lambdageek added a commit to lambdageek/runtime that referenced this issue Oct 17, 2023
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Oct 17, 2023
lambdageek added a commit to lambdageek/runtime that referenced this issue Oct 18, 2023
lambdageek added a commit that referenced this issue Oct 18, 2023
…93616)

* [mono] Disallow casts of bounded arrays to array special interfaces

   Fixes #93597

* re-enable disabled tests

* exclude lower bound regression test on NativeAOT
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Oct 18, 2023
carlossanlop pushed a commit that referenced this issue Oct 18, 2023
…l interfaces (#93617)

* [mono] Disallow casts of bounded arrays to array special interfaces

Fixes #93597

* exclude lower bound regression test on NativeAOT

* try to fix nativaot exclude

---------

Co-authored-by: Aleksey Kliger <[email protected]>
@ghost ghost locked as resolved and limited conversation to collaborators Nov 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants