[Mono-bugs] [Bug 76684][Wis] New - Mono crashes when creating too many threads or running too many processes

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sat Nov 12 13:22:46 EST 2005


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 carlos at applianz.com.

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

--- shadow/76684	2005-11-12 13:22:46.000000000 -0500
+++ shadow/76684.tmp.2275	2005-11-12 13:22:46.000000000 -0500
@@ -0,0 +1,70 @@
+Bug#: 76684
+Product: Mono: Class Libraries
+Version: 1.1
+OS: other
+OS Details: Gentoo 64bit
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: System
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: carlos at applianz.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Mono crashes when creating too many threads or running too many processes
+
+I do not know if it was the threads or launching the processes that killed
+mono. I was trying to make an example for another problem I have but
+instead I ended up getting the error below. I'm not surprised this code
+failed, just of the way it failed, is there a way for me to catch that kind
+of an error?
+
+** ERROR **: file handles.c: line 564 (_wapi_lookup_handle): assertion
+failed: (shared_handle_data->type == type)
+aborting...
+Killed
+
+
+using System;
+using System.Diagnostics;
+using System.Threading;
+
+namespace Proc
+{
+	/// <summary>
+	/// Summary description for Class1.
+	/// </summary>
+	class Class1
+	{
+		/// <summary>
+		/// The main entry point for the application.
+		/// </summary>
+		[STAThread]
+		static void Main(string[] args)
+		{
+			for (int i =0; i < 100; i++)
+			{
+				Thread thread = new Thread(new ThreadStart(Run));
+				thread.IsBackground = true;
+				thread.Start();
+			}
+			
+			
+			Console.ReadLine();
+			Console.WriteLine("Exiting");
+		}
+		private static void Run()
+		{
+			Process p = Process.Start("xcalc");
+			while(true)
+			{
+				Console.WriteLine(DateTime.Now +":"+
+Process.GetProcessById(p.Id).HasExited);
+				Thread.Sleep(200);
+			}
+		}
+	}
+}


More information about the mono-bugs mailing list