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

Invalid type for MakeGenericMethod is crashing the runtime #71339

Open
krwq opened this issue Jun 27, 2022 · 5 comments
Open

Invalid type for MakeGenericMethod is crashing the runtime #71339

krwq opened this issue Jun 27, 2022 · 5 comments
Assignees
Labels
area-VM-reflection-mono Reflection issues specific to MonoVM
Milestone

Comments

@krwq
Copy link
Member

krwq commented Jun 27, 2022

One of the types from the test below is crashing the mono runtime in #71324 (most likely typeof(void))

Specific commit affected
39b0578

Relevant code:

[Theory]
[InlineData(typeof(void))]
[InlineData(typeof(Dictionary<,>))]
[InlineData(typeof(List<>))]
[InlineData(typeof(Nullable<>))]
[InlineData(typeof(int*))]
[InlineData(typeof(RefStruct))]
public static void CreateJsonTypeInfoWithInappropriateTypeThrows(Type type)
{
    Assert.Throws<ArgumentException>(() => JsonTypeInfo.CreateJsonTypeInfo(type, new JsonSerializerOptions()));
}

// JsonTypeInfo.CreateJsonTypeInfo:
if (IsInvalidForSerialization(type)) // it seems it passed the check in the repro
{
    ThrowHelper.ThrowArgumentException_CannotSerializeInvalidType(nameof(type), type, null, null);
}

s_createJsonTypeInfo ??= typeof(JsonTypeInfo).GetMethod(nameof(CreateJsonTypeInfo), new Type[] { typeof(JsonSerializerOptions) })!;
return (JsonTypeInfo)s_createJsonTypeInfo.MakeGenericMethod(type)
    .Invoke(null, new object[] { options })!;

cc: @steveisok @fanyang-mono

@krwq krwq added the Mono label Jun 27, 2022
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Jun 27, 2022
@ghost
Copy link

ghost commented Jun 27, 2022

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

Issue Details

One of the types from the test below is crashing the mono runtime in #71324 (most likely typeof(void))

Specific commit affected
39b0578

Relevant code:

[Theory]
[InlineData(typeof(void))]
[InlineData(typeof(Dictionary<,>))]
[InlineData(typeof(List<>))]
[InlineData(typeof(Nullable<>))]
[InlineData(typeof(int*))]
[InlineData(typeof(RefStruct))]
public static void CreateJsonTypeInfoWithInappropriateTypeThrows(Type type)
{
    Assert.Throws<ArgumentException>(() => JsonTypeInfo.CreateJsonTypeInfo(type, new JsonSerializerOptions()));
}

// JsonTypeInfo.CreateJsonTypeInfo:
if (IsInvalidForSerialization(type)) // it seems it passed the check in the repro
{
    ThrowHelper.ThrowArgumentException_CannotSerializeInvalidType(nameof(type), type, null, null);
}

s_createJsonTypeInfo ??= typeof(JsonTypeInfo).GetMethod(nameof(CreateJsonTypeInfo), new Type[] { typeof(JsonSerializerOptions) })!;
return (JsonTypeInfo)s_createJsonTypeInfo.MakeGenericMethod(type)
    .Invoke(null, new object[] { options })!;

cc: @steveisok @fanyang-mono

Author: krwq
Assignees: -
Labels:

area-System.Text.Json, untriaged, Mono

Milestone: -

@krwq krwq changed the title Invalid generic argument for MakeGenericMethod is crashing the runtime Invalid type for MakeGenericMethod is crashing the runtime Jun 27, 2022
krwq added a commit to krwq/runtime-1 that referenced this issue Jun 27, 2022
@krwq
Copy link
Member Author

krwq commented Jun 27, 2022

typeof(void) is definitely the culprit for the failures, others might too.

Here is the full log
Console log: 'System.Text.Json.Tests' from job 904a7863-adf7-4715-8b3f-31716791f267 (ubuntu.1804.armarch.open) using docker image mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-helix-arm64v8-20220427172132-97d8652 on ddvsotx2l200
running $HELIX_CORRELATION_PAYLOAD/scripts/2642eec45e43479a86e8d91d5c67d5c0/execute.sh in /ssd/work/A1A10899/w/A79E08F5/e max 2700 seconds

Output:
[BEGIN EXECUTION]
+ sudo python -m pip install --disable-pip-version-check -r /root/helix/scripts/runtime_python_requirements.txt
/usr/lib/python3/dist-packages/secretstorage/dhcrypto.py:15: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
  from cryptography.utils import int_from_bytes
/usr/lib/python3/dist-packages/secretstorage/util.py:19: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
  from cryptography.utils import int_from_bytes
WARNING: The directory '/home/helixbot/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied: certifi==2020.6.20 in /usr/local/lib/python3.6/dist-packages (from -r /root/helix/scripts/runtime_python_requirements.txt (line 1)) (2020.6.20)
Requirement already satisfied: ndg-httpsclient==0.5.1 in /usr/local/lib/python3.6/dist-packages (from -r /root/helix/scripts/runtime_python_requirements.txt (line 2)) (0.5.1)
Requirement already satisfied: psutil==5.8.0 in /usr/local/lib/python3.6/dist-packages (from -r /root/helix/scripts/runtime_python_requirements.txt (line 3)) (5.8.0)
Requirement already satisfied: pyasn1==0.4.5 in /usr/local/lib/python3.6/dist-packages (from -r /root/helix/scripts/runtime_python_requirements.txt (line 4)) (0.4.5)
Requirement already satisfied: pyopenssl==19.0.0 in /usr/local/lib/python3.6/dist-packages (from -r /root/helix/scripts/runtime_python_requirements.txt (line 5)) (19.0.0)
Requirement already satisfied: six>=1.11.0 in /usr/lib/python3/dist-packages (from -r /root/helix/scripts/runtime_python_requirements.txt (line 6)) (1.11.0)
Requirement already satisfied: cryptography<=3.4.6,>=2.8 in /usr/local/lib/python3.6/dist-packages (from -r /root/helix/scripts/runtime_python_requirements.txt (line 8)) (3.4.6)
Requirement already satisfied: asn1crypto==0.24.0 in /usr/lib/python3/dist-packages (from -r /root/helix/scripts/runtime_python_requirements.txt (line 9)) (0.24.0)
Requirement already satisfied: idna==2.8 in /usr/local/lib/python3.6/dist-packages (from -r /root/helix/scripts/runtime_python_requirements.txt (line 10)) (2.8)
Requirement already satisfied: cffi==1.14.5 in /usr/local/lib/python3.6/dist-packages (from -r /root/helix/scripts/runtime_python_requirements.txt (line 11)) (1.14.5)
Requirement already satisfied: pycparser==2.19 in /usr/local/lib/python3.6/dist-packages (from -r /root/helix/scripts/runtime_python_requirements.txt (line 12)) (2.19)
Requirement already satisfied: docker==3.7.2 in /usr/local/lib/python3.6/dist-packages (from -r /root/helix/scripts/runtime_python_requirements.txt (line 14)) (3.7.2)
Requirement already satisfied: docker-pycreds==0.4.0 in /usr/local/lib/python3.6/dist-packages (from -r /root/helix/scripts/runtime_python_requirements.txt (line 15)) (0.4.0)
Requirement already satisfied: websocket-client==0.56.0 in /usr/local/lib/python3.6/dist-packages (from -r /root/helix/scripts/runtime_python_requirements.txt (line 16)) (0.56.0)
Requirement already satisfied: requests>=2.21.0 in /usr/local/lib/python3.6/dist-packages (from -r /root/helix/scripts/runtime_python_requirements.txt (line 18)) (2.27.1)
Requirement already satisfied: urllib3==1.24.3 in /usr/local/lib/python3.6/dist-packages (from -r /root/helix/scripts/runtime_python_requirements.txt (line 19)) (1.24.3)
Requirement already satisfied: azure-storage-blob==12.5.0 in /usr/local/lib/python3.6/dist-packages (from -r /root/helix/scripts/runtime_python_requirements.txt (line 21)) (12.5.0)
Requirement already satisfied: azure-core==1.7.0 in /usr/local/lib/python3.6/dist-packages (from -r /root/helix/scripts/runtime_python_requirements.txt (line 22)) (1.7.0)
Requirement already satisfied: azure-devops==5.0.0b9 in /usr/local/lib/python3.6/dist-packages (from -r /root/helix/scripts/runtime_python_requirements.txt (line 23)) (5.0.0b9)
Requirement already satisfied: msrest==0.6.10 in /usr/local/lib/python3.6/dist-packages (from -r /root/helix/scripts/runtime_python_requirements.txt (line 24)) (0.6.10)
Requirement already satisfied: isodate==0.6.0 in /usr/local/lib/python3.6/dist-packages (from -r /root/helix/scripts/runtime_python_requirements.txt (line 25)) (0.6.0)
Requirement already satisfied: requests-oauthlib==1.2.0 in /usr/local/lib/python3.6/dist-packages (from -r /root/helix/scripts/runtime_python_requirements.txt (line 26)) (1.2.0)
Requirement already satisfied: oauthlib==3.1.0 in /usr/local/lib/python3.6/dist-packages (from -r /root/helix/scripts/runtime_python_requirements.txt (line 27)) (3.1.0)
Requirement already satisfied: charset-normalizer~=2.0.0; python_version >= "3" in /usr/local/lib/python3.6/dist-packages (from requests>=2.21.0->-r /root/helix/scripts/runtime_python_requirements.txt (line 18)) (2.0.12)
+ export PYTHONPATH=/root/helix/scripts:
+ cd /root/helix/work/workitem/e
+ mkdir -p /home/helixbot/dotnetbuild/dumps/
+ /root/helix/work/correlation/scripts/2642eec45e43479a86e8d91d5c67d5c0/execute.sh
+ ./RunTests.sh --runtime-path /root/helix/work/correlation
----- start Mon Jun 27 12:13:52 UTC 2022 =============== To repro directly: =====================================================
pushd .
/root/helix/work/correlation/dotnet exec --runtimeconfig System.Text.Json.Tests.runtimeconfig.json --depsfile System.Text.Json.Tests.deps.json xunit.console.dll System.Text.Json.Tests.dll -xml testResults.xml -nologo -nocolor -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing 
popd
===========================================================================================================
/root/helix/work/workitem/e /root/helix/work/workitem/e
  Discovering: System.Text.Json.Tests (method display = ClassAndMethod, method display options = None)
  Discovered:  System.Text.Json.Tests (found 5219 of 5276 test cases)
  Starting:    System.Text.Json.Tests (parallel test collections = on, max threads = 6)
* Assertion at /__w/1/s/src/mono/mono/metadata/reflection.c:2676, condition `is_ok (error)' not met, function:reflection_bind_generic_method_parameters, MVAR 0 cannot be expanded with type 0x1


=================================================================
	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:
=================================================================
	0x7fb391ad74 - 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 37]
[New LWP 38]
[New LWP 39]
[New LWP 40]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1".
0x0000007fb3eb32a4 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x557ff4b8ac) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
88	../sysdeps/unix/sysv/linux/futex-internal.h: No such file or directory.
  Id   Target Id         Frame 
* 1    Thread 0x7fb3ef3020 (LWP 24) "dotnet" 0x0000007fb3eb32a4 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x557ff4b8ac) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  2    Thread 0x7fb2fff1c0 (LWP 25) "SGen worker" 0x0000007fb3eb32a4 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7fb39dc788 <work_cond+40>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  3    Thread 0x7fb12271c0 (LWP 26) "dotnet" 0x0000007fb3b8def8 in __GI___poll (fds=0x7fac003af0, nfds=548471167082, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:41
  4    Thread 0x7fb10261c0 (LWP 27) "Finalizer" 0x0000007fb3eb5a40 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=0, futex_word=0x7fb39cd7b8 <finalizer_sem>) at ../sysdeps/unix/sysv/linux/futex-internal.h:205
  5    Thread 0x7fa96c31c0 (LWP 28) "dotnet" 0x0000007fb3eb6ac0 in __libc_read (fd=<optimized out>, buf=0x7fa96c29a7, nbytes=1) at ../sysdeps/unix/sysv/linux/read.c:27
  6    Thread 0x7fa95bf1c0 (LWP 31) ".NET Long Runni" 0x0000007fb3eb32a4 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7f9805585c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  7    Thread 0x7fa93ae1c0 (LWP 32) ".NET ThreadPool" 0x0000007fb3eb35bc in futex_reltimed_wait_cancelable (private=<optimized out>, reltime=0x7f00000000, expected=0, futex_word=0x7f9c00c2a8) at ../sysdeps/unix/sysv/linux/futex-internal.h:142
  8    Thread 0x7fa86031c0 (LWP 33) ".NET ThreadPool" 0x0000007fb3eb5a40 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=0, futex_word=0x7f90000b80) at ../sysdeps/unix/sysv/linux/futex-internal.h:205
  9    Thread 0x7fa85b21c0 (LWP 34) ".NET ThreadPool" 0x0000007fb3eb35bc in futex_reltimed_wait_cancelable (private=<optimized out>, reltime=0x0, expected=0, futex_word=0x7fa85b13b8) at ../sysdeps/unix/sysv/linux/futex-internal.h:142
  10   Thread 0x7fa83611c0 (LWP 35) ".NET Long Runni" 0x0000007fb3eb5a40 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=0, futex_word=0x7f88000b80) at ../sysdeps/unix/sysv/linux/futex-internal.h:205
  11   Thread 0x7f8ffff1c0 (LWP 36) ".NET Long Runni" 0x0000007fb3eb35bc in futex_reltimed_wait_cancelable (private=<optimized out>, reltime=0x7f00000000, expected=0, futex_word=0x7f84003c1c) at ../sysdeps/unix/sysv/linux/futex-internal.h:142
  12   Thread 0x7f8fdfe1c0 (LWP 37) ".NET Long Runni" 0x0000007fb3eb6690 in __lll_lock_wait (futex=0x7fb39cc690 <loader_mutex>, private=0) at lowlevellock.c:46
  13   Thread 0x7f8fbfd1c0 (LWP 38) ".NET Long Runni" 0x0000007fb3eb5a40 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=0, futex_word=0x7f80000b80) at ../sysdeps/unix/sysv/linux/futex-internal.h:205
  14   Thread 0x7f8f9fc1c0 (LWP 39) ".NET Long Runni" 0x0000007fb3eb5a40 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=0, futex_word=0x7fb39d2858 <suspend_semaphore>) at ../sysdeps/unix/sysv/linux/futex-internal.h:205
  15   Thread 0x7f8f7fb1c0 (LWP 40) ".NET Long Runni" 0x0000007fb3eb7d5c in __waitpid (pid=<optimized out>, stat_loc=0x7f8f7f4350, options=<optimized out>) at ../sysdeps/unix/sysv/linux/waitpid.c:30

Thread 15 (Thread 0x7f8f7fb1c0 (LWP 40)):
#0  0x0000007fb3eb7d5c in __waitpid (pid=<optimized out>, stat_loc=0x7f8f7f4350, options=<optimized out>) at ../sysdeps/unix/sysv/linux/waitpid.c:30
#1  0x0000007fb391ae74 in dump_native_stacktrace (signal=<optimized out>, mctx=<optimized out>) at /__w/1/s/src/mono/mono/mini/mini-posix.c:843
#2  mono_dump_native_crash_info (signal=<optimized out>, mctx=0x7f8f7f4d80, info=<optimized out>) at /__w/1/s/src/mono/mono/mini/mini-posix.c:870
#3  0x0000007fb38d9358 in mono_handle_native_crash (signal=0x7fb36cbf11 "SIGABRT", mctx=0x7f8f7f4d80, info=0x7f8f7f50c0) at /__w/1/s/src/mono/mono/mini/mini-exceptions.c:3001
#4  0x0000007fb391a580 in sigabrt_signal_handler (_dummy=6, _info=0x7f8f7f50c0, context=0x7f8f7f5140) at /__w/1/s/src/mono/mono/mini/mini-posix.c:225
#5  <signal handler called>
#6  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#7  0x0000007fb3afa974 in __GI_abort () at abort.c:79
#8  0x0000007fb395bdb0 in monoeg_assert_abort () at /__w/1/s/src/mono/mono/eglib/goutput.c:57
#9  0x0000007fb37d7bec in mono_log_write_logfile (log_domain=<optimized out>, level=G_LOG_LEVEL_ERROR, hdr=<optimized out>, message=0x7f78215de0 "* Assertion at /__w/1/s/src/mono/mono/metadata/reflection.c:2676, condition `is_ok (error)' not met, function:reflection_bind_generic_method_parameters, MVAR 0 cannot be expanded with type 0x1\n") at /__w/1/s/src/mono/mono/utils/mono-log-common.c:146
#10 0x0000007fb395c160 in monoeg_g_logstr (log_domain=0x0, log_level=G_LOG_LEVEL_ERROR, msg=0x0) at /__w/1/s/src/mono/mono/eglib/goutput.c:151
#11 monoeg_g_logv_nofree (log_domain=0x0, log_level=G_LOG_LEVEL_ERROR, format=<optimized out>, args=...) at /__w/1/s/src/mono/mono/eglib/goutput.c:166
#12 0x0000007fb395c278 in monoeg_assertion_message (format=0x0) at /__w/1/s/src/mono/mono/eglib/goutput.c:207
#13 0x0000007fb3795e50 in reflection_bind_generic_method_parameters (method=0x7f74170900, types=..., error=0x7f8f7f6c80) at /__w/1/s/src/mono/mono/metadata/reflection.c:2676
#14 ves_icall_RuntimeMethodInfo_MakeGenericMethod_impl (rmethod=..., types=..., error=0x7f8f7f6c80) at /__w/1/s/src/mono/mono/metadata/reflection.c:2693
#15 0x0000007fb373f30c in ves_icall_RuntimeMethodInfo_MakeGenericMethod_impl_raw (a0=0x7f8f7f6d20, a1=0x7f8f7f6d28) at /__w/1/s/src/mono/mono/mini/../metadata/icall-def.h:388
#16 0x0000007fa8fcda18 in ?? ()
#17 0x0000007fb327e4f8 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 14 (Thread 0x7f8f9fc1c0 (LWP 39)):
#0  0x0000007fb3eb5a40 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=0, futex_word=0x7fb39d2858 <suspend_semaphore>) at ../sysdeps/unix/sysv/linux/futex-internal.h:205
#1  do_futex_wait (sem=sem@entry=0x7fb39d2858 <suspend_semaphore>, abstime=0x0) at sem_waitcommon.c:111
#2  0x0000007fb3eb5b60 in __new_sem_wait_slow (sem=0x7fb39d2858 <suspend_semaphore>, abstime=0x0) at sem_waitcommon.c:181
#3  0x0000007fb37e1bcc in mono_os_sem_wait (sem=<optimized out>, flags=<optimized out>) at /__w/1/s/src/mono/mono/utils/mono-os-semaphore.h:204
#4  mono_os_sem_timedwait (sem=0x7fb39d2858 <suspend_semaphore>, timeout_ms=4294967295, flags=MONO_SEM_FLAGS_NONE) at /__w/1/s/src/mono/mono/utils/mono-os-semaphore.h:237
#5  0x0000007fb37e18f0 in mono_threads_wait_pending_operations () at /__w/1/s/src/mono/mono/utils/mono-threads.c:323
#6  0x0000007fb37baca4 in unified_suspend_stop_world (flags=MONO_THREAD_INFO_FLAGS_NO_GC, thread_stopped_callback=0x7fb37bb0d0 <sgen_client_stop_world_thread_stopped_callback>) at /__w/1/s/src/mono/mono/metadata/sgen-stw.c:345
#7  0x0000007fb37ba98c in sgen_client_stop_world (generation=0, serial_collection=0) at /__w/1/s/src/mono/mono/metadata/sgen-stw.c:155
#8  0x0000007fb37f9fec in sgen_stop_world (generation=0, serial_collection=0) at /__w/1/s/src/mono/mono/sgen/sgen-gc.c:3995
#9  0x0000007fb37f6ac4 in sgen_perform_collection_inner (requested_size=<optimized out>, generation_to_collect=<optimized out>, reason=<optimized out>, forced_serial=<optimized out>, stw=<optimized out>) at /__w/1/s/src/mono/mono/sgen/sgen-gc.c:2643
#10 sgen_perform_collection (requested_size=4096, generation_to_collect=0, reason=0x7fb36ca54e "Nursery full", forced_serial=0, stw=1) at /__w/1/s/src/mono/mono/sgen/sgen-gc.c:2766
#11 0x0000007fb37f6a00 in sgen_ensure_free_space (size=4096, generation=<optimized out>) at /__w/1/s/src/mono/mono/sgen/sgen-gc.c:2622
#12 0x0000007fb37eb880 in sgen_alloc_obj_nolock (vtable=0x557f527b30, size=400) at /__w/1/s/src/mono/mono/sgen/sgen-alloc.c:279
#13 0x0000007fb37bd750 in mono_gc_alloc_string (vtable=0x557f527b30, size=400, len=188) at /__w/1/s/src/mono/mono/metadata/sgen-mono.c:1429
#14 0x0000007fb342c1bc in ?? ()
#15 0x0000007f74003190 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

