[Mono-bugs] [Bug 72740][Maj] New - Deadlock with Thread.Abort

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Fri, 18 Feb 2005 16:12:01 -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 bmaurer@users.sf.net.

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

--- shadow/72740	2005-02-18 16:12:01.000000000 -0500
+++ shadow/72740.tmp.22671	2005-02-18 16:12:01.000000000 -0500
@@ -0,0 +1,52 @@
+Bug#: 72740
+Product: Mono: Runtime
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: bmaurer@users.sf.net               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Deadlock with Thread.Abort
+
+This test case will deadlock, usually within 10-20 iterations.
+
+I am running on a hyperthreaded cpu, so that may be affecthing things.
+
+using System;
+using System.Threading;
+
+class X {
+	static void Main ()
+	{
+		Thread [] threads = new Thread [10];
+		while (true) {
+			
+			for (int i = 0; i < threads.Length; i ++) {
+				threads [i] = new Thread (Worker);
+				threads [i].Start ();
+			}
+			
+			for (int i = 0; i < threads.Length; i ++) {
+				threads [i].Abort ();
+			}
+			
+			Console.Write (".");
+			
+		}
+	}
+	
+	static void Worker ()
+	{
+		while (true) {
+			Type [] x = typeof (object).Assembly.GetTypes ();
+		}
+	}
+}