[Mono-bugs] [Bug 471089] New: Deadlock caused by the loader lock and generics

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Jan 30 14:30:46 EST 2009


https://bugzilla.novell.com/show_bug.cgi?id=471089


           Summary: Deadlock caused by the loader lock and generics
    Classification: Mono
           Product: Mono: Runtime
           Version: SVN
          Platform: 32bit
        OS/Version: openSUSE 11.1
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: JIT
        AssignedTo: lupus at novell.com
        ReportedBy: lluis at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Mono will sometimes hang when starting MonoDevelop. This is frequent with Mono
2.2, less frequent with 2.4 (but still happens).

Here are the stack traces of one of those deadlocks:

Thread 4 (Thread 0x407f4b90 (LWP 23047)):
#0  0xffffe430 in __kernel_vsyscall ()
#1  0x4011e3f6 in nanosleep () from /lib/libpthread.so.0
#2  0x081ab918 in collection_thread (unused=0x0) at collection.c:34
#3  0x401171b5 in start_thread () from /lib/libpthread.so.0
#4  0x4022638e in clone () from /lib/libc.so.6

Thread 3 (Thread 0x40ce9b90 (LWP 23048)):
#0  0xffffe430 in __kernel_vsyscall ()
#1  0x4011cef5 in sem_wait@@GLIBC_2.1 () from /lib/libpthread.so.0
#2  0x08197279 in finalizer_thread (unused=0x0) at gc.c:935
#3  0x08163768 in start_wrapper (data=0x82ecf10) at threads.c:623
#4  0x081b1496 in thread_start_routine (args=0x82df58c) at threads.c:286
#5  0x081d2ffa in GC_start_routine (arg=0x26f20) at pthread_support.c:1382
#6  0x401171b5 in start_thread () from /lib/libpthread.so.0
#7  0x4022638e in clone () from /lib/libc.so.6

Thread 2 (Thread 0x41826b90 (LWP 23092)):
#0  0xffffe430 in __kernel_vsyscall ()
#1  0x4011d7b9 in __lll_lock_wait () from /lib/libpthread.so.0
#2  0x40118ce0 in _L_lock_286 () from /lib/libpthread.so.0
#3  0x40118705 in pthread_mutex_lock () from /lib/libpthread.so.0
---Type <return> to continue, or q <return> to quit---
#4  0x081952ab in templates_lock () at generic-sharing.c:140
#5  0x0819686e in mono_class_unregister_image_generic_subclasses (
    image=0x4194dd10) at generic-sharing.c:342
#6  0x0816b5a7 in mono_metadata_clean_for_image (image=0x4194dd10)
    at metadata.c:2224
#7  0x081897e5 in mono_image_close (image=0x4194dd10) at image.c:1365
#8  0x0810de63 in ves_icall_System_Reflection_Assembly_InternalGetAssemblyName
    (fname=0xe8b28, aname=0x227870) at icall.c:5207
#9  0x424b418f in ?? ()
#10 0x424b411e in ?? ()
#11 0x424b401f in ?? ()
#12 0x424b3dbc in ?? ()
#13 0x4171c331 in ?? ()
#14 0x4171ba3e in ?? ()
#15 0x4171b5ae in ?? ()
#16 0x407ea9a8 in ?? ()
#17 0x080fec64 in mono_runtime_delegate_invoke (delegate=0x17dc08, 
    params=0x418262e4, exc=0x0) at object.c:2938
#18 0x081637ef in start_wrapper (data=0x1c5498) at threads.c:629
#19 0x081b1496 in thread_start_routine (args=0x82e222c) at threads.c:286
#20 0x081d2ffa in GC_start_routine (arg=0x26e60) at pthread_support.c:1382
#21 0x401171b5 in start_thread () from /lib/libpthread.so.0
#22 0x4022638e in clone () from /lib/libc.so.6
---Type <return> to continue, or q <return> to quit---

Thread 1 (Thread 0x402e4ba0 (LWP 23043)):
#0  0xffffe430 in __kernel_vsyscall ()
#1  0x4011d7b9 in __lll_lock_wait () from /lib/libpthread.so.0
#2  0x40118ce0 in _L_lock_286 () from /lib/libpthread.so.0
#3  0x40118705 in pthread_mutex_lock () from /lib/libpthread.so.0
#4  0x081987d2 in mono_loader_lock () at loader.c:1888
#5  0x0816ad59 in mono_metadata_get_generic_inst (type_argc=1, 
    type_argv=0x865a608) at metadata.c:2392
#6  0x0816b19b in mono_metadata_inflate_generic_inst (ginst=0x82fe1f8, 
    context=0x86499a4) at metadata.c:2501
#7  0x0812b9ad in mono_class_inflate_generic_method_full (method=0x842d2b8, 
    klass_hint=0x0, context=0x86499a4) at class.c:683
#8  0x0812bcc0 in mono_class_inflate_generic_method (method=0x842d2b8, 
    context=0x86499a4) at class.c:703
#9  0x08195195 in inflate_other_data (data=0x842d2b8, info_type=8, 
    context=0x86499a4, class=0x82d50ec, temporary=1) at generic-sharing.c:565
#10 0x08195ecd in mono_method_lookup_or_register_other_info (method=0x8649980, 
    in_mrgctx=2, data=0x8661dc8, info_type=8, generic_context=0x86499a4)
    at generic-sharing.c:595
#11 0x0805fa36 in mono_resolve_patch_target (method=0x8649980, domain=0x25ee0, 
    code=0x424b82d0 "U\213�\203�\030\211U�\203}\b", patch_info=0x864f8bc, 
    run_cctors=1) at mini.c:2630
---Type <return> to continue, or q <return> to quit---
#12 0x080df0ab in mono_arch_patch_code (method=0x8649980, domain=0x25ee0, 
    code=0x424b82d0 "U\213�\203�\030\211U�\203}\b", ji=0x864f98c, run_cctors=1)
    at mini-x86.c:4198
#13 0x0805ecde in mono_codegen (cfg=0x8647f00) at mini.c:2945
#14 0x08062633 in mini_method_compile (method=0x86499f0, opts=64055807, 
    domain=0x25ee0, run_cctors=<value optimized out>, 
    compile_aot=<value optimized out>, parts=0) at mini.c:3554
#15 0x08063319 in mono_jit_compile_method (method=0x86499f0) at mini.c:3895
#16 0x080d1d25 in mono_magic_trampoline (regs=0xbfcb66c8, 
    code=0x424b82b1 "\203�\020\213G\020@\211G\020\215e�_��", m=0x86499f0, 
    tramp=0x0) at mini-trampolines.c:292
#17 0x4040e066 in ?? ()
#18 0x424b7bca in ?? ()
#19 0x424b4f81 in ?? ()
#20 0x4171c774 in ?? ()
#21 0x407e132f in ?? ()
#22 0x407e1203 in ?? ()
#23 0x081015de in mono_runtime_exec_main (method=0x16ea20, args=0x2ce70, 
    exc=0x0) at object.c:3296
#24 0x08101cfb in mono_runtime_run_main (method=0x82be1f4, argc=0, 
    argv=0xbfcb6c6c, exc=0x0) at object.c:3084
#25 0x080b1b8a in mono_main (argc=3, argv=0xbfcb6c64) at driver.c:969
#26 0x0805add1 in main (argc=Cannot access memory at address 0x80
) at main.c:34


My mono version:

Mono JIT compiler version 2.4 (/branches/mono-2-4/mono r124665 dj gen 29
00:03:06 CET 2009)
Copyright (C) 2002-2008 Novell, Inc and Contributors. www.mono-project.com
    TLS:           __thread
    GC:            Included Boehm (with typed GC)
    SIGSEGV:       altstack
    Notifications: epoll
    Architecture:  x86
    Disabled:      none

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list