Thread 13 (Thread 0x7f8fbfd1c0 (LWP 38)):
#0  0x0000007fb3eb5a40 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=0, futex_word=0x7f80000b80) at ../sysdeps/unix/sysv/linux/futex-internal.h:205
#1  do_futex_wait (sem=sem@entry=0x7f80000b80, abstime=0x0) at sem_waitcommon.c:111
#2  0x0000007fb3eb5b60 in __new_sem_wait_slow (sem=0x7f80000b80, abstime=0x0) at sem_waitcommon.c:181
#3  0x0000007fb37e1714 in mono_os_sem_wait (sem=0x7f80000b80, flags=MONO_SEM_FLAGS_NONE) at /__w/1/s/src/mono/mono/utils/mono-os-semaphore.h:204
#4  mono_thread_info_wait_for_resume (info=<optimized out>) at /__w/1/s/src/mono/mono/utils/mono-threads.c:237
#5  0x0000007fb37e7a98 in mono_threads_exit_gc_safe_region_unbalanced_internal (cookie=<optimized out>, stackdata=<optimized out>) at /__w/1/s/src/mono/mono/utils/mono-threads-coop.c:389
#6  mono_threads_exit_gc_safe_region_internal (cookie=0x7f80000b20, stackdata=<optimized out>) at /__w/1/s/src/mono/mono/utils/mono-threads-coop.c:346
#7  0x0000007fb374c5d0 in mono_coop_mutex_lock (mutex=<optimized out>) at /__w/1/s/src/mono/mono/mini/../../mono/utils/mono-coop-mutex.h:59
#8  mono_loader_lock () at /__w/1/s/src/mono/mono/metadata/loader.c:136
#9  0x0000007fb38e6fb4 in mono_class_get_runtime_generic_context_template (klass=0x7f740bebd0) at /__w/1/s/src/mono/mono/mini/mini-generic-sharing.c:812
#10 0x0000007fb38e2fd4 in class_get_rgctx_template_oti (klass=0x7f80000b80, type_argc=0, slot=1, temporary=1, shared=1, do_free=<optimized out>) at /__w/1/s/src/mono/mono/mini/mini-generic-sharing.c:904
#11 fill_runtime_generic_context (class_vtable=<optimized out>, rgctx=0x7f7c127e28, slot=1, method_inst=0x0, is_mrgctx=<optimized out>, error=<optimized out>) at /__w/1/s/src/mono/mono/mini/mini-generic-sharing.c:3119
#12 0x0000007fb38dc40c in mono_rgctx_lazy_fetch_trampoline (regs=<optimized out>, code=<optimized out>, data=<optimized out>, tramp=0x0) at /__w/1/s/src/mono/mono/mini/mini-trampolines.c:948
#13 0x0000007fb34b4904 in ?? ()
#14 0x0000000000000001 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 12 (Thread 0x7f8fdfe1c0 (LWP 37)):
#0  0x0000007fb3eb6690 in __lll_lock_wait (futex=0x7fb39cc690 <loader_mutex>, private=0) at lowlevellock.c:46
#1  0x0000007fb3eaf7d8 in __GI___pthread_mutex_lock (mutex=0x7fb39cc690 <loader_mutex>) at pthread_mutex_lock.c:115
#2  0x0000007fb374c5c0 in mono_os_mutex_lock (mutex=0x7fb39cc690 <loader_mutex>) at /__w/1/s/src/mono/mono/mini/../../mono/utils/mono-os-mutex.h:105
#3  mono_coop_mutex_lock (mutex=<optimized out>) at /__w/1/s/src/mono/mono/mini/../../mono/utils/mono-coop-mutex.h:57
#4  mono_loader_lock () at /__w/1/s/src/mono/mono/metadata/loader.c:136
#5  0x0000007fb371e650 in mono_class_create_generic_inst (gclass=0x7f88258040) at /__w/1/s/src/mono/mono/metadata/class-init.c:916
#6  0x0000007fb371519c in mono_class_inflate_generic_class_checked (gklass=<optimized out>, context=<optimized out>, error=0x7f8fdf7c18) at /__w/1/s/src/mono/mono/metadata/class.c:1060
#7  mono_class_get_and_inflate_typespec_checked (image=<optimized out>, type_token=<optimized out>, context=<optimized out>, error=0x7f8fdf7c18) at /__w/1/s/src/mono/mono/metadata/class.c:2854
#8  0x0000007fb3768ed4 in get_constraints (image=0x557f4bb350, owner=922, constraints=<optimized out>, container=0x7f7c12fbb0, error=0x7f8fdf7c18) at /__w/1/s/src/mono/mono/metadata/metadata.c:7127
#9  mono_metadata_load_generic_param_constraints_checked (image=0x557f4bb350, token=<optimized out>, container=0x7f7c12fbb0, error=0x7f8fdf7c18) at /__w/1/s/src/mono/mono/metadata/metadata.c:7223
#10 0x0000007fb374d730 in mono_get_method_from_token (image=0x557f4bb350, token=100668683, klass=<optimized out>, context=<optimized out>, used_context=0x7f8fdf7b0c, error=0x7f8fdf7c18) at /__w/1/s/src/mono/mono/metadata/loader.c:1109
#11 mono_get_method_checked (image=0x557f4bb350, token=100668683, klass=<optimized out>, context=<optimized out>, error=0x7f8fdf7c18) at /__w/1/s/src/mono/mono/metadata/loader.c:1194
#12 0x0000007fb371ffb8 in mono_class_setup_methods (klass=0x557f7ba2b0) at /__w/1/s/src/mono/mono/metadata/class-init.c:3519
#13 0x0000007fb37354ac in mono_class_get_methods_by_name (klass=0x557f7ba2b0, name=0x7f7c12c4d0 "IndexOf", bflags=28, mlisttype=1, allow_ctors=0, error=0x7f8fdf7da0) at /__w/1/s/src/mono/mono/metadata/icall.c:3809
#14 0x0000007fb3741fc0 in ves_icall_RuntimeType_GetMethodsByName_native (type_handle=..., mname=0x7f7c12c4d0 "IndexOf", bflags=28, mlisttype=1, error=0x7f8fdf7da0) at /__w/1/s/src/mono/mono/metadata/icall.c:3898
#15 ves_icall_RuntimeType_GetMethodsByName_native_raw (a0=..., a1=0x7f7c12c4d0 "IndexOf", a2=28, a3=1) at /__w/1/s/src/mono/mono/mini/../metadata/icall-def.h:488
#16 0x0000007fa96344d0 in ?? ()
#17 0x000000557f7ba360 in ?? ()
#18 0x000000000000001c in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 11 (Thread 0x7f8ffff1c0 (LWP 36)):
#0  0x0000007fb3eb35bc in futex_reltimed_wait_cancelable (private=<optimized out>, reltime=0x7f00000000, expected=0, futex_word=0x7f84003c1c) at ../sysdeps/unix/sysv/linux/futex-internal.h:142
#1  __pthread_cond_wait_common (abstime=0x7f8fffa308, mutex=0x7f84003bc0, cond=0x7f84003bf0) at pthread_cond_wait.c:533
#2  __pthread_cond_timedwait (cond=0x7f84003bf0, mutex=0x7f84003bc0, abstime=0x7f8fffa308) at pthread_cond_wait.c:667
#3  0x0000007fb0b593e8 in SystemNative_LowLevelMonitor_TimedWait (monitor=0x7f84003bc0, timeoutMilliseconds=30000) at /__w/1/s/src/native/libs/System.Native/pal_threading.c:195
#4  0x0000007fa861136c in ?? ()
#5  0x0000007fa93b6d78 in ?? ()
#6  0x0000007f8fffb1a0 in ?? ()
#7  0xf90047bda907f3bb in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 10 (Thread 0x7fa83611c0 (LWP 35)):
#0  0x0000007fb3eb5a40 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=0, futex_word=0x7f88000b80) at ../sysdeps/unix/sysv/linux/futex-internal.h:205
#1  do_futex_wait (sem=sem@entry=0x7f88000b80, abstime=0x0) at sem_waitcommon.c:111
#2  0x0000007fb3eb5b60 in __new_sem_wait_slow (sem=0x7f88000b80, abstime=0x0) at sem_waitcommon.c:181
#3  0x0000007fb37e1714 in mono_os_sem_wait (sem=0x7f88000b80, flags=MONO_SEM_FLAGS_NONE) at /__w/1/s/src/mono/mono/utils/mono-os-semaphore.h:204
#4  mono_thread_info_wait_for_resume (info=<optimized out>) at /__w/1/s/src/mono/mono/utils/mono-threads.c:237
#5  0x0000007fb37e7764 in mono_threads_state_poll_with_info (info=0x7f88000b20) at /__w/1/s/src/mono/mono/utils/mono-threads-coop.c:148
#6  0x0000007fb383d268 in mono_threads_safepoint () at /__w/1/s/src/mono/mono/mini/../../mono/utils/mono-threads-coop.h:115
#7  mini_method_compile (method=<optimized out>, opts=374417919, flags=JIT_FLAG_RUN_CCTORS, parts=0, aot_method_index=-1) at /__w/1/s/src/mono/mono/mini/mini.c:3609
#8  0x0000007fb383e180 in mono_jit_compile_method_inner (method=0x7f88258330, opt=393, error=0x7fa835bfe0) at /__w/1/s/src/mono/mono/mini/mini.c:4099
#9  0x0000007fb3842c68 in mono_jit_compile_method_with_opt (method=0x7f88258330, opt=374417919, jit_only=0, error=<optimized out>) at /__w/1/s/src/mono/mono/mini/mini-runtime.c:2707
#10 jit_compile_method_with_opt_cb (arg=<optimized out>) at /__w/1/s/src/mono/mono/mini/mini-runtime.c:2762
#11 jit_compile_method_with_opt (params=<optimized out>) at /__w/1/s/src/mono/mono/mini/mini-runtime.c:2778
#12 0x0000007fb38420e0 in mono_jit_compile_method (method=<optimized out>, error=0x7fa835bfe0) at /__w/1/s/src/mono/mono/mini/mini-runtime.c:2797
#13 0x0000007fb38db7c8 in common_call_trampoline (regs=0x7fa835c090, code=0x7fb06617f0 "", m=0x7f88258330, vt=0x7f88263f90, vtable_slot=<optimized out>, error=0x7fa835bfe0) at /__w/1/s/src/mono/mono/mini/mini-trampolines.c:618
#14 0x0000007fb38dc538 in mono_vcall_trampoline (regs=0x7fa835c090, code=0x7fb06617f0 "", slot=-19, tramp=<optimized out>) at /__w/1/s/src/mono/mono/mini/mini-trampolines.c:840
#15 0x0000007fb34b5504 in ?? ()
#16 0x0000007f88263f90 in ?? ()
#17 0x0000000000000008 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 9 (Thread 0x7fa85b21c0 (LWP 34)):
#0  0x0000007fb3eb35bc in futex_reltimed_wait_cancelable (private=<optimized out>, reltime=0x0, expected=0, futex_word=0x7fa85b13b8) at ../sysdeps/unix/sysv/linux/futex-internal.h:142
#1  __pthread_cond_wait_common (abstime=0x7fa85b1340, mutex=0x7f9803c8f0, cond=0x7fa85b1390) at pthread_cond_wait.c:533
#2  __pthread_cond_timedwait (cond=0x7fa85b1390, mutex=0x7f9803c8f0, abstime=0x7fa85b1340) at pthread_cond_wait.c:667
#3  0x0000007fb37d9f90 in mono_os_cond_timedwait (cond=0x7fa85b1390, mutex=0x7f9803c8f0, timeout_ms=20000) at /__w/1/s/src/mono/mono/utils/mono-os-mutex.c:75
#4  0x0000007fb37df4dc in mono_coop_cond_timedwait (cond=0x7fa85b1390, mutex=<optimized out>, timeout_ms=20000) at /__w/1/s/src/mono/mono/mini/../../mono/utils/mono-coop-mutex.h:103
#5  mono_lifo_semaphore_timed_wait (semaphore=0x7f9803c8f0, timeout_ms=20000) at /__w/1/s/src/mono/mono/utils/lifo-semaphore.c:48
#6  0x0000007fa85bc0b0 in ?? ()
#7  0x0000007f94002150 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

