2016-10-03 97 views
0

我在CentOS上的Mono 4.4.1運行時崩潰時遇到了stacktrace。 Mono是使用configure,make,make install從tarball構建的。 有什麼方法可以獲得有關正在執行的行號的更多信息,例如在配置步驟中啓用標誌?獲取Mono本機崩潰的行號

Native stacktrace: 

    mono() [0x4ac038] 
    /lib64/libpthread.so.0(+0xf100) [0x7efc4ff11100] 
    /lib64/libc.so.6(gsignal+0x37) [0x7efc4f95f5f7] 
    /lib64/libc.so.6(abort+0x148) [0x7efc4f960ce8] 
    mono() [0x63e96e] 
    mono() [0x63e75b] 
    mono() [0x63e8bc] 
    mono() [0x636332] 
    /lib64/libpthread.so.0(+0x7dc5) [0x7efc4ff09dc5] 
    /lib64/libc.so.6(clone+0x6d) [0x7efc4fa20ced] 

    Debug info from gdb: 
    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. 

回答

1

您需要安裝gdb以便能夠在堆棧跟蹤的輸出中獲取行號,如下所示。

Thread 1 (Thread 0x7f0b023d8780 (LWP 9762)): 
#0 0x00007f0b018a9ca9 in waitpid() from /lib64/libpthread.so.0 
#1 0x00000000004ac0fe in mono_handle_native_sigsegv ([email protected]=11, [email protected]=0x7f0b02337ac0, [email protected]=0x7f0b02337bf0) at mini-exceptions.c:2348 
#2 0x00000000004ff87e in mono_arch_handle_altstack_exception ([email protected]=0x7f0b02337ac0, [email protected]=0x7f0b02337bf0, fault_addr=<optimized out>, [email protected]=0) at exceptions-amd64.c:808 
#3 0x0000000000424832 in mono_sigsegv_signal_handler (_dummy=11, _info=0x7f0b02337bf0, context=0x7f0b02337ac0) at mini-runtime.c:2888 
#4 <signal handler called> 
#5 0x00007f0b018a66d5 in [email protected]@GLIBC_2.3.2() from /lib64/libpthread.so.0 
#6 0x000000000060d56b in mono_os_cond_wait (mutex=0x1594b70, cond=0x1594b98) at ../../mono/utils/mono-os-mutex.h:105 
#7 mono_os_cond_timedwait (timeout_ms=4294967295, mutex=0x1594b70, cond=0x1594b98) at ../../mono/utils/mono-os-mutex.h:120 
#8 _wapi_handle_timedwait_signal_handle ([email protected]=0x40b, [email protected]=4294967295, [email protected]=1, [email protected]=0, [email protected]=0x7ffdbc5d208c) at handles.c:1554 
#9 0x0000000000622992 in wapi_WaitForSingleObjectEx (handle=0x40b, [email protected]=4294967295, [email protected]=1) at wait.c:181 
#10 0x000000000058eaa0 in mono_wait_uninterrupted ([email protected]=0, [email protected]=1, [email protected]=0x7ffdbc5d2138, [email protected]=0, [email protected]=-1, thread=<optimized out>, alertable=1) at threads.c:1518 
#11 0x00000000005903d5 in ves_icall_System_Threading_WaitHandle_WaitOne_internal (this_obj=<optimized out>, handle=0x40b, ms=-1, exitContext=<optimized out>) at threads.c:1652