[Mono-dev] crash with nunit

David Schmitt david at dasz.at
Tue Mar 25 14:44:41 UTC 2014


Hi,

I've finally updated to 3.2.8 (recompiled from debian experimental) and 
am now triggering the attached segfault approximately every second run.

For further analysis I could run this under master; try to upgrade 
nunit; try to get more debugging symbols into the package; try to reduce 
the amount of code running to trigger the problem.

The project is open source, so if that would be easier I can provide 
public repro steps too.


Please advise,

Thanks David

-------------- next part --------------

Stacktrace:


Native stacktrace:

	/usr/bin/mono() [0x4b0a1a]
	/usr/bin/mono() [0x508fcf]
	/usr/bin/mono() [0x4231c7]
	/lib/x86_64-linux-gnu/libpthread.so.0(+0xf030) [0x7fc464c80030]
	/usr/bin/mono() [0x5d0869]
	/usr/bin/mono() [0x5d1d2c]
	/usr/bin/mono() [0x5d3b65]
	/usr/bin/mono() [0x5d4182]
	/usr/bin/mono() [0x5d7677]
	/usr/bin/mono(mono_gc_collect+0x28) [0x5d7cf8]
	/usr/bin/mono() [0x59e3bb]
	/usr/bin/mono() [0x61e871]
	/usr/bin/mono() [0x62e810]
	/lib/x86_64-linux-gnu/libpthread.so.0(+0x6b50) [0x7fc464c77b50]
	/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x7fc4649c20ed]

Debug info from gdb:

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fc460cfe700 (LWP 10197)]
[New Thread 0x7fc460eff700 (LWP 10196)]
[New Thread 0x7fc4588ab700 (LWP 10174)]
[New Thread 0x7fc45a467700 (LWP 10173)]
[New Thread 0x7fc46007b700 (LWP 10171)]
[New Thread 0x7fc46013f700 (LWP 10170)]
[New Thread 0x7fc461cfd700 (LWP 10162)]
[New Thread 0x7fc461efe700 (LWP 10159)]
[New Thread 0x7fc4620ff700 (LWP 10158)]
[New Thread 0x7fc46289b700 (LWP 10157)]
0x00007fc464918824 in sigsuspend () from /lib/x86_64-linux-gnu/libc.so.6
  Id   Target Id         Frame 
  11   Thread 0x7fc46289b700 (LWP 10157) "mono" 0x00007fc464918824 in sigsuspend () from /lib/x86_64-linux-gnu/libc.so.6
  10   Thread 0x7fc4620ff700 (LWP 10158) "mono" 0x00007fc464918824 in sigsuspend () from /lib/x86_64-linux-gnu/libc.so.6
  9    Thread 0x7fc461efe700 (LWP 10159) "mono" 0x00007fc464918824 in sigsuspend () from /lib/x86_64-linux-gnu/libc.so.6
  8    Thread 0x7fc461cfd700 (LWP 10162) "mono" 0x00007fc464918824 in sigsuspend () from /lib/x86_64-linux-gnu/libc.so.6
  7    Thread 0x7fc46013f700 (LWP 10170) "mono" 0x00007fc4649c2743 in epoll_wait () from /lib/x86_64-linux-gnu/libc.so.6
  6    Thread 0x7fc46007b700 (LWP 10171) "mono" 0x00007fc464c7ecec in __lll_lock_wait () from /lib/x86_64-linux-gnu/libpthread.so.0
  5    Thread 0x7fc45a467700 (LWP 10173) "mono" 0x00007fc464918824 in sigsuspend () from /lib/x86_64-linux-gnu/libc.so.6
  4    Thread 0x7fc4588ab700 (LWP 10174) "mono" 0x00007fc464c7e511 in sem_timedwait () from /lib/x86_64-linux-gnu/libpthread.so.0
  3    Thread 0x7fc460eff700 (LWP 10196) "mono" 0x00007fc464918824 in sigsuspend () from /lib/x86_64-linux-gnu/libc.so.6
  2    Thread 0x7fc460cfe700 (LWP 10197) "mono" 0x00007fc464c7fc1d in waitpid () from /lib/x86_64-linux-gnu/libpthread.so.0
* 1    Thread 0x7fc465729780 (LWP 10156) "mono" 0x00007fc464918824 in sigsuspend () from /lib/x86_64-linux-gnu/libc.so.6