Thread 8 (Thread 0x7fa86031c0 (LWP 33)):
#0  0x0000007fb3eb5a40 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=0, futex_word=0x7f90000b80) at ../sysdeps/unix/sysv/linux/futex-internal.h:205
#1  do_futex_wait (sem=sem@entry=0x7f90000b80, abstime=0x0) at sem_waitcommon.c:111
#2  0x0000007fb3eb5b60 in __new_sem_wait_slow (sem=0x7f90000b80, abstime=0x0) at sem_waitcommon.c:181
#3  0x0000007fb37e1714 in mono_os_sem_wait (sem=0x7f90000b80, flags=MONO_SEM_FLAGS_NONE) at /__w/1/s/src/mono/mono/utils/mono-os-semaphore.h:204
#4  mono_thread_info_wait_for_resume (info=<optimized out>) at /__w/1/s/src/mono/mono/utils/mono-threads.c:237
#5  0x0000007fb37e7c8c in mono_threads_exit_gc_safe_region_unbalanced_internal (cookie=0x7f90000b20, stackdata=<optimized out>) at /__w/1/s/src/mono/mono/utils/mono-threads-coop.c:389
#6  mono_threads_exit_gc_safe_region_unbalanced (cookie=0x7f90000b20, stackpointer=<optimized out>) at /__w/1/s/src/mono/mono/utils/mono-threads-coop.c:409
#7  0x0000007fa8611384 in ?? ()
#8  0x0000007fa93b6d78 in ?? ()
#9  0x0000007fa8602910 in ?? ()
#10 0xf90047bda907f3bb in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 7 (Thread 0x7fa93ae1c0 (LWP 32)):
#0  0x0000007fb3eb35bc in futex_reltimed_wait_cancelable (private=<optimized out>, reltime=0x7f00000000, expected=0, futex_word=0x7f9c00c2a8) at ../sysdeps/unix/sysv/linux/futex-internal.h:142
#1  __pthread_cond_wait_common (abstime=0x7fa93ad0f8, mutex=0x7f9c00c250, cond=0x7f9c00c280) at pthread_cond_wait.c:533
#2  __pthread_cond_timedwait (cond=0x7f9c00c280, mutex=0x7f9c00c250, abstime=0x7fa93ad0f8) at pthread_cond_wait.c:667
#3  0x0000007fb0b593e8 in SystemNative_LowLevelMonitor_TimedWait (monitor=0x7f9c00c250, timeoutMilliseconds=12000) at /__w/1/s/src/native/libs/System.Native/pal_threading.c:195
#4  0x0000007fa861136c in ?? ()
#5  0x0000007fa93b6d78 in ?? ()
#6  0x0000007fa93ad910 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

