[Mono-bugs] [Bug 58707][Maj] New - Exception when trying to AppDomain.Unload()

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 19 May 2004 12:17:12 -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 robik@mailbox.sk.

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

--- shadow/58707	2004-05-19 12:17:12.000000000 -0400
+++ shadow/58707.tmp.7749	2004-05-19 12:17:12.000000000 -0400
@@ -0,0 +1,84 @@
+Bug#: 58707
+Product: Mono: Runtime
+Version: unspecified
+OS: 
+OS Details: Fedora Core 1, kernel linux-2.4.22-1.2188.nptl
+Status: NEW   
+Resolution: 
+Severity: 040 One week
+Priority: Major
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: robik@mailbox.sk               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Exception when trying to AppDomain.Unload()
+
+Description of Problem:
+
+Calling AppDomain.Unload() with self-created AppDomain causes Excetion.
+
+Steps to reproduce the problem:
+
+compile and run:
+
+using System;
+
+namespace AppDomainTest
+{
+	class AppDomainTest : MarshalByRefObject
+	{
+		static void Main()
+		{
+			Console.WriteLine("AppDomainTest:Main() Entered");
+			AppDomain ad = AppDomain.CreateDomain("Test");
+			AppDomainTest adt =
+(AppDomainTest)ad.CreateInstanceAndUnwrap("AppDomainTest",
+"AppDomainTest.AppDomainTest");
+			adt.DoTest();
+			AppDomain.Unload(ad);
+			Console.WriteLine("AppDomainTest:Main() Exited");
+		}
+		void DoTest()
+		{
+			Console.WriteLine("AppDomainTest:DoTest()");
+		}
+	}
+}
+
+Actual Results:
+
+AppDomainTest:Main() Entered
+AppDomainTest:DoTest()
+free(): invalid pointer 0x9a7c968!
+ 
+** (AppDomainTest.exe:22708): WARNING **: Aborting of threads in domain
+Test timed out.
+ 
+Unhandled Exception: System.CannotUnloadAppDomainException: Aborting of
+threads in domain Test timed out.
+in (unmanaged) /usr/local/lib/libmono.so.0(mono_raise_exception+0x1b)
+[0xc81dcb]in (unmanaged) /usr/local/lib/libmono.so.0 [0xca479a]
+in <0x0004a> System.AppDomain:Unload (System.AppDomain)
+in <0x00114> AppDomainTest.AppDomainTest:Main ()
+
+Expected Results:
+
+AppDomainTest:Main() Entered
+AppDomainTest:DoTest()
+AppDomainTest:Main() Exited
+
+How often does this happen? 
+
+always
+
+Additional Information:
+
+I've made this test using binary snapshot of mono from 18.5.2004, compiled
+with the dafult options on Fedora Core 1 with linux-2.4.22-1.2188.nptl
+kernel using glibc-2.3.2 and gcc-3.3.2. Then also compiled mono with option
+--with-nptl=no, same result.
+The same thing happens on a RH9 system with mono beta 1 installed from rpm
+packages.