[Mono-devel-list] Segfault within jit compile

David Mitchell david.mitchell at telogis.com
Thu Mar 18 22:07:52 EST 2004


I have found a problem that causes a multithreaded mono app to freeze, 
but I can't find a simple app to demonstrate it.

The below stack trace shows a thread that has tried to compile a method. 
This involves obtaining the domain lock and then going off and doing 
things. This particular thread has caused a segfault while it was 
allocating memory (#13). The handlers for this don't check whether the 
domain lock is held, which means this thread kind of finishes, but it 
still holds the domain lock, which causes grief.

Any ideas on what conditions would lead to this? I am running an ASP.Net 
app through XSP. This frequently but inconsistently occurs in my 
application.

#0  0xffffe002 in ?? ()
#1  0x401ac192 in g_free (mem=0xfffffffc) at gmem.c:186
#2  0x400a6f6b in free_method_info (minfo=0x9343fc0) at 
debug-mono-symfile.c:28
#3  0x4019dbea in g_hash_table_insert (hash_table=0x9343fc0, key=0x9217b48,
     value=0x447025b8) at ghash.c:307
#4  0x400a7471 in mono_debug_find_method (handle=0x8aa0f28, 
method=0x9217b48)
     at debug-mono-symfile.c:253
#5  0x400a7838 in lookup_method_func (key=0x8aa0378, value=0x9344858,
     user_data=0x844615c) at mono-debug.c:186
#6  0x4019e2bc in g_hash_table_foreach (hash_table=0x8135ed0,
     func=0x400a7800 <lookup_method_func>, user_data=0x844615c) at 
ghash.c:559
#7  0x400a7887 in _mono_debug_lookup_method (method=0x9344858)
     at mono-debug.c:200
#8  0x400a7b02 in mono_debug_source_location_from_address (method=0x9217b48,
     address=445, line_number=0x0, domain=0x83c08e8) at mono-debug.c:334
#9  0x40071df8 in mono_arch_find_jit_info (domain=0x83c08e8,
     jit_tls=0x8435d80, res=0x8446304, prev_ji=0x1bd, ctx=0x8446394,
     new_ctx=0x8446244, trace=0x8446238, lmf=0x844623c, native_offset=0x0,
     managed=0x0) at exceptions-x86.c:746
#10 0x400727ef in mono_arch_handle_exception (ctx=0x8446394, obj=0x8d3ab70,
     test_only=1) at exceptions-x86.c:1087
#11 0x4007271a in mono_arch_handle_exception (ctx=0x8446554, obj=0x8d3ab70,
     test_only=0) at exceptions-x86.c:1068
#12 0x40049101 in sigsegv_signal_handler (_dummy=11, info=0x9344858,
     context=0x8446540) at mini.c:8127
#13 <signal handler called>
#14 0x42074d7e in malloc_consolidate () from /lib/tls/libc.so.6
#15 0x420743c9 in _int_malloc () from /lib/tls/libc.so.6
#16 0x4207378d in malloc () from /lib/tls/libc.so.6
#17 0x401ac06e in g_malloc (n_bytes=1108554272) at gmem.c:136
#18 0x400c42b5 in mono_mempool_new () at mempool.c:47
#19 0x4004831f in mini_method_compile (method=0x8c08a08, opts=154421336,
     domain=0x9344858, run_cctors=154421336, parts=0) at mini.c:7630
#20 0x40048cfd in mono_jit_compile_method_inner (method=0x8c08a08,
     code_domain=0x42737514) at mini.c:7944
#21 0x40048ee2 in mono_jit_compile_method_with_opt (method=0x8c08a08,
     opt=84363) at mini.c:7996
#22 0x40048f41 in mono_jit_compile_method (method=0x8c08a08) at mini.c:8016
#23 0x40081ccc in mono_compile_method (method=0x8c08a08) at object.c:187
#24 0x4007304c in x86_magic_trampoline (eax=144804528, ecx=1, edx=146835976,
     esi=147943952, edi=0, ebx=147682880,
     code=0x446aa1bd "\203?\b\213E?\211E??E?", m=0x8c08a08) at 
tramp-x86.c:97
#25 0x080d77c5 in ?? ()

-- 
David Mitchell
Software Engineer
Telogis

NOTICE:
This message (including any attachments) contains CONFIDENTIAL
INFORMATION intended for a specific individual and purpose, and
is protected by law.  If you are not the intended recipient,
you should delete this message and are hereby notified that any
disclosure, copying, or distribution of this message, or the
taking of any action based on it, is strictly prohibited.



More information about the Mono-devel-list mailing list