[Mono-bugs] [Bug 34607][Maj] New - gc goes bust during multithreading

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
26 Nov 2002 05:14:37 -0000


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 rosh_spark@gmx.net.

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

--- shadow/34607	Tue Nov 26 00:14:37 2002
+++ shadow/34607.tmp.29601	Tue Nov 26 00:14:37 2002
@@ -0,0 +1,68 @@
+Bug#: 34607
+Product: Mono/Runtime
+Version: unspecified
+OS: 
+OS Details: nt 4 with service pack 5
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: rosh_spark@gmx.net               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: gc goes bust during multithreading
+
+Please fill in this template when reporting a bug, unless you know what you 
+are doing.
+Description of Problem:
+the mono gc throws an error and teh runtime quits during a multi threaded 
+application. the gc says 'too many threads'.
+
+
+Steps to reproduce the problem:
+compile the followinf code with mcs and run it using mono runtime. 
+mint seems to handle it .. but the again ...
+
+using System;
+using System.Threading;
+
+namespace LearnThreads
+{
+	class Thread_App
+       {
+       	public static void First_Thread()
+              {
+              	Console.WriteLine("Thread 
+Name:"+Thread.CurrentThread.Name);
+			for(int i=0;i<10;i++)
+			{
+				Console.WriteLine("{0} : 
+{1}",Thread.CurrentThread.Name,i);
+			}
+   		}
+
+              public static void Main()
+              {
+              	ThreadStart thr_start_func = new ThreadStart 
+(First_Thread);
+                     Console.WriteLine ("Creating threads ..");
+			for(int i=0;i<100;i++)
+			{
+       	              Thread th = new Thread (thr_start_func);
+	       	       th.Name = "Thread "+i.ToString();
+	                    	th.Start ();       //starting the thread
+			}
+              }
+	}
+}
+
+How often does this happen? 
+apparently the application did run once succesfully on the runtime and 
+hasnt run since. 
+
+Additional Information:
+please try to get it working.