[Mono-bugs] [Bug 73718][Nor] New - async io causes runtime assertion

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 15 Mar 2005 12:58:28 -0500 (EST)

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 vargaz@gmail.com.


--- shadow/73718	2005-03-15 12:58:28.000000000 -0500
+++ shadow/73718.tmp.15752	2005-03-15 12:58:28.000000000 -0500
@@ -0,0 +1,32 @@
+Bug#: 73718
+Product: Mono: Runtime
+Version: 1.0
+OS Details: 
+Status: NEW   
+Priority: Normal
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: vargaz@gmail.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+Summary: async io causes runtime assertion
+As Seen On Mono-devel-list:
+When I use a FileStream(string, FileMode, FileAccess, FileShare, int,
+bool) constructor I get an error like below.
+** ERROR **: Thread 0x930 calling into managed code is not registered
+with the GC. On UNIX, this can be fixed by #include-ing <gc.h> before
+<pthread.h> in the file containing the thread creation code."
+The problem here is that overlapped_callback calls mono_thread_attach ()
+from the thread executing async IO, which is some random thread started by
+glibc. Since this thread is not registered with the GC, there are no GC
+data structures setup for this thread, so we can't attach to it, because it
+would cause all GC allocations to crash in GC_malloc_local.