[Mono-bugs] [Bug 464834] New: mono_gc_init must not wait for finalizer thread to start

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Jan 9 08:47:53 EST 2009


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


           Summary: mono_gc_init must not wait for finalizer thread to start
           Product: Mono: Runtime
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Minor
          Priority: P5 - None
         Component: GC
        AssignedTo: lupus at novell.com
        ReportedBy: rkumpera at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Under windows it's possible that a deadlock occurs during mono_gc_init since it
waits for the finalizer thread to start. Documentation about this crash can be
found in:

http://msdn.microsoft.com/en-us/library/ms173266.aspx
http://msdn.microsoft.com/en-us/library/ms172219.aspx

I think we can fix this by doing the follow:

-Change MonoThread to have a "MonoBoolean is_finalizer_thread" that it's
initialized by mono_thread_create_internal.

-Make mono_thread_create_internal static and export 
mono_thread_create_threadpool_thread and mono_thread_create_finalizer_thread.

-In gc.c change all references to gc_thread to use mono_gc_is_finalizer_thread
when possible.

-In gc.c (mono_gc_cleanup) check if gc_thread is not NULL before using it. This
should be enough to avoid crashing when mono_gc_cleanup runs before the
finalizer thread has started.


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