Thread 6 (Thread 0x7fa95bf1c0 (LWP 31)):
#0  0x0000007fb3eb32a4 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7f9805585c) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1  __pthread_cond_wait_common (abstime=0x0, mutex=0x7f98055800, cond=0x7f98055830) at pthread_cond_wait.c:502
#2  __pthread_cond_wait (cond=0x7f98055830, mutex=0x7f98055800) at pthread_cond_wait.c:655
#3  0x0000007fb0b59284 in SystemNative_LowLevelMonitor_Wait (monitor=0x7f98055800) at /__w/1/s/src/native/libs/System.Native/pal_threading.c:155
#4  0x0000007fa93b72c4 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 5 (Thread 0x7fa96c31c0 (LWP 28)):
#0  0x0000007fb3eb6ac0 in __libc_read (fd=<optimized out>, buf=0x7fa96c29a7, nbytes=1) at ../sysdeps/unix/sysv/linux/read.c:27
#1  0x0000007fb0b58638 in SignalHandlerLoop (arg=0x557ff03110) at /__w/1/s/src/native/libs/System.Native/pal_signal.c:323
#2  0x0000007fb3ead088 in start_thread (arg=0x7fef7073ef) at pthread_create.c:463
#3  0x0000007fb3b970cc in thread_start () at ../sysdeps/unix/sysv/linux/aarch64/clone.S:78

Thread 4 (Thread 0x7fb10261c0 (LWP 27)):
#0  0x0000007fb3eb5a40 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=0, futex_word=0x7fb39cd7b8 <finalizer_sem>) at ../sysdeps/unix/sysv/linux/futex-internal.h:205
#1  do_futex_wait (sem=sem@entry=0x7fb39cd7b8 <finalizer_sem>, abstime=0x0) at sem_waitcommon.c:111
#2  0x0000007fb3eb5b60 in __new_sem_wait_slow (sem=0x7fb39cd7b8 <finalizer_sem>, abstime=0x0) at sem_waitcommon.c:181
#3  0x0000007fb37b0db8 in mono_os_sem_wait (sem=<optimized out>, flags=MONO_SEM_FLAGS_ALERTABLE) at /__w/1/s/src/mono/mono/mini/../utils/mono-os-semaphore.h:204
#4  mono_coop_sem_wait (sem=<optimized out>, flags=MONO_SEM_FLAGS_ALERTABLE) at /__w/1/s/src/mono/mono/mini/../../mono/utils/mono-coop-semaphore.h:41
#5  finalizer_thread (unused=<optimized out>) at /__w/1/s/src/mono/mono/metadata/gc.c:891
#6  0x0000007fb378b8c0 in start_wrapper_internal (start_info=0x0, stack_ptr=<optimized out>) at /__w/1/s/src/mono/mono/metadata/threads.c:1202
#7  0x0000007fb378b76c in start_wrapper (data=0x557f549a80) at /__w/1/s/src/mono/mono/metadata/threads.c:1264
#8  0x0000007fb3ead088 in start_thread (arg=0x7fef70766f) at pthread_create.c:463
#9  0x0000007fb3b970cc in thread_start () at ../sysdeps/unix/sysv/linux/aarch64/clone.S:78

