[Mono-bugs] [Bug 54980][Maj] Changed - AppDomain.Unload() fails randomly

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 4 Mar 2004 14:42:26 -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 jaak@zd.com.pl.

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

--- shadow/54980	2004-02-29 12:24:51.000000000 -0500
+++ shadow/54980.tmp.28160	2004-03-04 14:42:26.000000000 -0500
@@ -62,6 +62,15 @@
 ------- Additional Comments From vargaz@freemail.hu  2004-02-29 12:24 -------
 This (and other bugs) is caused by locking problems inside the runtime.
 When an appdomain is unloaded, all threads executing in the domain are
 aborted. When a thread is aborted, it might be holding unmanaged locks,
 like a lock on the domain. Since the runtime does not have finalizers,
 these locks remain locked by the dead thread, leading to a deadlock.
+
+------- Additional Comments From jaak@zd.com.pl  2004-03-04 14:42 -------
+I've analyzed this a bit. Looks like the timeouts in "appdomain.c"
+(one second for thread aborting and finalizing) are too small.
+
+When I boosted them to 10 seconds, my problem disappeared. 
+
+I'm attaching the patch. Can you consider applying it as it fixes many
+problems with NAnt and NUnit on Linux?