[Mono-bugs] [Bug 80893][Blo] New - Collecting from unknown thread in mono_thread_attach

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon Feb 19 02:45:43 EST 2007


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by luke at quinane.id.au.

http://bugzilla.ximian.com/show_bug.cgi?id=80893

--- shadow/80893	2007-02-19 02:45:43.000000000 -0500
+++ shadow/80893.tmp.26778	2007-02-19 02:45:43.000000000 -0500
@@ -0,0 +1,57 @@
+Bug#: 80893
+Product: Mono: Runtime
+Version: 1.2
+OS: 
+OS Details: XP SP2
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Blocker
+Component: GC
+AssignedTo: lupus at ximian.com                            
+ReportedBy: luke at quinane.id.au               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Collecting from unknown thread in mono_thread_attach
+
+Description of Problem:
+When trying to register a thread using "mono_thread_attach" Mono crashes
+with "GC: Collecting from unknown thread". The call stack looks like this:
+
+_DbgBreakPoint()
+GC_abort()
+GC_push_all_stacks()
+GC_default_push_other_roots()
+GC_push_roots(all=0x1)
+GC_mark_some_inner()
+GC_mark_some()
+GC_stopped_mark()
+GC_try_to_collect_inner()
+GC_collect_or_expand(needed_block=0x1, ignore_off_page=0x0)
+GC_allocobj(sz=0x8, kind=0x1)
+GC_generic_malloc(lb=0x18, k=0x1)
+GC_register_finalizer_inner()
+GC_register_finalizer_no_order(cd=0x0, ofn=0x0, ocd=0x0)
+GC_register_finalizer()
+mono_object_register_finalizer()
+mono_object_new_alloc_specific()
+mono_object_new()
+mono_thread_attach()
+[my code]
+
+Steps to reproduce the problem:
+1. Run Mono in an embedded application.
+2. Attempt to attach a thread that is unknown to the GC.
+
+How often does this happen?
+Since this seems to depend on how much memory is available it doesn't 
+always happen when I attach a thread; however for some threads it seems to
+occur every time.
+
+Additional Information:
+I am using Mono 1.2.1 embedded into a DLL loaded into a larger program. I
+have the GC setup to register new threads that start after the DLL is
+loaded but some calls originate from the larger project an need to call
+mono_thread_attach separately.


More information about the mono-bugs mailing list