Thread 3 (Thread 0x7fb12271c0 (LWP 26)):
#0  0x0000007fb3b8def8 in __GI___poll (fds=0x7fac003af0, nfds=548471167082, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:41
#1  0x0000007fb39a8180 in ipc_poll_fds (fds=<optimized out>, nfds=1, timeout=4294967295) at /__w/1/s/src/native/eventpipe/ds-ipc-pal-socket.c:470
#2  ds_ipc_poll (poll_handles_data=0x7fac0032e0, poll_handles_data_len=1, timeout_ms=4294967295, callback=0x7fb39a7530 <server_warning_callback>) at /__w/1/s/src/native/eventpipe/ds-ipc-pal-socket.c:1096
#3  0x0000007fb39a572c in ds_ipc_stream_factory_get_next_available_stream (callback=0x7fb39a7530 <server_warning_callback>) at /__w/1/s/src/native/eventpipe/ds-ipc.c:395
#4  0x0000007fb39a3fa4 in server_thread (data=<optimized out>) at /__w/1/s/src/native/eventpipe/ds-server.c:127
#5  0x0000007fb39a7510 in ep_rt_thread_mono_start_func (data=0x557f525950) at /__w/1/s/src/mono/mono/mini/../eventpipe/ep-rt-mono.h:1256
#6  0x0000007fb3ead088 in start_thread (arg=0x7fef7077bf) at pthread_create.c:463
#7  0x0000007fb3b970cc in thread_start () at ../sysdeps/unix/sysv/linux/aarch64/clone.S:78

Thread 2 (Thread 0x7fb2fff1c0 (LWP 25)):
#0  0x0000007fb3eb32a4 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7fb39dc788 <work_cond+40>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1  __pthread_cond_wait_common (abstime=0x0, mutex=0x7fb39dc730 <lock>, cond=0x7fb39dc760 <work_cond>) at pthread_cond_wait.c:502
#2  __pthread_cond_wait (cond=0x7fb39dc760 <work_cond>, mutex=0x7fb39dc730 <lock>) at pthread_cond_wait.c:655
#3  0x0000007fb382bd48 in mono_os_cond_wait (cond=0x7fb39dc788 <work_cond+40>, mutex=<optimized out>) at /__w/1/s/src/mono/mono/mini/../../mono/utils/mono-os-mutex.h:219
#4  get_work (worker_index=<optimized out>, work_context=<optimized out>, do_idle=<optimized out>, job=<optimized out>) at /__w/1/s/src/mono/mono/sgen/sgen-thread-pool.c:167
#5  thread_func (data=0x0) at /__w/1/s/src/mono/mono/sgen/sgen-thread-pool.c:198
#6  0x0000007fb3ead088 in start_thread (arg=0x7fef70775f) at pthread_create.c:463
#7  0x0000007fb3b970cc in thread_start () at ../sysdeps/unix/sysv/linux/aarch64/clone.S:78

Thread 1 (Thread 0x7fb3ef3020 (LWP 24)):
#0  0x0000007fb3eb32a4 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x557ff4b8ac) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1  __pthread_cond_wait_common (abstime=0x0, mutex=0x557ff4b850, cond=0x557ff4b880) at pthread_cond_wait.c:502
#2  __pthread_cond_wait (cond=0x557ff4b880, mutex=0x557ff4b850) at pthread_cond_wait.c:655
#3  0x0000007fb0b59284 in SystemNative_LowLevelMonitor_Wait (monitor=0x557ff4b850) at /__w/1/s/src/native/libs/System.Native/pal_threading.c:155
#4  0x0000007fa93b72c4 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

=================================================================
	Basic Fault Address Reporting
=================================================================
Memory around native instruction pointer (0x7fb3af9598):0x7fb3af9588  02 00 80 d2 03 01 80 d2 e8 10 80 d2 01 00 00 d4  ................
0x7fb3af9598  73 72 47 f9 e0 03 04 2a a2 97 40 f9 61 02 40 f9  srG....*..@.a.@.
0x7fb3af95a8  41 00 01 ca 61 01 00 b5 f3 53 41 a9 fd 7b d3 a8  A...a....SA..{..
0x7fb3af95b8  c0 03 5f d6 01 09 00 90 21 0c 47 f9 42 d0 3b d5  .._.....!.G.B.;.

=================================================================
	Managed Stacktrace:
=================================================================
	  at <unknown> <0xffffffff>
	  at System.Reflection.RuntimeMethodInfo:MakeGenericMethod_impl <0x00007>
	  at System.Reflection.RuntimeMethodInfo:MakeGenericMethod <0x00183>
	  at System.Text.Json.Serialization.Metadata.JsonTypeInfo:CreateJsonTypeInfo <0x0017f>
	  at <>c__DisplayClass61_0:<CreateJsonTypeInfoWithInappropriateTypeThrows>b__0 <0x00057>
	  at Xunit.Assert:RecordException <0x00057>
	  at Xunit.Assert:Throws <0x0004f>
	  at System.Text.Json.Serialization.Tests.DefaultJsonTypeInfoResolverTests:CreateJsonTypeInfoWithInappropriateTypeThrows <0x00143>
	  at <Module>:runtime_invoke_void_object <0x00087>
	  at <unknown> <0xffffffff>
	  at System.Reflection.RuntimeMethodInfo:InternalInvoke <0x00007>
	  at System.Reflection.MethodInvoker:InterpretedInvoke <0x00093>
	  at System.Reflection.RuntimeMethodInfo:Invoke <0x0049f>
	  at System.Reflection.MethodBase:Invoke <0x00053>
	  at Xunit.Sdk.TestInvoker`1:CallTestMethod <0x00047>
	  at <<InvokeTestMethodAsync>b__1>d:MoveNext <0x00377>
	  at System.Runtime.CompilerServices.AsyncMethodBuilderCore:Start <0x0009f>
	  at System.Runtime.CompilerServices.AsyncTaskMethodBuilder:Start <0x0002f>
	  at <>c__DisplayClass48_0:<InvokeTestMethodAsync>b__1 <0x000cf>
	  at <AggregateAsync>d__4:MoveNext <0x000c3>
	  at System.Runtime.CompilerServices.AsyncMethodBuilderCore:Start <0x0009b>
	  at Xunit.Sdk.ExecutionTimer:AggregateAsync <0x000ef>
	  at <>c__DisplayClass48_0:<InvokeTestMethodAsync>b__0 <0x00177>
	  at <RunAsync>d__9:MoveNext <0x00067>
	  at System.Runtime.CompilerServices.AsyncMethodBuilderCore:Start <0x00093>
	  at Xunit.Sdk.ExceptionAggregator:RunAsync <0x000eb>
	  at <InvokeTestMethodAsync>d__48:MoveNext <0x0028b>
	  at System.Runtime.CompilerServices.AsyncMethodBuilderCore:Start <0x000a7>
	  at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start <0x0002f>
	  at Xunit.Sdk.TestInvoker`1:InvokeTestMethodAsync <0x00117>
	  at Xunit.Sdk.XunitTestInvoker:InvokeTestMethodAsync <0x00127>
	  at <<RunAsync>b__47_0>d:MoveNext <0x00637>
	  at System.Runtime.CompilerServices.AsyncMethodBuilderCore:Start <0x000af>
	  at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start <0x0002f>
	  at Xunit.Sdk.TestInvoker`1:<RunAsync>b__47_0 <0x000d7>
	  at <RunAsync>d__10`1:MoveNext <0x00073>
	  at System.Runtime.CompilerServices.AsyncMethodBuilderCore:Start <0x00093>
	  at Xunit.Sdk.ExceptionAggregator:RunAsync <0x000eb>
	  at Xunit.Sdk.TestInvoker`1:RunAsync <0x00103>
	  at Xunit.Sdk.XunitTestRunner:InvokeTestMethodAsync <0x000cb>
	  at <InvokeTestAsync>d__4:MoveNext <0x001c3>
	  at System.Runtime.CompilerServices.AsyncMethodBuilderCore:Start <0x000a3>
	  at Xunit.Sdk.XunitTestRunner:InvokeTestAsync <0x000f3>
	  at <>c__DisplayClass43_0:<RunAsync>b__0 <0x00043>
	  at <RunAsync>d__10`1:MoveNext <0x00083>
	  at System.Runtime.CompilerServices.AsyncMethodBuilderCore:Start <0x0009f>
	  at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start <0x0002f>
	  at Xunit.Sdk.ExceptionAggregator:RunAsync <0x00117>
	  at <RunAsync>d__43:MoveNext <0x0048b>
	  at System.Runtime.CompilerServices.AsyncMethodBuilderCore:Start <0x000af>
	  at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start <0x0002f>
	  at Xunit.Sdk.TestRunner`1:RunAsync <0x000d7>
	  at <RunTestAsync>d__11:MoveNext <0x001eb>
	  at System.Runtime.CompilerServices.AsyncMethodBuilderCore:Start <0x000b3>
	  at Xunit.Sdk.XunitTheoryTestCaseRunner:RunTestAsync <0x0009f>
	  at <RunAsync>d__19:MoveNext <0x00307>
	  at System.Runtime.CompilerServices.AsyncMethodBuilderCore:Start <0x000a7>
	  at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start <0x0002f>
	  at Xunit.Sdk.TestCaseRunner`1:RunAsync <0x000d3>
	  at Xunit.Sdk.XunitTheoryTestCase:RunAsync <0x000ab>
	  at Xunit.Sdk.XunitTestMethodRunner:RunTestCaseAsync <0x000a3>
	  at <RunTestCasesAsync>d__32:MoveNext <0x001cb>
	  at System.Runtime.CompilerServices.AsyncMethodBuilderCore:Start <0x000af>
	  at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start <0x0002f>
	  at Xunit.Sdk.TestMethodRunner`1:RunTestCasesAsync <0x000d7>
	  at <RunAsync>d__31:MoveNext <0x0019f>
	  at System.Runtime.CompilerServices.AsyncMethodBuilderCore:Start <0x0009f>
	  at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start <0x0002f>
	  at Xunit.Sdk.TestMethodRunner`1:RunAsync <0x000cf>
	  at Xunit.Sdk.XunitTestClassRunner:RunTestMethodAsync <0x000df>
	  at <RunTestMethodsAsync>d__38:MoveNext <0x007d3>
	  at System.Runtime.CompilerServices.AsyncMethodBuilderCore:Start <0x000b7>
	  at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start <0x0002f>
	  at Xunit.Sdk.TestClassRunner`1:RunTestMethodsAsync <0x000db>
	  at <RunAsync>d__37:MoveNext <0x00327>
	  at System.Runtime.CompilerServices.AsyncMethodBuilderCore:Start <0x000a7>
	  at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start <0x0002f>
	  at Xunit.Sdk.TestClassRunner`1:RunAsync <0x000d3>
	  at Xunit.Sdk.XunitTestCollectionRunner:RunTestClassAsync <0x000e3>
	  at <RunTestClassesAsync>d__28:MoveNext <0x003e7>
	  at System.Runtime.CompilerServices.AsyncMethodBuilderCore:Start <0x000af>
	  at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start <0x0002f>
	  at Xunit.Sdk.TestCollectionRunner`1:RunTestClassesAsync <0x000d7>
	  at <RunAsync>d__27:MoveNext <0x00327>
	  at System.Runtime.CompilerServices.AsyncMethodBuilderCore:Start <0x000a7>
	  at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start <0x0002f>
	  at Xunit.Sdk.TestCollectionRunner`1:RunAsync <0x000d3>
	  at Xunit.Sdk.XunitTestAssemblyRunner:RunTestCollectionAsync <0x000af>
	  at <>c__DisplayClass14_2:<RunTestCollectionsAsync>b__2 <0x0006f>
	  at System.Threading.Tasks.Task`1:InnerInvoke <0x0006f>
	  at <>c:<.cctor>b__273_0 <0x0003b>
	  at System.Threading.ExecutionContext:RunInternal <0x000bf>
	  at System.Threading.Tasks.Task:ExecuteWithThreadLocal <0x00253>
	  at System.Threading.Tasks.Task:ExecuteEntry <0x000bb>
	  at <>c:<.cctor>b__8_0 <0x00067>
	  at Xunit.Sdk.MaxConcurrencySyncContext:RunOnSyncContext <0x0004f>
	  at <>c__DisplayClass11_0:<WorkerThreadProc>b__0 <0x00053>
	  at System.Threading.ExecutionContext:RunInternal <0x000bf>
	  at System.Threading.ExecutionContext:Run <0x00047>
	  at System.Object:lambda_method2 <0x0008b>
	  at Xunit.Sdk.ExecutionContextHelper:Run <0x00063>
	  at Xunit.Sdk.MaxConcurrencySyncContext:WorkerThreadProc <0x00233>
	  at <>c:<QueueUserWorkItem>b__5_0 <0x00077>
	  at System.Threading.Tasks.Task:InnerInvoke <0x000b7>
	  at <>c:<.cctor>b__273_0 <0x0003b>
	  at System.Threading.ExecutionContext:RunInternal <0x000bf>
	  at System.Threading.Tasks.Task:ExecuteWithThreadLocal <0x00253>
	  at System.Threading.Tasks.Task:ExecuteEntryUnsafe <0x000ab>
	  at <>c:<.cctor>b__10_0 <0x0006b>
	  at System.Threading.Thread:StartCallback <0x00127>
	  at System.Object:runtime_invoke_void__this__ <0x00087>
=================================================================
./RunTests.sh: line 168:    24 Aborted                 (core dumped) "$RUNTIME_PATH/dotnet" exec --runtimeconfig System.Text.Json.Tests.runtimeconfig.json --depsfile System.Text.Json.Tests.deps.json xunit.console.dll System.Text.Json.Tests.dll -xml testResults.xml -nologo -nocolor -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing $RSP_FILE
/root/helix/work/workitem/e
----- end Mon Jun 27 12:14:00 UTC 2022 ----- 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.
ulimit -c value: unlimited
[77794.111416] docker0: port 1(vethba1ff7a) entered blocking state
[77794.111420] docker0: port 1(vethba1ff7a) entered forwarding state
[77799.226106] docker0: port 1(vethba1ff7a) entered disabled state
[77799.226544] vethe3843bb: renamed from eth0
[77799.375815] docker0: port 1(vethba1ff7a) entered disabled state
[77799.380939] device vethba1ff7a left promiscuous mode
[77799.380945] docker0: port 1(vethba1ff7a) entered disabled state
[77847.696636] docker0: port 1(vethc05686b) entered blocking state
[77847.696641] docker0: port 1(vethc05686b) entered disabled state
[77847.696941] device vethc05686b entered promiscuous mode
[77847.697467] IPv6: ADDRCONF(NETDEV_UP): vethc05686b: link is not ready
[77848.101650] eth0: renamed from vethc21988b
[77848.217065] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[77848.222876] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[77848.222895] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[77848.222934] IPv6: ADDRCONF(NETDEV_CHANGE): vethc05686b: link becomes ready
[77848.223014] docker0: port 1(vethc05686b) entered blocking state
[77848.223018] docker0: port 1(vethc05686b) entered forwarding state
[77855.363781] docker0: port 1(vethc05686b) entered disabled state
[77855.364055] vethc21988b: renamed from eth0
[77855.523023] docker0: port 1(vethc05686b) entered disabled state
[77855.528379] device vethc05686b left promiscuous mode
[77855.528384] docker0: port 1(vethc05686b) entered disabled state
[77865.481486] docker0: port 1(veth6977aca) entered blocking state
[77865.481491] docker0: port 1(veth6977aca) entered disabled state
[77865.481737] device veth6977aca entered promiscuous mode
[77865.482040] IPv6: ADDRCONF(NETDEV_UP): veth6977aca: link is not ready
[77865.887698] eth0: renamed from vethd58ab5f
[77866.005578] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[77866.011852] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[77866.011869] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[77866.011908] IPv6: ADDRCONF(NETDEV_CHANGE): veth6977aca: link becomes ready
[77866.011986] docker0: port 1(veth6977aca) entered blocking state
[77866.011990] docker0: port 1(veth6977aca) entered forwarding state
[77872.712393] docker0: port 1(veth6977aca) entered disabled state
[77872.712609] vethd58ab5f: renamed from eth0
[77872.892066] docker0: port 1(veth6977aca) entered disabled state
[77872.897450] device veth6977aca left promiscuous mode
[77872.897456] docker0: port 1(veth6977aca) entered disabled state
[77893.885937] docker0: port 1(veth6dbece7) entered blocking state
[77893.885942] docker0: port 1(veth6dbece7) entered disabled state
[77893.886285] device veth6dbece7 entered promiscuous mode
[77893.886783] IPv6: ADDRCONF(NETDEV_UP): veth6dbece7: link is not ready
[77894.311948] eth0: renamed from veth375a1ea
[77894.428355] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[77894.434330] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[77894.434346] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[77894.434384] IPv6: ADDRCONF(NETDEV_CHANGE): veth6dbece7: link becomes ready
[77894.434466] docker0: port 1(veth6dbece7) entered blocking state
[77894.434469] docker0: port 1(veth6dbece7) entered forwarding state
Waiting a few seconds for any dump to be written..
cat /proc/sys/kernel/core_pattern: /home/helixbot/dotnetbuild/dumps/core.%u.%p
cat /proc/sys/kernel/core_uses_pid: 0
cat: /proc/sys/kernel/coredump_filter: No such file or directory
cat /proc/sys/kernel/coredump_filter:
Looking around for any Linux dump..
... found no dump in /root/helix/work/workitem/e
+ export _commandExitCode=134
+ python /root/helix/work/correlation/reporter/run.py https://dev.azure.com/dnceng/ public 48695600 eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Im9PdmN6NU1fN3AtSGpJS2xGWHo5M3VfVjBabyJ9.eyJuYW1laWQiOiJlNDI4NWM4Yy0zZmQ1LTQyNjctOWIxYy00MjE5NWM0N2E1NTMiLCJzY3AiOiJhcHBfdG9rZW4iLCJhdWkiOiJiZTJhY2YyYy1kMjdlLTRkMWUtYWQ4OC1lOTNiYmI5MmNmNjgiLCJzaWQiOiJiYmQ3N2FlOS1hZWFjLTRlNzQtODlhZS1lOTUzOTc5NWZiMTYiLCJCdWlsZElkIjoiOWVlNmQ0NzgtZDI4OC00N2Y3LWFhY2MtZjZlNmQwODJhZTZkOzE4NDY4MzMiLCJwcGlkIjoidnN0ZnM6Ly8vQnVpbGQvQnVpbGQvMTg0NjgzMyIsIm9yY2hpZCI6IjQwOGJhNTg4LWEyMTUtNDI0MC1hZmY3LWQ1NTZmYmY5OTczYi5saWJyYXJpZXNfdGVzdF9ydW5fcmVsZWFzZV9tb25vX2xpbnV4X2FybTY0X2RlYnVnLl9fZGVmYXVsdCIsImlzcyI6ImFwcC52c3Rva2VuLnZpc3VhbHN0dWRpby5jb20iLCJhdWQiOiJhcHAudnN0b2tlbi52aXN1YWxzdHVkaW8uY29tfHZzbzpiNTVkZTRlZC00YjVhLTQyMTUtYThlNC0wYTBhNWY3MWU3ZDgiLCJuYmYiOjE2NTYzMjg1NjMsImV4cCI6MTY1NjMzODc2M30.DKaAWO_fLkagjUCGYYQkBOJh4afAItjcgGvWGsXYTdrqCpLsds7oDVfupfI7TjzynfdMJQEGW9JDQyACrjnfDzIAYUX4a8Z_Yjof597i9FEg4NGd3GcslBsccpWgEkLk-7A99CAzwkIgQfVPnjkF0DXfp2JIYZ4tH0F5ERh57m52-L7lz1TpsPdwgjhXtcAZR24FF-JinGPjoRFVHX0IoLV5TYAjq9IX9ZM4yRO298GErQkmejGM_Sx9Uqwoncmgr21r13Ptlb6KwIpihAz7NJTJvN4CfwXt_Ho0251VEBUAVUjz3zl7tO6M0-cXxGBTC9GZ9umkMoIUe4wH7zSFPw
2022-06-27T12:14:12.413Z	INFO   	run.py	run(48)	main	Beginning reading of test results.
2022-06-27T12:14:12.414Z	INFO   	run.py	__init__(42)	read_results	Searching '/root/helix/work/workitem/e' for test results files
2022-06-27T12:14:12.415Z	INFO   	run.py	__init__(42)	read_results	Searching '/root/helix/work/workitem/uploads' for test results files
2022-06-27T12:14:12.416Z	WARNING	run.py	__init__(55)	read_results	No results file found in any of the following formats: xunit, junit, trx
2022-06-27T12:14:12.417Z	INFO   	run.py	packing_test_reporter(30)	report_results	Packing 0 test reports to '/root/helix/work/workitem/e/__test_report.json'
2022-06-27T12:14:12.417Z	INFO   	run.py	packing_test_reporter(33)	report_results	Packed 1437 bytes
+ exit 134
+ export _commandExitCode=134
+ chmod -R 777 /home/helixbot/dotnetbuild/dumps
+ exit 134

[END EXECUTION]
Exit Code:134

krwq added a commit that referenced this issue Jun 27, 2022
)

* Argument tests for CreateJsonTypeInfo and CreateJsonPropertyInfo

* add check for typeof(void) - possibly workaround #71339
@steveisok steveisok removed the untriaged New issue has not been triaged by the area owner label Jun 27, 2022
@eiriktsarpalis
Copy link
Member

It seems like it might be possible to isolate this in a standalone reproduction that doesn't use json components?

@ghost
Copy link

ghost commented Jun 27, 2022

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

Issue Details

One of the types from the test below is crashing the mono runtime in #71324 (most likely typeof(void))

Specific commit affected
39b0578

Relevant code:

[Theory]
[InlineData(typeof(void))]
[InlineData(typeof(Dictionary<,>))]
[InlineData(typeof(List<>))]
[InlineData(typeof(Nullable<>))]
[InlineData(typeof(int*))]
[InlineData(typeof(RefStruct))]
public static void CreateJsonTypeInfoWithInappropriateTypeThrows(Type type)
{
    Assert.Throws<ArgumentException>(() => JsonTypeInfo.CreateJsonTypeInfo(type, new JsonSerializerOptions()));
}

// JsonTypeInfo.CreateJsonTypeInfo:
if (IsInvalidForSerialization(type)) // it seems it passed the check in the repro
{
    ThrowHelper.ThrowArgumentException_CannotSerializeInvalidType(nameof(type), type, null, null);
}

s_createJsonTypeInfo ??= typeof(JsonTypeInfo).GetMethod(nameof(CreateJsonTypeInfo), new Type[] { typeof(JsonSerializerOptions) })!;
return (JsonTypeInfo)s_createJsonTypeInfo.MakeGenericMethod(type)
    .Invoke(null, new object[] { options })!;

cc: @steveisok @fanyang-mono

Author: krwq
Assignees: -
Labels:

area-System.Reflection, Mono

Milestone: -

@krwq
Copy link
Member Author

krwq commented Jun 28, 2022

MakeGenericMethod + typeof(void)

@marek-safar marek-safar added area-VM-reflection-mono Reflection issues specific to MonoVM and removed area-System.Reflection Mono labels Jun 28, 2022
@marek-safar marek-safar added this to the 7.0.0 milestone Jun 28, 2022
@SamMonoRT SamMonoRT modified the milestones: 7.0.0, 8.0.0 Aug 10, 2022
@SamMonoRT SamMonoRT modified the milestones: 8.0.0, 9.0.0 Jul 25, 2023
@ivanpovazan ivanpovazan modified the milestones: 9.0.0, Future Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-VM-reflection-mono Reflection issues specific to MonoVM
Projects
None yet
Development

No branches or pull requests

6 participants