Skip to content

Mono is crashing on the newly added tests for generic Attributes #66168

@buyaa-n

Description

@buyaa-n

Mono is crashing on the newly added tests even though they were disabled on Mono:

#13 0x0000007f8d2cfbdc in mono_assertion_message_unreachable (file=0x64 <error: Cannot access memory at address 0x64>, line=6) at /__w/1/s/src/mono/mono/eglib/goutput.c:234
#14 0x0000007f8d115120 in custom_attr_class_name_from_method_token (image=0x5589355e20, method_token=167772165, nspace=0x7fc25c2d58, class_name=0x7fc25c2d50, assembly_token=<optimized out>) at /__w/1/s/src/mono/mono/metadata/custom-attrs.c:2441

To unblock the PR the failing tests are commented out

Assert(!CustomAttributeExtensions.GetCustomAttributes(assembly, typeof(SingleAttribute<>)).GetEnumerator().MoveNext());
Assert(!CustomAttributeExtensions.GetCustomAttributes(assembly, typeof(SingleAttribute<>)).GetEnumerator().MoveNext());
*/
// Module module = programTypeInfo.Module;
// AssertAny(CustomAttributeExtensions.GetCustomAttributes(module), a => a is SingleAttribute<long>);
// Assert(CustomAttributeExtensions.GetCustomAttributes(module, typeof(SingleAttribute<long>)).GetEnumerator().MoveNext());
// Assert(CustomAttributeExtensions.GetCustomAttributes(module, typeof(SingleAttribute<long>)).GetEnumerator().MoveNext());
// Assert(!CustomAttributeExtensions.GetCustomAttributes(module, typeof(SingleAttribute<>)).GetEnumerator().MoveNext());
// Assert(!CustomAttributeExtensions.GetCustomAttributes(module, typeof(SingleAttribute<>)).GetEnumerator().MoveNext());

Originally posted by @jkotas in #65237 (comment)

More logs
Console log: 'System.Runtime.Tests' from job 899b0f8c-0334-4813-ac69-22e8063fd542 workitem 9fb6efd4-0b69-4b14-9ffe-1fa056130f4f (osx.1200.amd64.open) executed on machine dci-mac-build-384.local
+ ./RunTests.sh --runtime-path /tmp/helix/working/A19808BE/p
----- start Wed Feb 16 06:24:48 PST 2022 =============== To repro directly: =====================================================
pushd .
/tmp/helix/working/A19808BE/p/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=IgnoreForCI -notrait category=OuterLoop -notrait category=failing 
popd
===========================================================================================================
/private/tmp/helix/working/A19808BE/w/BAC009DC/e /private/tmp/helix/working/A19808BE/w/BAC009DC/e
* Assertion: should not be reached at /Users/runner/work/1/s/src/mono/mono/metadata/custom-attrs.c:2441

=================================================================
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:

