[Mono-bugs] [Bug 55749][Maj] Changed - Another deadlock when running static constructors
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Fri, 19 Mar 2004 08:29:15 -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 lluis@ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=55749
--- shadow/55749 2004-03-19 08:15:54.000000000 -0500
+++ shadow/55749.tmp.9075 2004-03-19 08:29:15.000000000 -0500
@@ -99,6 +99,19 @@
------- Additional Comments From vargaz@freemail.hu 2004-03-19 08:15 -------
I'm pretty sure the real fix would be to use the algorithm in the spec.
In the meantime, it should be possible to use a per-vtable lock instead
of the domain lock. That would fix the most common occurences of this
problem.
+
+------- Additional Comments From lluis@ximian.com 2004-03-19 08:29 -------
+Ok, I will work on this three fixes:
+
+* I will move mini_method_compile out of the domain lock. In the worst
+case we can have two threads compiling the same method, but one of
+them will discard the compiled method after realizing that someone
+already did the job. This should get rid of deadlocks between managed
+and unmanaged locks.
+* I will add a per-class domain lock, to avoid multiple threads
+running the same class constructor.
+* I will implement the algorithm in the spec, so this should get rid
+of deadlocks between class constructors trying to execute each other.