Thread 11 (Thread 0x7fc46289b700 (LWP 10157)):
#0  0x00007fc464918824 in sigsuspend () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00000000005cd42c in suspend_thread (context=0x7fc46289a900, info=0x18359f0) at sgen-os-posix.c:113
#2  suspend_handler (sig=<optimized out>, siginfo=<optimized out>, context=0x7fc46289a900) at sgen-os-posix.c:131
#3  <signal handler called>
#4  0x00007fc464c7e41e in sem_wait () from /lib/x86_64-linux-gnu/libpthread.so.0
#5  0x0000000000629ef8 in mono_sem_wait (sem=sem at entry=0x9725a0, alertable=alertable at entry=1) at mono-semaphore.c:119
#6  0x00000000005a5fa5 in finalizer_thread (unused=unused at entry=0x0) at gc.c:1073
#7  0x0000000000589ca2 in start_wrapper_internal (data=0x1839630) at threads.c:643
#8  start_wrapper (data=0x1839630) at threads.c:688
#9  0x000000000061e871 in thread_start_routine (args=args at entry=0x17bd448) at wthreads.c:294
#10 0x000000000062e810 in inner_start_thread (arg=0x18394d0) at mono-threads-posix.c:49
#11 0x00007fc464c77b50 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#12 0x00007fc4649c20ed in clone () from /lib/x86_64-linux-gnu/libc.so.6
#13 0x0000000000000000 in ?? ()

Thread 10 (Thread 0x7fc4620ff700 (LWP 10158)):
#0  0x00007fc464918824 in sigsuspend () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00000000005cd42c in suspend_thread (context=0x7fc4620fe500, info=0x1a84730) at sgen-os-posix.c:113
#2  suspend_handler (sig=<optimized out>, siginfo=<optimized out>, context=0x7fc4620fe500) at sgen-os-posix.c:131
#3  <signal handler called>
#4  0x00007fc464c7f3cb in accept () from /lib/x86_64-linux-gnu/libpthread.so.0
#5  0x0000000000615fdd in _wapi_accept (fd=3, addr=addr at entry=0x0, addrlen=addrlen at entry=0x0) at sockets.c:221
#6  0x000000000057c433 in ves_icall_System_Net_Sockets_Socket_Accept_internal (sock=<optimized out>, error=0x7fc4620fea74, blocking=<optimized out>) at socket-io.c:877
#7  0x00000000402b960c in ?? ()
#8  0x0000000001a52060 in ?? ()
#9  0x01007fc462914590 in ?? ()
#10 0x0000000001a55d40 in ?? ()
#11 0x00007fc4620feaa0 in ?? ()
#12 0x00007fc4620fe9f0 in ?? ()
#13 0x0000000000000000 in ?? ()

Thread 9 (Thread 0x7fc461efe700 (LWP 10159)):
#0  0x00007fc464918824 in sigsuspend () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00000000005cd42c in suspend_thread (context=0x7fc461efd580, info=0x1b5ddf0) at sgen-os-posix.c:113
#2  suspend_handler (sig=<optimized out>, siginfo=<optimized out>, context=0x7fc461efd580) at sgen-os-posix.c:131
#3  <signal handler called>
#4  0x00007fc464c7f8ad in nanosleep () from /lib/x86_64-linux-gnu/libpthread.so.0
#5  0x000000000061db57 in SleepEx (ms=ms at entry=3000, alertable=alertable at entry=1) at wthreads.c:842
#6  0x00000000005899fa in ves_icall_System_Threading_Thread_Sleep_internal (ms=3000) at threads.c:1224
#7  0x0000000041b7c66d in ?? ()
#8  0x0000000001b5e390 in ?? ()
#9  0x00007fc4613b6310 in ?? ()
#10 0x0000000001a55d40 in ?? ()
#11 0x00007fc461efdb40 in ?? ()
#12 0x00007fc461efda30 in ?? ()
#13 0x0000000000000000 in ?? ()

Thread 8 (Thread 0x7fc461cfd700 (LWP 10162)):
#0  0x00007fc464918824 in sigsuspend () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00000000005cd42c in suspend_thread (context=0x7fc461cfb840, info=0x1b997c0) at sgen-os-posix.c:113
#2  suspend_handler (sig=<optimized out>, siginfo=<optimized out>, context=0x7fc461cfb840) at sgen-os-posix.c:131
#3  <signal handler called>
#4  0x00007fc464c7c64b in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#5  0x0000000000607a2f in _wapi_handle_timedwait_signal_handle (handle=handle at entry=0x2072, timeout=timeout at entry=0x7fc461cfbda0, alertable=alertable at entry=1, poll=poll at entry=0) at handles.c:1586
#6  0x000000000061b7d6 in WaitForSingleObjectEx (handle=handle at entry=0x2072, timeout=timeout at entry=30000, alertable=alertable at entry=1) at wait.c:198
#7  0x00000000005898ee in ves_icall_System_Threading_Thread_Join_internal (this=0x7fc455641350, ms=30000, thread=0x2072) at threads.c:1426
#8  0x00000000407ae269 in ?? ()
#9  0x00007fc461cfc350 in ?? ()
#10 0x00007fc463d37c20 in ?? ()
#11 0x00007fc45d193530 in ?? ()
#12 0x00007fc461cfbf60 in ?? ()
#13 0x00007fc461cfbe70 in ?? ()
#14 0x0000000000000000 in ?? ()

Thread 7 (Thread 0x7fc46013f700 (LWP 10170)):
#0  0x00007fc4649c2743 in epoll_wait () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x000000000058c794 in tp_epoll_wait (p=p at entry=0x9720a0) at ../../mono/metadata/tpool-epoll.c:118
#2  0x0000000000589ca2 in start_wrapper_internal (data=0x3380790) at threads.c:643
#3  start_wrapper (data=0x3380790) at threads.c:688
#4  0x000000000061e871 in thread_start_routine (args=args at entry=0x17c0580) at wthreads.c:294
#5  0x000000000062e810 in inner_start_thread (arg=0x3370270) at mono-threads-posix.c:49
#6  0x00007fc464c77b50 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#7  0x00007fc4649c20ed in clone () from /lib/x86_64-linux-gnu/libc.so.6
#8  0x0000000000000000 in ?? ()

Thread 6 (Thread 0x7fc46007b700 (LWP 10171)):
#0  0x00007fc464c7ecec in __lll_lock_wait () from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007fc464c7a339 in _L_lock_926 () from /lib/x86_64-linux-gnu/libpthread.so.0
#2  0x00007fc464c7a15b in pthread_mutex_lock () from /lib/x86_64-linux-gnu/libpthread.so.0
#3  0x00000000005d8332 in mono_gc_set_skip_thread (skip=skip at entry=0) at sgen-gc.c:5631
#4  0x000000000058badb in check_for_interruption_critical () at threadpool.c:1424
#5  0x000000000058e437 in async_invoke_thread (data=0x0, data at entry=0x972120) at threadpool.c:1569
#6  0x0000000000589ca2 in start_wrapper_internal (data=0x338c150) at threads.c:643
#7  start_wrapper (data=0x338c150) at threads.c:688
#8  0x000000000061e871 in thread_start_routine (args=args at entry=0x17c0710) at wthreads.c:294
#9  0x000000000062e810 in inner_start_thread (arg=0x337f100) at mono-threads-posix.c:49
#10 0x00007fc464c77b50 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#11 0x00007fc4649c20ed in clone () from /lib/x86_64-linux-gnu/libc.so.6
#12 0x0000000000000000 in ?? ()

Thread 5 (Thread 0x7fc45a467700 (LWP 10173)):
#0  0x00007fc464918824 in sigsuspend () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00000000005cd42c in suspend_thread (context=0x7fc45a4668c0, info=0x2522b10) at sgen-os-posix.c:113
#2  suspend_handler (sig=<optimized out>, siginfo=<optimized out>, context=0x7fc45a4668c0) at sgen-os-posix.c:131
#3  <signal handler called>
#4  0x00007fc464c7f8ad in nanosleep () from /lib/x86_64-linux-gnu/libpthread.so.0
#5  0x000000000061db57 in SleepEx (ms=ms at entry=500, alertable=alertable at entry=1) at wthreads.c:842
#6  0x000000000058b823 in monitor_thread (unused=unused at entry=0x0) at threadpool.c:779
#7  0x0000000000589ca2 in start_wrapper_internal (data=0x33ee900) at threads.c:643
#8  start_wrapper (data=0x33ee900) at threads.c:688
#9  0x000000000061e871 in thread_start_routine (args=args at entry=0x17c0968) at wthreads.c:294
#10 0x000000000062e810 in inner_start_thread (arg=0x33ff050) at mono-threads-posix.c:49
#11 0x00007fc464c77b50 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#12 0x00007fc4649c20ed in clone () from /lib/x86_64-linux-gnu/libc.so.6
#13 0x0000000000000000 in ?? ()

Thread 4 (Thread 0x7fc4588ab700 (LWP 10174)):
#0  0x00007fc464c7e511 in sem_timedwait () from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x0000000000629fdb in mono_sem_timedwait (sem=sem at entry=0x972208, timeout_ms=timeout_ms at entry=2000, alertable=alertable at entry=1) at mono-semaphore.c:82
#2  0x000000000058e422 in async_invoke_thread (data=0x0, data at entry=0x9721e0) at threadpool.c:1565
#3  0x0000000000589ca2 in start_wrapper_internal (data=0x3401cf0) at threads.c:643
#4  start_wrapper (data=0x3401cf0) at threads.c:688
#5  0x000000000061e871 in thread_start_routine (args=args at entry=0x17c0af8) at wthreads.c:294
#6  0x000000000062e810 in inner_start_thread (arg=0x25b6b50) at mono-threads-posix.c:49
#7  0x00007fc464c77b50 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#8  0x00007fc4649c20ed in clone () from /lib/x86_64-linux-gnu/libc.so.6
#9  0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7fc460eff700 (LWP 10196)):
#0  0x00007fc464918824 in sigsuspend () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00000000005cd42c in suspend_thread (context=0x7fc460efe440, info=0x1d58b10) at sgen-os-posix.c:113
#2  suspend_handler (sig=<optimized out>, siginfo=<optimized out>, context=0x7fc460efe440) at sgen-os-posix.c:131
#3  <signal handler called>
#4  0x00007fc464c7c2d2 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#5  0x0000000000607c4b in _wapi_handle_timedwait_signal_handle (handle=handle at entry=0x2073, timeout=timeout at entry=0x0, alertable=alertable at entry=1, poll=poll at entry=0) at handles.c:1588
#6  0x0000000000607c7b in _wapi_handle_wait_signal_handle (handle=handle at entry=0x2073, alertable=alertable at entry=1) at handles.c:1533
#7  0x000000000061b8e5 in WaitForSingleObjectEx (handle=handle at entry=0x2073, timeout=timeout at entry=4294967295, alertable=alertable at entry=1) at wait.c:196
#8  0x00000000005a1302 in mono_domain_try_unload (domain=0x1bd57c0, exc=0x7fc460efea48) at appdomain.c:2455
#9  0x00000000005a13d7 in mono_domain_unload (domain=<optimized out>) at appdomain.c:2359
#10 0x00000000407aec2d in ?? ()
#11 0x0000000001d54640 in ?? ()
#12 0x00007fc463d37bb8 in ?? ()
#13 0x0000000001a55d40 in ?? ()
#14 0x00007fc460efeb40 in ?? ()
#15 0x00007fc460efea60 in ?? ()
#16 0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7fc460cfe700 (LWP 10197)):
#0  0x00007fc464c7fc1d in waitpid () from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00000000004b0aa7 in mono_handle_native_sigsegv (signal=signal at entry=11, ctx=ctx at entry=0x7fc462207c40) at mini-exceptions.c:2299
#2  0x0000000000508fcf in mono_arch_handle_altstack_exception (sigctx=sigctx at entry=0x7fc462207c40, fault_addr=<optimized out>, stack_ovf=stack_ovf at entry=0) at exceptions-amd64.c:908
#3  0x00000000004231c7 in mono_sigsegv_signal_handler (_dummy=11, info=0x7fc462207d70, context=0x7fc462207c40) at mini.c:6769
#4  <signal handler called>
#5  slow_object_get_size (o=0x7fc457c44010, vtable=<optimized out>) at ../../mono/metadata/sgen-gc.h:722
#6  sgen_par_object_get_size (o=0x7fc457c44010, vtable=<optimized out>) at ../../mono/metadata/sgen-gc.h:766
#7  sgen_safe_object_get_size (obj=0x7fc457c44010) at ../../mono/metadata/sgen-gc.h:777
#8  sgen_major_is_object_alive (object=0x7fc457c44010) at sgen-gc.c:3589
#9  sgen_is_object_alive_for_current_gen (object=0x7fc457c44010 "\bP\304W\304\177") at sgen-gc.c:3624
#10 mark_ephemerons_in_range (ctx=...) at sgen-gc.c:3802
#11 0x00000000005d1d2c in finish_gray_stack (generation=generation at entry=1, queue=0x972f00) at sgen-gc.c:1931
#12 0x00000000005d3b65 in major_finish_collection (reason=0x705072 "user request", old_next_pin_slot=198, scan_mod_union=0) at sgen-gc.c:3164
#13 0x00000000005d4182 in major_do_collection (reason=<optimized out>) at sgen-gc.c:3305
#14 major_do_collection (reason=0x705072 "user request") at sgen-gc.c:3287
#15 0x00000000005d7677 in sgen_perform_collection (requested_size=requested_size at entry=0, generation_to_collect=generation_to_collect at entry=1, reason=reason at entry=0x705072 "user request", wait_to_finish=wait_to_finish at entry=1) at sgen-gc.c:3499
#16 0x00000000005d7cf8 in mono_gc_collect (generation=1) at sgen-gc.c:4623
#17 0x000000000059e3bb in unload_thread_main (arg=0x442f1e0) at appdomain.c:2334
#18 0x000000000061e871 in thread_start_routine (args=args at entry=0x17c27e0) at wthreads.c:294
#19 0x000000000062e810 in inner_start_thread (arg=0x442f160) at mono-threads-posix.c:49
#20 0x00007fc464c77b50 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#21 0x00007fc4649c20ed in clone () from /lib/x86_64-linux-gnu/libc.so.6
#22 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7fc465729780 (LWP 10156)):
#0  0x00007fc464918824 in sigsuspend () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00000000005cd42c in suspend_thread (context=0x7fffc42176c0, info=0x17c95b0) at sgen-os-posix.c:113
#2  suspend_handler (sig=<optimized out>, siginfo=<optimized out>, context=0x7fffc42176c0) at sgen-os-posix.c:131
#3  <signal handler called>
#4  0x00007fc464c7c2d2 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#5  0x0000000000607c4b in _wapi_handle_timedwait_signal_handle (handle=handle at entry=0x200c, timeout=timeout at entry=0x0, alertable=alertable at entry=1, poll=poll at entry=0) at handles.c:1588
#6  0x0000000000607c7b in _wapi_handle_wait_signal_handle (handle=handle at entry=0x200c, alertable=alertable at entry=1) at handles.c:1533
#7  0x000000000061b8e5 in WaitForSingleObjectEx (handle=0x200c, timeout=timeout at entry=4294967295, alertable=alertable at entry=1) at wait.c:196
#8  0x0000000000587ace in mono_wait_uninterrupted (thread=thread at entry=0x7fc462914010, multiple=multiple at entry=0, numhandles=numhandles at entry=1, handles=handles at entry=0x7fffc4217cc8, waitall=waitall at entry=0, ms=ms at entry=-1, alertable=1) at threads.c:1455
#9  0x00000000005895f9 in ves_icall_System_Threading_WaitHandle_WaitOne_internal (this=<optimized out>, handle=0x200c, ms=-1, exitContext=<optimized out>) at threads.c:1587
#10 0x0000000041bed918 in ?? ()
#11 0x000000000182f690 in ?? ()
#12 0x00007fc463c75f30 in ?? ()
#13 0x00007fc463c75e38 in ?? ()
#14 0x00007fffc4217d70 in ?? ()
#15 0x00007fffc4217cf0 in ?? ()
#16 0x0000000000000000 in ?? ()

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

Unhandled Exception:
System.Runtime.Remoting.RemotingException: Tcp transport error.

Server stack trace: 
  at System.Runtime.Remoting.Channels.Tcp.TcpMessageIO.ReceiveMessageStatus (System.IO.Stream networkStream, System.Byte[] buffer) [0x00000] in <filename unknown>:0 
  at System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.ProcessMessage (IMessage msg, ITransportHeaders requestHeaders, System.IO.Stream requestStream, ITransportHeaders& responseHeaders, System.IO.Stream& responseStream) [0x00000] in <filename unknown>:0 
  at System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage (IMessage msg) [0x00000] in <filename unknown>:0 

Exception rethrown at [0]: 
 ---> System.Runtime.Remoting.RemotingException: Connection closed
  at System.Runtime.Remoting.Channels.Tcp.TcpMessageIO.StreamRead (System.IO.Stream networkStream, System.Byte[] buffer, Int32 count) [0x00000] in <filename unknown>:0 
  at System.Runtime.Remoting.Channels.Tcp.TcpMessageIO.ReceiveMessageStatus (System.IO.Stream networkStream, System.Byte[] buffer) [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at System.Runtime.Remoting.Channels.Tcp.TcpMessageIO.ReceiveMessageStatus (System.IO.Stream networkStream, System.Byte[] buffer) [0x00000] in <filename unknown>:0 
  at System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.ProcessMessage (IMessage msg, ITransportHeaders requestHeaders, System.IO.Stream requestStream, ITransportHeaders& responseHeaders, System.IO.Stream& responseStream) [0x00000] in <filename unknown>:0 
  at System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage (IMessage msg) [0x00000] in <filename unknown>:0 


More information about the Mono-devel-list mailing list