0x10ed5f254 - /private/tmp/helix/working/A19808BE/p/shared/Microsoft.NETCore.App/7.0.0/libcoreclr.dylib : mono_dump_native_crash_info
0x10ed0077e - /private/tmp/helix/working/A19808BE/p/shared/Microsoft.NETCore.App/7.0.0/libcoreclr.dylib : mono_handle_native_crash
0x10ee02968 - /private/tmp/helix/working/A19808BE/p/shared/Microsoft.NETCore.App/7.0.0/libcoreclr.dylib : sigabrt_signal_handler.cold.1
0x10ed5eb88 - /private/tmp/helix/working/A19808BE/p/shared/Microsoft.NETCore.App/7.0.0/libcoreclr.dylib : sigabrt_signal_handler
0x7ff80c7fde2d - /usr/lib/system/libsystem_platform.dylib : _sigtramp
0x1 - Unknown
0x7ff80c734d10 - /usr/lib/system/libsystem_c.dylib : abort
0x10edaa788 - /private/tmp/helix/working/A19808BE/p/shared/Microsoft.NETCore.App/7.0.0/libcoreclr.dylib : monoeg_assert_abort
0x10ebe46ea - /private/tmp/helix/working/A19808BE/p/shared/Microsoft.NETCore.App/7.0.0/libcoreclr.dylib : mono_log_write_logfile
0x10edaacf2 - /private/tmp/helix/working/A19808BE/p/shared/Microsoft.NETCore.App/7.0.0/libcoreclr.dylib : monoeg_g_logv_nofree
0x10edaae6f - /private/tmp/helix/working/A19808BE/p/shared/Microsoft.NETCore.App/7.0.0/libcoreclr.dylib : monoeg_assertion_message
0x10edaaec7 - /private/tmp/helix/working/A19808BE/p/shared/Microsoft.NETCore.App/7.0.0/libcoreclr.dylib : mono_assertion_message_unreachable
0x10ebb20a0 - /private/tmp/helix/working/A19808BE/p/shared/Microsoft.NETCore.App/7.0.0/libcoreclr.dylib : mono_class_metadata_foreach_custom_attr
0x10eb11355 - /private/tmp/helix/working/A19808BE/p/shared/Microsoft.NETCore.App/7.0.0/libcoreclr.dylib : mono_assembly_request_load_from
0x10eb10f8f - /private/tmp/helix/working/A19808BE/p/shared/Microsoft.NETCore.App/7.0.0/libcoreclr.dylib : mono_assembly_request_open
0x10ed3a7b9 - /private/tmp/helix/working/A19808BE/p/shared/Microsoft.NETCore.App/7.0.0/libcoreclr.dylib : mono_core_preload_hook
0x10eb13776 - /private/tmp/helix/working/A19808BE/p/shared/Microsoft.NETCore.App/7.0.0/libcoreclr.dylib : invoke_assembly_preload_hook
0x10eb10207 - /private/tmp/helix/working/A19808BE/p/shared/Microsoft.NETCore.App/7.0.0/libcoreclr.dylib : mono_assembly_request_byname
0x10eb0d345 - /private/tmp/helix/working/A19808BE/p/shared/Microsoft.NETCore.App/7.0.0/libcoreclr.dylib : ves_icall_System_Reflection_Assembly_InternalLoad
0x10eb43f55 - /private/tmp/helix/working/A19808BE/p/shared/Microsoft.NETCore.App/7.0.0/libcoreclr.dylib : ves_icall_System_Reflection_Assembly_InternalLoad_raw
0x112ae67ba - Unknown
0x112506773 - Unknown
0x10eaf033b - Unknown
0x10eaf04c1 - Unknown
0x10ec5c592 - /private/tmp/helix/working/A19808BE/p/shared/Microsoft.NETCore.App/7.0.0/libcoreclr.dylib : mono_jit_runtime_invoke
0x10eb7a9c8 - /private/tmp/helix/working/A19808BE/p/shared/Microsoft.NETCore.App/7.0.0/libcoreclr.dylib : mono_runtime_invoke_checked
0x10eb82a1c - /private/tmp/helix/working/A19808BE/p/shared/Microsoft.NETCore.App/7.0.0/libcoreclr.dylib : do_exec_main_checked
0x10ecbabf2 - /private/tmp/helix/working/A19808BE/p/shared/Microsoft.NETCore.App/7.0.0/libcoreclr.dylib : mono_jit_exec
0x10ecbe226 - /private/tmp/helix/working/A19808BE/p/shared/Microsoft.NETCore.App/7.0.0/libcoreclr.dylib : mono_main
0x10ed3a3c3 - /private/tmp/helix/working/A19808BE/p/shared/Microsoft.NETCore.App/7.0.0/libcoreclr.dylib : monovm_execute_assembly
0x10e6c847d - /private/tmp/helix/working/A19808BE/p/shared/Microsoft.NETCore.App/7.0.0/libhostpolicy.dylib : _Z19run_app_for_contextRK20hostpolicy_context_tiPPKc
0x10e6c92e1 - /private/tmp/helix/working/A19808BE/p/shared/Microsoft.NETCore.App/7.0.0/libhostpolicy.dylib : corehost_main
0x10e6560c5 - /private/tmp/helix/working/A19808BE/p/host/fxr/7.0.0/libhostfxr.dylib : _ZN10fx_muxer_t24handle_exec_host_commandERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEERK19host_startup_info_tS8_RKNS0_13unordered_mapI13known_optionsNS0_6vectorIS6_NS4_IS6_EEEE18known_options_hashNS0_8equal_toISD_EENS4_INS0_4pairIKSD
0x10e654ead - /private/tmp/helix/working/A19808BE/p/host/fxr/7.0.0/libhostfxr.dylib : _ZN10fx_muxer_t7executeENSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEiPPKcRK19host_startup_info_tPciPi
0x10e6518a8 - /private/tmp/helix/working/A19808BE/p/host/fxr/7.0.0/libhostfxr.dylib : hostfxr_main_startupinfo
0x10e49fa92 - /private/tmp/helix/working/A19808BE/p/dotnet : _Z9exe_startiPPKc
0x10e49fc50 - /private/tmp/helix/working/A19808BE/p/dotnet : main
0x11b8384fe - Unknown

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

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

Memory around native instruction pointer (0x7ff80c7b2112):0x7ff80c7b2102 ff ff c3 90 90 90 b8 48 01 00 02 49 89 ca 0f 05 .......H...I....
0x7ff80c7b2112 73 08 48 89 c7 e9 d5 a1 ff ff c3 90 90 90 b8 53 s.H............S
0x7ff80c7b2122 00 00 02 49 89 ca 0f 05 73 08 48 89 c7 e9 bd a1 ...I....s.H.....
0x7ff80c7b2132 ff ff c3 90 90 90 b8 83 01 00 02 49 89 ca 0f 05 ...........I....

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

  at <unknown> <0xffffffff>
  at System.Reflection.Assembly:InternalLoad <0x00089>
  at System.Reflection.Assembly:Load <0x00092>
  at System.Reflection.Assembly:Load <0x0006a>
  at Xunit.ConsoleClient.ConsoleRunner:GetAvailableRunnerReporters <0x00452>
  at Xunit.ConsoleClient.ConsoleRunner:EntryPoint <0x000d2>
  at Xunit.ConsoleClient.Program:Main <0x0013a>
  at <Module>:runtime_invoke_int_object <0x000b0>

=================================================================
./RunTests.sh: line 168: 65211 Abort trap: 6 "$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=IgnoreForCI -notrait category=OuterLoop -notrait category=failing $RSP_FILE
/private/tmp/helix/working/A19808BE/w/BAC009DC/e

link

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions