Thanks to visit codestin.com
Credit goes to github.com

Skip to content

mono and boehm #21193

@thenapster

Description

@thenapster

Steps to Reproduce

  1. Build and install mono from source
  2. Edit a hello.cs example as indicated here https://www.mono-project.com/docs/getting-started/mono-basics/
  3. mono --gc=boehm hello.exe

On which platforms did you notice this

Linux

Version Used:

mono --version
Mono JIT compiler version 6.13.0 (main/9f80a67032a mercredi 18 août 2021, 16:21:55 (UTC+0000))
Copyright (C) Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: softdebug
Interpreter: yes
LLVM: supported, not enabled.
Suspend: hybrid
GC: sgen (concurrent by default)

Stacktrace

mono --gc=boehm hello.exe 
Hello Mono World

=================================================================
	Native Crash Reporting
=================================================================
Got a SIGSEGV 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:
=================================================================
	0x557716c84149 - mono : 
	0x557716c844c9 - mono : 
	0x557716c3120f - mono : 
	0x557716bfaead - mono : 
	0x7f4eba4c9980 - /lib/x86_64-linux-gnu/libpthread.so.0 : 
	0x557716e9969b - mono : 
	0x557716ea36c0 - mono : GC_destroy_thread_local
	0x557716ea4ced - mono : GC_unregister_my_thread_inner
	0x557716eb0d64 - mono : GC_thread_exit_proc
	0x557716eb10fb - mono : GC_inner_start_routine
	0x557716ea0065 - mono : GC_call_with_stack_base
	0x7f4eba4be6db - /lib/x86_64-linux-gnu/libpthread.so.0 : 
	0x7f4eb9fcf71f - /lib/x86_64-linux-gnu/libc.so.6 : clone

=================================================================
	Telemetry Dumper:
=================================================================
Thread 0x7f4eb5d5a700 starting summarize_execute
Pkilling 0x7f4ebb2a7780 from 0x7f4eb5d5a700
Entering thread summarizer pause from 0x7f4eb5f5b700
Finished thread summarizer pause from 0x7f4eb5f5b700.
domain required for stack walkFailed to create breadcrumb file (null)/crash_hash_0x0
Waiting on threads to park on joinable thread list timed out.
Waiting for dumping threads to resume

=================================================================
	External Debugger Dump:
=================================================================
[New LWP 5421]
[New LWP 5422]
[New LWP 5423]
[New LWP 5424]
[New LWP 5425]
[New LWP 5426]
[New LWP 5427]
[New LWP 5428]
[New LWP 5429]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
0x00007f4eba4bfd2d in __GI___pthread_timedjoin_ex (threadid=threadid@entry=139976034854656, thread_return=thread_return@entry=0x7ffd8629df20, abstime=abstime@entry=0x0, block=block@entry=true) at pthread_join_common.c:89
89	pthread_join_common.c: No such file or directory.
  Id   Target Id         Frame 
* 1    Thread 0x7f4ebb2a7780 (LWP 5420) "mono-boehm" 0x00007f4eba4bfd2d in __GI___pthread_timedjoin_ex (threadid=threadid@entry=139976034854656, thread_return=thread_return@entry=0x7ffd8629df20, abstime=abstime@entry=0x0, block=block@entry=true) at pthread_join_common.c:89
  2    Thread 0x7f4eb9bce700 (LWP 5421) "mono-boehm" 0x00007f4eba4c4ad3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55771720956c <mark_cv+44>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  3    Thread 0x7f4eb93cd700 (LWP 5422) "mono-boehm" 0x00007f4eba4c4ad3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55771720956c <mark_cv+44>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  4    Thread 0x7f4eb8bcc700 (LWP 5423) "mono-boehm" 0x00007f4eba4c4ad3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55771720956c <mark_cv+44>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  5    Thread 0x7f4eb83cb700 (LWP 5424) "mono-boehm" 0x00007f4eba4c4ad3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55771720956c <mark_cv+44>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  6    Thread 0x7f4eb7bca700 (LWP 5425) "mono-boehm" 0x00007f4eba4c4ad3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55771720956c <mark_cv+44>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  7    Thread 0x7f4eb73c9700 (LWP 5426) "mono-boehm" 0x00007f4eba4c4ad3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55771720956c <mark_cv+44>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  8    Thread 0x7f4eb6bc8700 (LWP 5427) "mono-boehm" 0x00007f4eba4c4ad3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55771720956c <mark_cv+44>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
  9    Thread 0x7f4eb5f5b700 (LWP 5428) "Crash Report Le" 0x00007f4eba4c77c6 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=0, futex_word=0x557717206210 <summarizer_leader_data+16>) at ../sysdeps/unix/sysv/linux/futex-internal.h:205
  10   Thread 0x7f4eb5d5a700 (LWP 5429) "Finalizer" (Exiting) 0x00007f4eba4c932a in __waitpid (pid=pid@entry=5431, stat_loc=stat_loc@entry=0x7f4eb5d58954, options=options@entry=0) at ../sysdeps/unix/sysv/linux/waitpid.c:30

Thread 10 (Thread 0x7f4eb5d5a700 (LWP 5429)):
#0  0x00007f4eba4c932a in __waitpid (pid=pid@entry=5431, stat_loc=stat_loc@entry=0x7f4eb5d58954, options=options@entry=0) at ../sysdeps/unix/sysv/linux/waitpid.c:30
#1  0x0000557716c843a2 in dump_native_stacktrace (signal=signal@entry=0x557716f78c88 "SIGSEGV", mctx=mctx@entry=0x7f4eb5d59520) at mini-posix.c:1075
#2  0x0000557716c844c9 in mono_dump_native_crash_info (signal=signal@entry=0x557716f78c88 "SIGSEGV", mctx=mctx@entry=0x7f4eb5d59520, info=info@entry=0x7f4eb5d597f0) at mini-posix.c:1119
#3  0x0000557716c3120f in mono_handle_native_crash (signal=0x557716f78c88 "SIGSEGV", mctx=mctx@entry=0x7f4eb5d59520, info=info@entry=0x7f4eb5d597f0) at mini-exceptions.c:3468
#4  0x0000557716bfaead in mono_sigsegv_signal_handler_debug (_dummy=11, _info=0x7f4eb5d597f0, context=0x7f4eb5d596c0, debug_fault_addr=<optimized out>) at mini-runtime.c:3611
#5  <signal handler called>
#6  return_single_freelist (gfl=0x55771724f2f0 <GC_arrays+2256>, fl=0x1000) at extra/../thread_local_alloc.c:48
#7  return_freelists (fl=fl@entry=0x7f4ebb1b95a8, gfl=gfl@entry=0x55771724f2e0 <GC_arrays+2240>) at extra/../thread_local_alloc.c:64
#8  0x0000557716ea36c0 in GC_destroy_thread_local (p=p@entry=0x7f4ebb1b95a8) at extra/../thread_local_alloc.c:137
#9  0x0000557716ea4ced in GC_unregister_my_thread_inner (me=0x7f4ebb1b9540) at extra/../pthread_support.c:1476
#10 0x0000557716eb0d64 in GC_thread_exit_proc (arg=0x7f4ebb1b9540) at extra/../pthread_support.c:1538
#11 0x0000557716eb10fb in GC_inner_start_routine (sb=<error reading variable: value has been optimized out>, arg=<error reading variable: value has been optimized out>) at pthread_start.c:55
#12 0x0000557716ea0065 in GC_call_with_stack_base (fn=<optimized out>, arg=<optimized out>) at extra/../misc.c:2127
#13 0x00007f4eba4be6db in start_thread (arg=0x7f4eb5d5a700) at pthread_create.c:463
#14 0x00007f4eb9fcf71f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 9 (Thread 0x7f4eb5f5b700 (LWP 5428)):
#0  0x00007f4eba4c77c6 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=0, futex_word=0x557717206210 <summarizer_leader_data+16>) at ../sysdeps/unix/sysv/linux/futex-internal.h:205
#1  do_futex_wait (sem=sem@entry=0x557717206210 <summarizer_leader_data+16>, abstime=0x0) at sem_waitcommon.c:111
#2  0x00007f4eba4c78b8 in __new_sem_wait_slow (sem=sem@entry=0x557717206210 <summarizer_leader_data+16>, abstime=0x0) at sem_waitcommon.c:181
#3  0x00007f4eba4c7929 in __new_sem_wait (sem=sem@entry=0x557717206210 <summarizer_leader_data+16>) at sem_wait.c:42
#4  0x0000557716e1d116 in mono_os_sem_wait (flags=MONO_SEM_FLAGS_ALERTABLE, sem=0x557717206210 <summarizer_leader_data+16>) at ../../mono/utils/mono-os-semaphore.h:204
#5  summarizer_leader () at threads.c:6762
#6  0x0000557716e1f42c in start_wrapper_internal (stack_ptr=0x7f4eb5f5c000, start_info=0x0) at threads.c:1251
#7  start_wrapper (data=0x55771755f4d0) at threads.c:1326
#8  0x0000557716eb1092 in GC_inner_start_routine (sb=<error reading variable: value has been optimized out>, arg=<error reading variable: value has been optimized out>) at pthread_start.c:57
#9  0x0000557716ea0065 in GC_call_with_stack_base (fn=<optimized out>, arg=<optimized out>) at extra/../misc.c:2127
#10 0x00007f4eba4be6db in start_thread (arg=0x7f4eb5f5b700) at pthread_create.c:463
#11 0x00007f4eb9fcf71f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 8 (Thread 0x7f4eb6bc8700 (LWP 5427)):
#0  0x00007f4eba4c4ad3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55771720956c <mark_cv+44>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1  __pthread_cond_wait_common (abstime=0x0, mutex=0x557717209140 <mark_mutex>, cond=0x557717209540 <mark_cv>) at pthread_cond_wait.c:502
#2  __pthread_cond_wait (cond=cond@entry=0x557717209540 <mark_cv>, mutex=mutex@entry=0x557717209140 <mark_mutex>) at pthread_cond_wait.c:655
#3  0x0000557716ea7cb7 in GC_wait_marker () at extra/../pthread_support.c:2267
#4  0x0000557716ea8162 in GC_help_marker (my_mark_no=my_mark_no@entry=2) at extra/../mark.c:1247
#5  0x0000557716ea822c in GC_mark_thread (id=<optimized out>) at extra/../pthread_support.c:376
#6  0x00007f4eba4be6db in start_thread (arg=0x7f4eb6bc8700) at pthread_create.c:463
#7  0x00007f4eb9fcf71f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 7 (Thread 0x7f4eb73c9700 (LWP 5426)):
#0  0x00007f4eba4c4ad3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55771720956c <mark_cv+44>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1  __pthread_cond_wait_common (abstime=0x0, mutex=0x557717209140 <mark_mutex>, cond=0x557717209540 <mark_cv>) at pthread_cond_wait.c:502
#2  __pthread_cond_wait (cond=cond@entry=0x557717209540 <mark_cv>, mutex=mutex@entry=0x557717209140 <mark_mutex>) at pthread_cond_wait.c:655
#3  0x0000557716ea7cb7 in GC_wait_marker () at extra/../pthread_support.c:2267
#4  0x0000557716ea8162 in GC_help_marker (my_mark_no=my_mark_no@entry=2) at extra/../mark.c:1247
#5  0x0000557716ea822c in GC_mark_thread (id=<optimized out>) at extra/../pthread_support.c:376
#6  0x00007f4eba4be6db in start_thread (arg=0x7f4eb73c9700) at pthread_create.c:463
#7  0x00007f4eb9fcf71f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 6 (Thread 0x7f4eb7bca700 (LWP 5425)):
#0  0x00007f4eba4c4ad3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55771720956c <mark_cv+44>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1  __pthread_cond_wait_common (abstime=0x0, mutex=0x557717209140 <mark_mutex>, cond=0x557717209540 <mark_cv>) at pthread_cond_wait.c:502
#2  __pthread_cond_wait (cond=cond@entry=0x557717209540 <mark_cv>, mutex=mutex@entry=0x557717209140 <mark_mutex>) at pthread_cond_wait.c:655
#3  0x0000557716ea7cb7 in GC_wait_marker () at extra/../pthread_support.c:2267
#4  0x0000557716ea8162 in GC_help_marker (my_mark_no=my_mark_no@entry=2) at extra/../mark.c:1247
#5  0x0000557716ea822c in GC_mark_thread (id=<optimized out>) at extra/../pthread_support.c:376
#6  0x00007f4eba4be6db in start_thread (arg=0x7f4eb7bca700) at pthread_create.c:463
#7  0x00007f4eb9fcf71f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 5 (Thread 0x7f4eb83cb700 (LWP 5424)):
#0  0x00007f4eba4c4ad3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55771720956c <mark_cv+44>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1  __pthread_cond_wait_common (abstime=0x0, mutex=0x557717209140 <mark_mutex>, cond=0x557717209540 <mark_cv>) at pthread_cond_wait.c:502
#2  __pthread_cond_wait (cond=cond@entry=0x557717209540 <mark_cv>, mutex=mutex@entry=0x557717209140 <mark_mutex>) at pthread_cond_wait.c:655
#3  0x0000557716ea7cb7 in GC_wait_marker () at extra/../pthread_support.c:2267
#4  0x0000557716ea8162 in GC_help_marker (my_mark_no=my_mark_no@entry=2) at extra/../mark.c:1247
#5  0x0000557716ea822c in GC_mark_thread (id=<optimized out>) at extra/../pthread_support.c:376
#6  0x00007f4eba4be6db in start_thread (arg=0x7f4eb83cb700) at pthread_create.c:463
#7  0x00007f4eb9fcf71f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 4 (Thread 0x7f4eb8bcc700 (LWP 5423)):
#0  0x00007f4eba4c4ad3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55771720956c <mark_cv+44>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1  __pthread_cond_wait_common (abstime=0x0, mutex=0x557717209140 <mark_mutex>, cond=0x557717209540 <mark_cv>) at pthread_cond_wait.c:502
#2  __pthread_cond_wait (cond=cond@entry=0x557717209540 <mark_cv>, mutex=mutex@entry=0x557717209140 <mark_mutex>) at pthread_cond_wait.c:655
#3  0x0000557716ea7cb7 in GC_wait_marker () at extra/../pthread_support.c:2267
#4  0x0000557716ea8162 in GC_help_marker (my_mark_no=my_mark_no@entry=2) at extra/../mark.c:1247
#5  0x0000557716ea822c in GC_mark_thread (id=<optimized out>) at extra/../pthread_support.c:376
#6  0x00007f4eba4be6db in start_thread (arg=0x7f4eb8bcc700) at pthread_create.c:463
#7  0x00007f4eb9fcf71f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 3 (Thread 0x7f4eb93cd700 (LWP 5422)):
#0  0x00007f4eba4c4ad3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55771720956c <mark_cv+44>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1  __pthread_cond_wait_common (abstime=0x0, mutex=0x557717209140 <mark_mutex>, cond=0x557717209540 <mark_cv>) at pthread_cond_wait.c:502
#2  __pthread_cond_wait (cond=cond@entry=0x557717209540 <mark_cv>, mutex=mutex@entry=0x557717209140 <mark_mutex>) at pthread_cond_wait.c:655
#3  0x0000557716ea7cb7 in GC_wait_marker () at extra/../pthread_support.c:2267
#4  0x0000557716ea8162 in GC_help_marker (my_mark_no=my_mark_no@entry=2) at extra/../mark.c:1247
#5  0x0000557716ea822c in GC_mark_thread (id=<optimized out>) at extra/../pthread_support.c:376
#6  0x00007f4eba4be6db in start_thread (arg=0x7f4eb93cd700) at pthread_create.c:463
#7  0x00007f4eb9fcf71f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 2 (Thread 0x7f4eb9bce700 (LWP 5421)):
#0  0x00007f4eba4c4ad3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55771720956c <mark_cv+44>) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1  __pthread_cond_wait_common (abstime=0x0, mutex=0x557717209140 <mark_mutex>, cond=0x557717209540 <mark_cv>) at pthread_cond_wait.c:502
#2  __pthread_cond_wait (cond=cond@entry=0x557717209540 <mark_cv>, mutex=mutex@entry=0x557717209140 <mark_mutex>) at pthread_cond_wait.c:655
#3  0x0000557716ea7cb7 in GC_wait_marker () at extra/../pthread_support.c:2267
#4  0x0000557716ea8162 in GC_help_marker (my_mark_no=my_mark_no@entry=2) at extra/../mark.c:1247
#5  0x0000557716ea822c in GC_mark_thread (id=<optimized out>) at extra/../pthread_support.c:376
#6  0x00007f4eba4be6db in start_thread (arg=0x7f4eb9bce700) at pthread_create.c:463
#7  0x00007f4eb9fcf71f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 0x7f4ebb2a7780 (LWP 5420)):
#0  0x00007f4eba4bfd2d in __GI___pthread_timedjoin_ex (threadid=threadid@entry=139976034854656, thread_return=thread_return@entry=0x7ffd8629df20, abstime=abstime@entry=0x0, block=block@entry=true) at pthread_join_common.c:89
#1  0x00007f4eba4bfb5c in __pthread_join (threadid=threadid@entry=139976034854656, thread_return=thread_return@entry=0x7ffd8629df20) at pthread_join.c:24
#2  0x0000557716e90fbc in mono_native_thread_join (tid=tid@entry=139976034854656) at mono-threads-posix.c:337
#3  0x0000557716e1de54 in threads_native_thread_join_lock (value=<optimized out>, tid=0x7f4eb5d5a700) at threads.c:5935
#4  mono_threads_join_threads () at threads.c:6179
#5  0x0000557716e1e094 in mono_thread_cleanup () at threads.c:3660
#6  0x0000557716d50513 in mono_runtime_cleanup (domain=domain@entry=0x7f4ebb1a9d80) at appdomain.c:563
#7  0x0000557716bfe443 in mini_cleanup (domain=0x7f4ebb1a9d80) at mini-runtime.c:5088
#8  0x0000557716c05ee1 in mono_main (argc=<optimized out>, argv=<optimized out>) at driver.c:2781
#9  0x0000557716bf4bec in mono_main_with_options (argv=<optimized out>, argc=<optimized out>) at main.c:54
#10 main (argc=<optimized out>, argv=<optimized out>) at main.c:402

=================================================================
	Basic Fault Address Reporting
=================================================================
Memory around native instruction pointer (0x557716e9969b):0x557716e9968b  c1 4d 85 c9 75 0a eb 17 0f 1f 44 00 00 48 89 d1  .M..u.....D..H..
0x557716e9969b  48 8b 11 48 81 fa ff 0f 00 00 77 f1 4c 89 09 4c  H..H......w.L..L
0x557716e996ab  89 04 06 48 c7 04 07 00 10 00 00 48 83 c0 08 48  ...H.......H...H
0x557716e996bb  3d c8 00 00 00 75 b6 48 8b 0f 48 83 f9 ff 74 32  =....u.H..H...t2
Aborted (core dumped)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions