dotnet / dotnet/runtime

[mono]aot-interp crash when gc

Open
#123,573 2 comments 0 reactions 1 assignee Claimed by @BrzVlad View on GitHub
area-GC-mono
Dominant language
C#
Stars
18.3k
Forks
5.6k
PR merge metrics
PR metrics pending

Description


We only aot System.Private.CoreLib.dll with full,interp, use MONO_AOT_MONO_INTERP execute mode.
If will crash show below stacktrace: the lmf value is 0x0000000000000040 which is invalid address.

coreclr.dll!interp_mark_no_ref_slots(ThreadContext * context, MonoLMF * lmf) 行 8770 C
> coreclr.dll!interp_mark_stack(void * thread_data, void(*)(void * *, void *) func, void * gc_data, int precise) 行 8823 C
coreclr.dll!sgen_client_scan_thread_data(void * start_nursery, void * end_nursery, int precise, ScanCopyContext ctx) 行 2166 C
coreclr.dll!pin_from_roots(void * start_nursery, void * end_nursery, ScanCopyContext ctx) 行 905 C
coreclr.dll!collect_nursery(const char * reason, int is_overflow) 行 1860 C
coreclr.dll!sgen_perform_collection_inner(unsigned __int64 requested_size, int generation_to_collect, const char * reason, int forced_serial, int stw) 行 2650 C
coreclr.dll!sgen_perform_collection(unsigned __int64 requested_size, int generation_to_collect, const char * reason, int forced_serial, int stw) 行 2762 C
coreclr.dll!sgen_ensure_free_space(unsigned __int64 size, int generation) 行 2616 C
coreclr.dll!sgen_alloc_obj_nolock(MonoVTable * vtable, unsigned __int64 size) 行 280 C
coreclr.dll!mono_gc_alloc_string(MonoVTable * vtable, unsigned __int64 size, int len) 行 1208 C
System.Private.CoreLib.dll.dll!(wrapper managed-to-native) object:__icall_wrapper_mono_gc_alloc_string() C#
System.Private.CoreLib.dll.dll!(wrapper alloc) object:AllocString() C#
System.Private.CoreLib.dll.dll!string:Ctor() C#
System.Private.CoreLib.dll.dll!(wrapper managed-to-managed) string:.ctor() C#
System.Private.CoreLib.dll.dll!System.Span`1:ToString() C#
System.Private.CoreLib.dll.dll!System.Text.ValueStringBuilder:ToString() C#
System.Private.CoreLib.dll.dll!System.IO.PathHelper:Normalize() C#
System.Private.CoreLib.dll.dll!System.IO.Path:GetFullPathInternal() C#
System.Private.CoreLib.dll.dll!System.IO.Path:GetFullPath() C#
System.Private.CoreLib.dll.dll!System.IO.Enumeration.FileSystemEnumerator`1:.ctor() C#
System.Private.CoreLib.dll.dll!System.IO.Enumeration.FileSystemEnumerable`1/DelegateEnumerator:.ctor() C#
System.Private.CoreLib.dll.dll!System.IO.Enumeration.FileSystemEnumerable`1:.ctor() C#
System.Private.CoreLib.dll.dll!System.IO.Enumeration.FileSystemEnumerable`1:.ctor() C#
System.Private.CoreLib.dll.dll!System.IO.Enumeration.FileSystemEnumerableFactory:UserFiles() C#
System.Private.CoreLib.dll.dll!System.IO.Directory:InternalEnumeratePaths() C#
System.Private.CoreLib.dll.dll!System.IO.Directory:GetFiles() C#
System.Private.CoreLib.dll.dll!(wrapper other) object:gsharedvt_out_sig() C#
coreclr.dll!jit_call_cb(void * arg) 行 2624 C
coreclr.dll!do_jit_call(ThreadContext * context, stackval * ret_sp, stackval * sp, InterpFrame * frame, InterpMethod * rmethod, _MonoErrorInternal * error) 行 2946 C
coreclr.dll!mono_interp_exec_method(InterpFrame * frame, ThreadContext * context, FrameClauseArgs * clause_args) 行 4531 C
coreclr.dll!interp_entry_from_trampoline(void * ccontext_untyped, void * rmethod_untyped) 行 3322 C
coreclr.dll!mono_interp_entry_from_trampoline(void * ccontext, void * imethod) 行 4614 C
System.Private.CoreLib.dll.dll!(wrapper other) object:__interp_lmf_mono_interp_entry_from_trampoline() C#
System.Private.CoreLib.dll.dll!native_to_interp_trampoline() C#
System.Private.CoreLib.dll.dll!System.Threading.Tasks.Task:InnerInvoke() C#
System.Private.CoreLib.dll.dll!System.Threading.Tasks.Task/<>c:<.cctor>b__292_0() C#
System.Private.CoreLib.dll.dll!System.Threading.ExecutionContext:RunFromThreadPoolDispatchLoop() C#
System.Private.CoreLib.dll.dll!System.Threading.Tasks.Task:ExecuteWithThreadLocal() C#
System.Private.CoreLib.dll.dll!System.Threading.Tasks.Task:ExecuteEntryUnsafe() C#
System.Private.CoreLib.dll.dll!System.Threading.Tasks.Task:ExecuteFromThreadPool() C#
System.Private.CoreLib.dll.dll!System.Threading.ThreadPoolWorkQueue:Dispatch() C#
System.Private.CoreLib.dll.dll!System.Threading.PortableThreadPool/WorkerThread:WorkerThreadStart() C#
System.Private.CoreLib.dll.dll!System.Threading.Thread:StartCallback() C#
System.Private.CoreLib.dll.dll!(wrapper runtime-invoke) object:runtime_invoke_dynamic() C#
coreclr.dll!mono_jit_runtime_invoke(_MonoMethod * method, void * obj, void * * params, _MonoObject * * exc, _MonoErrorInternal * error) 行 3650 C
coreclr.dll!do_runtime_invoke(_MonoMethod * method, void * obj, void * * params, _MonoObject * * exc, _MonoErrorInternal * error) 行 2576 C
coreclr.dll!mono_runtime_invoke_checked(_MonoMethod * method, void * obj, void * * params, _MonoErrorInternal * error) 行 2793 C
coreclr.dll!start_wrapper_internal(StartInfo * start_info, unsigned __int64 * stack_ptr) 行 1221 C
coreclr.dll!start_wrapper(void * data) 行 1276 C

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.