[Mono-bugs] [Bug 28722][Nor] Changed - Thread crashes with garbage collection enabled

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 14 Apr 2005 23:41:09 -0400 (EDT)


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 michi@zeroc.com.

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

--- shadow/28722	2003-04-27 16:40:04.000000000 -0400
+++ shadow/28722.tmp.10565	2005-04-14 23:41:09.000000000 -0400
@@ -1,12 +1,12 @@
 Bug#: 28722
-Product: Mono/Runtime
+Product: Mono: Runtime
 Version: unspecified
 OS: unknown
 OS Details: SuSE Linux 8.0
-Status: NEW   
+Status: NEEDINFO   
 Resolution: 
 Severity: Unknown
 Priority: Normal
 Component: misc
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: murban@houston.rr.com               
@@ -133,6 +133,58 @@
 Lupus committed a fix to enable threading support in libgc.  Please
 have another look at this to see if that fixed your problem.
 
 
 ------- Additional Comments From miguel@ximian.com  2003-04-27 16:40 -------
 Can not reproduce this bug on RH9 either
+
+------- Additional Comments From michi@zeroc.com  2005-04-14 23:41 -------
+I just tried this, very slightly modified, using RH8 on a dual-CPU
+machine. I got (after 10 seconds):
+
+71304
+71305
+71306
+71307
+71308
+** ERROR **: file critical-sections.c: line 89
+(DeleteCriticalSection): assertion failed: (ret == 0)
+aborting...
+
+(x.exe:9998): GLib-CRITICAL **: file ghash.c: line 225
+(g_hash_table_lookup): assertion `hash_table != NULL' failed
+
+(x.exe:9998): GLib-CRITICAL **: file ghash.c: line 225
+(g_hash_table_lookup): assertion `hash_table != NULL' failed
+
+(x.exe:9998): GLib-CRITICAL **: file ghash.c: line 225
+(g_hash_table_lookup): assertion `hash_table != NULL' failed
+Aborted
+
+Here is the updated program. The only change is the call to Exit()
+when the main thread wakes up:
+
+using System;
+using System.Threading;
+
+class ThreadTest
+{
+    static int count;
+
+    static void Main()
+    {
+        Thread t1 = new Thread( new ThreadStart( Go ) );
+        t1.Start();
+        Thread.Sleep(10000);
+        System.Environment.Exit(0);
+    }
+
+    static void Go()
+    {
+        while (true)
+        {
+            Console.WriteLine(count);
+            count += 1;
+        }
+    }
+}
+