[Mono-bugs] [Bug 534913] New: cominterop_get_ccw hanging in call to g_hash_table_lookup - suspected threading issue

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Aug 27 14:20:16 EDT 2009


           Summary: cominterop_get_ccw hanging in call to
                    g_hash_table_lookup - suspected threading issue
    Classification: Mono
           Product: Mono: Runtime
           Version: SVN
          Platform: x86
        OS/Version: Ubuntu
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: interop
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: tom_hindle at sil.org
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---

Created an attachment (id=315598)
 --> (http://bugzilla.novell.com/attachment.cgi?id=315598)
Possible fix for hang in cominterop_get_ccw

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:
Gecko/2009080315 Ubuntu/9.04 (jaunty) Firefox/3.0.13

svn ver -r138231

Thread 1 ( doesn't exist g_hash_table_lookup - seems to constantly loop in
g_hash_table_lookup's while loop ) 

#0  IA__g_hash_table_lookup (hash_table=0xb556b780, key=0xd5495a90)

    at /build/buildd/glib2.0-2.20.1/glib/ghash.c:209

209          if (node->key_hash == hash_value)

#1  0x08109399 in cominterop_get_ccw (object=0x30bc80, itf=0xb55a20c4)

    at cominterop.c:1865

#2  0x0810a21f in ves_icall_System_Runtime_InteropServices_Marshal_GetCCW (

    object=0x30bc80, type=0x1a33a0) at cominterop.c:1536

1536    e_get_class (type->type);

#3 0xb2fc9860 in  (wrapper managed-to-native)
System.Runtime.InteropServices.Marshal:GetCCW (object,System.Type) + 0x30
(0xb2fc9830 0xb2fc989a) [0x25d20 - domain-TeDialogsTests.dll]

#4 0xb2fc97dc in 
(object,System.Type) + 0xb4 (0xb2fc9728 0xb2fc9808) [0x25d20 -

#5 0xb2f24095 in  (wrapper native-to-managed)
SIL.FieldWorks.Common.COMInterfaces.IOleDbEncap:CreateCommand (intptr,intptr) +
0x95 (0xb2f24000 0xb2f240b5) [0x25d20 - domain-TeDialogsTests.dll]

Thread 8:
#0  IA__g_hash_table_lookup (hash_table=0xb556b780, key=0x3bfe87d3)

    at /build/buildd/glib2.0-2.20.1/glib/ghash.c:209

209          if (node->key_hash == hash_value)

#1  0x08107fb0 in mono_marshal_free_ccw (object=0x4db618) at cominterop.c:2080

#2  0x0810630d in mono_gc_run_finalize (obj=0x4db618, data=0x0) at gc.c:196

196         */

#3  0x081f5593 in GC_invoke_finalizers () at finalize.c:787

787            (*(curr_fo -> fo_fn))((ptr_t)(curr_fo -> fo_hidden_base),

#4  0x0810654c in finalizer_thread (unused=0x0) at gc.c:1030


#5  0x0811b177 in start_wrapper (data=0x94a5cb0) at threads.c:643

643        mono_threads_unlock ();

Seems to be missing mono_cominterop_lock around g_hash_table_lookup in
cominterop_get_ccw line ~= 1865

Attaching patch that adds this.

I will keep on testing to see if hang reoccurs with patch.

Reproducible: Sometimes

Steps to Reproduce:
Haven't yet found a way to reliably reproduce this. Currently I just run unit
tests X amount of times until a hang occurs.

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

More information about the mono-bugs mailing list