Skip to content

[mono] LLVM JIT on arm64 crashes due to an assertion failure if LLVM assertions are enabled #46881

Open
@imhameed

Description

@imhameed

Crash info:

corerun: /home/imhameed/ms/llvm-9.x/llvm-project/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp:401: void llvm::RuntimeDyldELF::resolveAArch64Relocation(const llvm::SectionEntry &, uint64_t, uint64_t, uint32_t, int64_t): Assertion `static_cast<int64_t>(Result) >= INT32_MIN && static_cast<int64_t>(Result) <= UINT32_MAX' failed.

=================================================================
»       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:
=================================================================
»       0xffffb83872dc - Unknown

=================================================================
»       Telemetry Dumper:
=================================================================
Pkilling 0x281473727881680x from 0x281473802608576x
Entering thread summarizer pause from 0x281473802608576x
Could not exec mono-hang-watchdog, expected on path '/home/imhameed/ms/dnr-9.x/runtime/artifacts/obj/mono/Linux.arm64.Release/out/etc/../bin/mono-hang-watchdog' (errno 2)
Finished thread summarizer pause from 0x281473802608576x.
Failed to create breadcrumb file (null)/crash_hash_0x0

Waiting for dumping threads to resume

=================================================================
»       External Debugger Dump:
=================================================================
[New LWP 23998]
[New LWP 23999]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1".
0x0000ffffba426d5c in __waitpid (pid=<optimized out>, stat_loc=0xffffcffd0da4, options=<optimized out>) at ../sysdeps/unix/sysv/linux/waitpid.c:30
30»     ../sysdeps/unix/sysv/linux/waitpid.c: No such file or directory.
  Id   Target Id         Frame·
* 1    Thread 0xffffba049fc0 (LWP 23996) "corerun" 0x0000ffffba426d5c in __waitpid (pid=<optimized out>, stat_loc=0xffffcffd0da4, options=<optimized out>) at ../sysdeps/unix/sysv/linux/waitpid.c:30
  2    Thread 0xffffb73ff1d0 (LWP 23998) "SGen worker" 0x0000ffffba4222a4 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0xffffba00d4e0 <work_cond+40>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  3    Thread 0xffffb59061d0 (LWP 23999) "corerun" 0x0000ffffba111e28 in __GI___poll (fds=0xffffb0003a60, nfds=281473792771112, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:41

Thread 3 (Thread 0xffffb59061d0 (LWP 23999)):
#0  0x0000ffffba111e28 in __GI___poll (fds=0xffffb0003a60, nfds=281473792771112, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:41
#1  0x0000ffffb82a648c in ds_ipc_poll (poll_handles_data=0xffffb00031f0, poll_handles_data_len=1, timeout_ms=4294967295, callback=0xffffb82a5c0c <server_warning_callback>) at /home/imhameed/ms/dnr-9.x/runtime/src/native/eventpipe/ds-ipc-posix.c:422
#2  0x0000ffffb82a45d4 in ds_ipc_stream_factory_get_next_available_stream (callback=0xffffb82a5c0c <server_warning_callback>) at /home/imhameed/ms/dnr-9.x/runtime/src/native/eventpipe/ds-ipc.c:367
#3  0x0000ffffb82a30e0 in server_thread (data=<optimized out>) at /home/imhameed/ms/dnr-9.x/runtime/src/native/eventpipe/ds-server.c:124
#4  0x0000ffffb82a5be4 in ep_rt_thread_mono_start_func (data=0xaaaaeb4ae390) at /home/imhameed/ms/dnr-9.x/runtime/src/mono/mono/mini/../eventpipe/ep-rt-mono.h:1311
#5  0x0000ffffba41c088 in start_thread (arg=0xffffcffd3d5f) at pthread_create.c:463
#6  0x0000ffffba11affc in thread_start () at ../sysdeps/unix/sysv/linux/aarch64/clone.S:78

Thread 2 (Thread 0xffffb73ff1d0 (LWP 23998)):
#0  0x0000ffffba4222a4 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0xffffba00d4e0 <work_cond+40>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1  __pthread_cond_wait_common (abstime=0x0, mutex=0xffffba00d488 <lock>, cond=0xffffba00d4b8 <work_cond>) at pthread_cond_wait.c:502
#2  __pthread_cond_wait (cond=0xffffba00d4b8 <work_cond>, mutex=0xffffba00d488 <lock>) at pthread_cond_wait.c:655
#3  0x0000ffffb828bd44 in mono_os_cond_wait (cond=0xffffba00d4e0 <work_cond+40>, mutex=<optimized out>) at /home/imhameed/ms/dnr-9.x/runtime/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 /home/imhameed/ms/dnr-9.x/runtime/src/mono/mono/sgen/sgen-thread-pool.c:167
#5  thread_func (data=0x0) at /home/imhameed/ms/dnr-9.x/runtime/src/mono/mono/sgen/sgen-thread-pool.c:198
#6  0x0000ffffba41c088 in start_thread (arg=0xffffcffd3d5f) at pthread_create.c:463
#7  0x0000ffffba11affc in thread_start () at ../sysdeps/unix/sysv/linux/aarch64/clone.S:78

Thread 1 (Thread 0xffffba049fc0 (LWP 23996)):
#0  0x0000ffffba426d5c in __waitpid (pid=<optimized out>, stat_loc=0xffffcffd0da4, options=<optimized out>) at ../sysdeps/unix/sysv/linux/waitpid.c:30
#1  0x0000ffffb83874bc in dump_native_stacktrace (signal=<optimized out>, mctx=<optimized out>) at /home/imhameed/ms/dnr-9.x/runtime/src/mono/mono/mini/mini-posix.c:1060
#2  mono_dump_native_crash_info (signal=<optimized out>, mctx=<optimized out>, info=<optimized out>) at /home/imhameed/ms/dnr-9.x/runtime/src/mono/mono/mini/mini-posix.c:1104
#3  0x0000ffffb834645c in mono_handle_native_crash (signal=0xffffb96e153e "SIGABRT", mctx=0xffffcffd1900, info=0xffffcffd1c50) at /home/imhameed/ms/dnr-9.x/runtime/src/mono/mono/mini/mini-exceptions.c:3451
#4  0x0000ffffb838687c in sigabrt_signal_handler (_dummy=6, _info=0xffffcffd1c50, context=0xffffcffd1cd0) at /home/imhameed/ms/dnr-9.x/runtime/src/mono/mono/mini/mini-posix.c:234
#5  <signal handler called>
#6  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#7  0x0000ffffba07e8d4 in __GI_abort () at abort.c:79
#8  0x0000ffffba076b84 in __assert_fail_base (fmt=0xffffba171c10 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0xffffb9c08288 "static_cast<int64_t>(Result) >= INT32_MIN && static_cast<int64_t>(Result) <= UINT32_MAX", file=file@entry=0xffffb9c07f62 "/home/imhameed/ms/llvm-9.x/llvm-project/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp", line=line@entry=401, function=function@entry=0xffffb9c081d0 "void llvm::RuntimeDyldELF::resolveAArch64Relocation(const llvm::SectionEntry &, uint64_t, uint64_t, uint32_t, int64_t)") at assert.c:92
#9  0x0000ffffba076c04 in __GI___assert_fail (assertion=0xffffb9c08288 "static_cast<int64_t>(Result) >= INT32_MIN && static_cast<int64_t>(Result) <= UINT32_MAX", file=0xffffb9c07f62 "/home/imhameed/ms/llvm-9.x/llvm-project/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp", line=401, function=0xffffb9c081d0 "void llvm::RuntimeDyldELF::resolveAArch64Relocation(const llvm::SectionEntry &, uint64_t, uint64_t, uint32_t, int64_t)") at assert.c:101
#10 0x0000ffffb8fe6d00 in llvm::RuntimeDyldELF::resolveAArch64Relocation(llvm::SectionEntry const&, unsigned long, unsigned long, unsigned int, long) () from /home/imhameed/ms/dnr-9.x/runtime/artifacts/tests/coreclr/Linux.arm64.Release/Tests/Core_Root/libcoreclr.so
#11 0x0000ffffb8fd7580 in llvm::RuntimeDyldImpl::resolveLocalRelocations() () from /home/imhameed/ms/dnr-9.x/runtime/artifacts/tests/coreclr/Linux.arm64.Release/Tests/Core_Root/libcoreclr.so
#12 0x0000ffffb8fd65cc in llvm::RuntimeDyldImpl::resolveRelocations() () from /home/imhameed/ms/dnr-9.x/runtime/artifacts/tests/coreclr/Linux.arm64.Release/Tests/Core_Root/libcoreclr.so
#13 0x0000ffffb8fd65cc in llvm::RuntimeDyldImpl::resolveRelocations() () from /home/imhameed/ms/dnr-9.x/runtime/artifacts/tests/coreclr/Linux.arm64.Release/Tests/Core_Root/libcoreclr.so
#14 0x0000ffffb8fd65cc in llvm::RuntimeDyldImpl::resolveRelocations() () from /home/imhameed/ms/dnr-9.x/runtime/artifacts/tests/coreclr/Linux.arm64.Release/Tests/Core_Root/libcoreclr.so
#15 0x0000ffffb8fd65cc in llvm::RuntimeDyldImpl::resolveRelocations() () from /home/imhameed/ms/dnr-9.x/runtime/artifacts/tests/coreclr/Linux.arm64.Release/Tests/Core_Root/libcoreclr.so
#16 0x0000ffffb8fd65cc in llvm::RuntimeDyldImpl::resolveRelocations() () from /home/imhameed/ms/dnr-9.x/runtime/artifacts/tests/coreclr/Linux.arm64.Release/Tests/Core_Root/libcoreclr.so
#17 0x0000ffffb8fd65cc in llvm::RuntimeDyldImpl::resolveRelocations() () from /home/imhameed/ms/dnr-9.x/runtime/artifacts/tests/coreclr/Linux.arm64.Release/Tests/Core_Root/libcoreclr.so
#18 0x0000ffffb8fd65cc in llvm::RuntimeDyldImpl::resolveRelocations() () from /home/imhameed/ms/dnr-9.x/runtime/artifacts/tests/coreclr/Linux.arm64.Release/Tests/Core_Root/libcoreclr.so
#19 0x0000ffffb8fd65cc in llvm::RuntimeDyldImpl::resolveRelocations() () from /home/imhameed/ms/dnr-9.x/runtime/artifacts/tests/coreclr/Linux.arm64.Release/Tests/Core_Root/libcoreclr.so
#20 0x0000ffffb8fd65cc in llvm::RuntimeDyldImpl::resolveRelocations() () from /home/imhameed/ms/dnr-9.x/runtime/artifacts/tests/coreclr/Linux.arm64.Release/Tests/Core_Root/libcoreclr.so
[...]

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions