-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Comments
@vargaz @lambdageek it looks like we are missing some of the magic array interfaces or covariance on it? |
When did this start to happen ? Does it only happen with xunit 2.5.1 ? |
Started happening with #92881. It's definitely the xunit upgrade as the stack trace hints on that. |
edit... nevermind. I messed something up. |
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;
} |
Updated the standalone repro a little bit. running with the interp we end up with a The IL for
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? |
…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]>
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 meanwhile2 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:
=================================================================
./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.
The text was updated successfully, but these errors were encountered: