[Mono-list] Mono 2.4.3 profiler SIGSEGV on RHEL 5.2

JmH jason.height at gmail.com
Mon Jan 11 17:49:23 EST 2010


Hello,

We have undertaken a C# development on linux which is targeting RHEL 5.2.

We believe that we may have a memory leak in our C# because we are having
issues with the OOM killer.

In order to debug this we have tried to use the mono profiler, however we
get a SIGSEGV whenever we start our application (command line and output
below)

Given we had to build on RHEL 5.2 ourselves, i am not sure if this crash is
related to a missing runtime dependency or something else. If anyone shoudl
shed some light on things to check then that woudl be appreciated.

Jason

[root at xvme6200-3 packetdecoder]# mono --profile=default:alloc
IPMSPacketDecoder.exe
Stacktrace:

  at (wrapper managed-to-native)
object.__icall_wrapper_mono_object_new_specific (intptr) <0x00004>
  at (wrapper managed-to-native)
object.__icall_wrapper_mono_object_new_specific (intptr) <0xffffffff>
  at IPMSPacketDecoder.IPMSEventProcessor..ctor
(SharpPcap.PcapDevice,IPMSPacketDecoder.DatabaseWriter,CommonClassLibrary.Properties)
<0x003be>
  at IPMSPacketDecoder.Program..ctor (string[]) <0x0037c>
  at IPMSPacketDecoder.Program.Main (string[]) <0x00032>
  at (wrapper runtime-invoke)
IPMSPacketDecoder.Program.runtime_invoke_void_object
(object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

        mono [0x80cb959]
        mono [0x80f5781]
        [0x76f440]
        mono [0x811cbf1]
        mono(mono_object_new_alloc_specific+0x90) [0x8115070]
        mono(mono_object_new_specific+0x88) [0x81156c8]
        [0x7a376e]
        [0x995e7f]
        [0x661c9d]
        [0x6618fb]
        [0x7a32cc]
        mono(mono_runtime_exec_main+0xea) [0x811a84a]
        mono(mono_runtime_run_main+0x1ba) [0x811be3a]
        mono(mono_main+0x1cf2) [0x80b2eb2]
        mono [0x8058971]
        /lib/libc.so.6(__libc_start_main+0xdc) [0xbd0dec]
        mono [0x8058881]

Debug info from gdb:

Previous frame inner to this frame (corrupt stack?)
Using host libthread_db library "/lib/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 1119552 (LWP 4865)]
[New Thread 22281104 (LWP 4879)]
[New Thread 42257296 (LWP 4878)]
[New Thread 87796624 (LWP 4876)]
[New Thread 32611216 (LWP 4871)]
[New Thread 56523664 (LWP 4870)]
[New Thread 21228432 (LWP 4869)]
[New Thread 9124752 (LWP 4868)]
[New Thread 1186704 (LWP 4866)]
0x0076f402 in __kernel_vsyscall ()
  9 Thread 1186704 (LWP 4866)  0x0076f402 in __kernel_vsyscall ()
  8 Thread 9124752 (LWP 4868)  0x0076f402 in __kernel_vsyscall ()
  7 Thread 21228432 (LWP 4869)  0x0076f402 in __kernel_vsyscall ()
  6 Thread 56523664 (LWP 4870)  0x0076f402 in __kernel_vsyscall ()
  5 Thread 32611216 (LWP 4871)  0x0076f402 in __kernel_vsyscall ()
  4 Thread 87796624 (LWP 4876)  0x0076f402 in __kernel_vsyscall ()
  3 Thread 42257296 (LWP 4878)  0x0076f402 in __kernel_vsyscall ()
  2 Thread 22281104 (LWP 4879)  0x0076f402 in __kernel_vsyscall ()
  1 Thread 1119552 (LWP 4865)  0x0076f402 in __kernel_vsyscall ()

Thread 9 (Thread 1186704 (LWP 4866)):
#0  0x0076f402 in __kernel_vsyscall ()
#1  0x00d3b616 in nanosleep () from /lib/libpthread.so.0
#2  0x081a5661 in collection_thread (unused=0x0) at collection.c:34
#3  0x00d3445b in start_thread () from /lib/libpthread.so.0
#4  0x00c8bc4e in clone () from /lib/libc.so.6

Thread 8 (Thread 9124752 (LWP 4868)):
#0  0x0076f402 in __kernel_vsyscall ()
#1  0x00d3a25e in sem_wait at GLIBC_2.0 () from /lib/libpthread.so.0
#2  0x0811fd09 in finalizer_thread (unused=0x0) at gc.c:1058
#3  0x0816275f in start_wrapper (data=0x93ed480) at threads.c:623
#4  0x081ac8b5 in thread_start_routine (args=0x93dd76c) at threads.c:286
#5  0x081cc405 in GC_start_routine (arg=0x35f20) at pthread_support.c:1382
#6  0x00d3445b in start_thread () from /lib/libpthread.so.0
#7  0x00c8bc4e in clone () from /lib/libc.so.6

Thread 7 (Thread 21228432 (LWP 4869)):
#0  0x0076f402 in __kernel_vsyscall ()
#1  0x00c7c8db in read () from /lib/libc.so.6
#2  0x00a75fd8 in ?? ()
#3  0x00000003 in ?? ()
#4  0x0062e010 in ?? ()
#5  0x00001000 in ?? ()
#6  0xffffffff in ?? ()
#7  0x0062e000 in ?? ()
#8  0x00066e60 in ?? ()
#9  0x0003e190 in ?? ()
#10 0x0143e248 in ?? ()
#11 0x00a75ec6 in ?? ()
#12 0x0941dea0 in ?? ()
#13 0x00000003 in ?? ()
#14 0x00001000 in ?? ()
#15 0x0956738c in ?? ()
#16 0x0062e000 in ?? ()
#17 0x00066e60 in ?? ()
#18 0xffffffff in ?? ()
#19 0x0143e1f8 in ?? ()
#20 0x00a75f8c in ?? ()
#21 0x0143e248 in ?? ()
#22 0x00a75ec6 in ?? ()
#23 0x00000003 in ?? ()
#24 0x0062e000 in ?? ()
#25 0x00001000 in ?? ()
#26 0x0143e250 in ?? ()
#27 0x00052a10 in ?? ()
#28 0x094d5090 in ?? ()
#29 0x0003e190 in ?? ()
#30 0x00000000 in ?? ()

Thread 6 (Thread 56523664 (LWP 4870)):
#0  0x0076f402 in __kernel_vsyscall ()
#1  0x00d384dc in pthread_cond_timedwait@@GLIBC_2.3.2 ()
   from /lib/libpthread.so.0
#2  0x0819be09 in _wapi_handle_timedwait_signal_handle (handle=0x40d,
    timeout=0x35e7008, alertable=1, poll=0) at handles.c:1603
#3  0x0819dedf in WaitForSingleObjectEx (handle=0x40d, timeout=999,
    alertable=1) at wait.c:207
#4  0x0815f7fe in ves_icall_System_Threading_WaitHandle_WaitOne_internal (
    this=0x9c3d8, handle=0x40d, ms=999, exitContext=1) at threads.c:1446
#5  0x00a7937e in ?? ()
#6  0x0009c3d8 in ?? ()
#7  0x0000040d in ?? ()
#8  0x000003e7 in ?? ()
#9  0x00000001 in ?? ()
#10 0x00989582 in ?? ()
#11 0x00989582 in ?? ()
#12 0x00000000 in ?? ()

Thread 5 (Thread 32611216 (LWP 4871)):
#0  0x0076f402 in __kernel_vsyscall ()
#1  0x00c8c2c6 in epoll_wait () from /lib/libc.so.6
#2  0x0815ae98 in socket_io_epoll_main (p=0x82902c0) at threadpool.c:600
#3  0x0816275f in start_wrapper (data=0xb7e53868) at threads.c:623
#4  0x081ac8b5 in thread_start_routine (args=0x93ddc34) at threads.c:286
#5  0x081cc405 in GC_start_routine (arg=0xa10fe0) at pthread_support.c:1382
#6  0x00d3445b in start_thread () from /lib/libpthread.so.0
#7  0x00c8bc4e in clone () from /lib/libc.so.6

Thread 4 (Thread 87796624 (LWP 4876)):
#0  0x0076f402 in __kernel_vsyscall ()
#1  0x00d38256 in pthread_cond_wait@@GLIBC_2.3.2 () from
/lib/libpthread.so.0
#2  0x0819bfbd in _wapi_handle_timedwait_signal_handle (handle=0x401,
    timeout=0x0, alertable=1, poll=0) at handles.c:1605
#3  0x0819c044 in _wapi_handle_wait_signal_handle (handle=0x401,
alertable=1)
    at handles.c:1548
#4  0x0819e0e3 in WaitForSingleObjectEx (handle=0x401, timeout=4294967295,
    alertable=1) at wait.c:205
#5  0x0815c58a in async_invoke_thread (data=0x0) at threadpool.c:1424
#6  0x0816275f in start_wrapper (data=0x958c698) at threads.c:623
#7  0x081ac8b5 in thread_start_routine (args=0x93ddedc) at threads.c:286
#8  0x081cc405 in GC_start_routine (arg=0x25e7fe0) at pthread_support.c:1382
#9  0x00d3445b in start_thread () from /lib/libpthread.so.0
#10 0x00c8bc4e in clone () from /lib/libc.so.6

Thread 3 (Thread 42257296 (LWP 4878)):
#0  0x0076f402 in __kernel_vsyscall ()
#1  0x00d384dc in pthread_cond_timedwait@@GLIBC_2.3.2 ()
   from /lib/libpthread.so.0
#2  0x0819be09 in _wapi_handle_timedwait_signal_handle (handle=0x401,
    timeout=0x284c258, alertable=1, poll=0) at handles.c:1603
#3  0x0819dedf in WaitForSingleObjectEx (handle=0x401, timeout=1000,
    alertable=1) at wait.c:207
#4  0x0815c500 in async_invoke_thread (data=0x0) at threadpool.c:1407
#5  0x0816275f in start_wrapper (data=0x9563e38) at threads.c:623
#6  0x081ac8b5 in thread_start_routine (args=0x93ddfec) at threads.c:286
#7  0x081cc405 in GC_start_routine (arg=0x2633fe0) at pthread_support.c:1382
#8  0x00d3445b in start_thread () from /lib/libpthread.so.0
#9  0x00c8bc4e in clone () from /lib/libc.so.6

Thread 2 (Thread 22281104 (LWP 4879)):
#0  0x0076f402 in __kernel_vsyscall ()
#1  0x00d38256 in pthread_cond_wait@@GLIBC_2.3.2 () from
/lib/libpthread.so.0
#2  0x0819bfbd in _wapi_handle_timedwait_signal_handle (handle=0x41c,
    timeout=0x0, alertable=1, poll=0) at handles.c:1605
#3  0x0819c044 in _wapi_handle_wait_signal_handle (handle=0x41c,
alertable=1)
    at handles.c:1548
#4  0x0819e0e3 in WaitForSingleObjectEx (handle=0x41c, timeout=4294967295,
    alertable=1) at wait.c:205
#5  0x080fb4e9 in ves_icall_System_Threading_Monitor_Monitor_wait (
    obj=0x66e50, ms=4294967295) at monitor.c:1297
#6  0x0079a991 in ?? ()
#7  0x00066e50 in ?? ()
#8  0xffffffff in ?? ()
#9  0x0941f38c in ?? ()
#10 0x0153f1a0 in ?? ()
#11 0x00a20380 in ?? ()
#12 0xb7c00398 in ?? ()
#13 0x0063caf0 in ?? ()
#14 0x0153f1b8 in ?? ()
#15 0x0079a84c in ?? ()
#16 0x09563e38 in ?? ()
#17 0x00000001 in ?? ()
#18 0x09563e38 in ?? ()
#19 0x09593a04 in ?? ()
#20 0x00a20380 in ?? ()
#21 0xb7c00398 in ?? ()
#22 0x0063caf0 in ?? ()
#23 0x0153f198 in ?? ()
#24 0x0079a954 in ?? ()
#25 0x0153f1b8 in ?? ()
#26 0x0079a84c in ?? ()
#27 0x00066e50 in ?? ()
#28 0xffffffff in ?? ()
#29 0x0153f1ac in ?? ()
#30 0x0153f248 in ?? ()
#31 0x0063caf0 in ?? ()
#32 0xb7c00398 in ?? ()
#33 0x0153f248 in ?? ()
#34 0x00799358 in ?? ()
#35 0x00066e50 in ?? ()
#36 0xb7c00398 in ?? ()
#37 0x00066e50 in ?? ()
#38 0x00799327 in ?? ()
#39 0x009b00a0 in ?? ()
#40 0x0153f1f4 in ?? ()
#41 0x08162c7e in mono_thread_interruption_checkpoint_request (
    bypass_abort_protection=421456) at threads.c:3635

Thread 1 (Thread 1119552 (LWP 4865)):
#0  0x0076f402 in __kernel_vsyscall ()
#1  0x00d3ae1b in read () from /lib/libpthread.so.0
#2  0x080cbad4 in mono_handle_native_sigsegv (signal=11, ctx=0x6c7d0c)
    at mini-exceptions.c:1559
#3  0x080f5781 in mono_arch_handle_altstack_exception (sigctx=0x6c7d0c,
    fault_addr=0x4, stack_ovf=0) at exceptions-x86.c:881
#4  <signal handler called>
#5  0x0811d492 in simple_allocation (prof=0x93bdae0, obj=0x25bd850,
    klass=0xb7e15260) at profiler.c:1224
#6  0x0811cbf1 in mono_profiler_allocation (obj=0x25bd850, klass=0xb7e15260)
    at profiler.c:332
#7  0x08115070 in mono_object_new_alloc_specific (vtable=0x9573f58)
    at object.c:3623
#8  0x081156c8 in mono_object_new_specific (vtable=0x9573f58) at
object.c:3603
#9  0x007a376e in ?? ()
#10 0x09573f58 in ?? ()
#11 0xbfcec938 in ?? ()
#12 0x093bdae0 in ?? ()
#13 0xb7e159e4 in ?? ()
#14 0xbfcec938 in ?? ()
#15 0x00663826 in ?? ()
#16 0xb7e159e4 in ?? ()
#17 0x00000400 in ?? ()
#18 0x00995e6c in ?? ()
#19 0x093c05c0 in ?? ()
#20 0xbfcec99c in ?? ()
#21 0x00000002 in ?? ()
#22 0x00000400 in ?? ()
#23 0x00000000 in ?? ()
#0  0x0076f402 in __kernel_vsyscall ()

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

Aborted
[root at xvme6200-3 packetdecoder]#
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20100112/32abec26/attachment-0001.html 


More information about the Mono-list mailing list