[Mono-bugs] [Bug 34963][Wis] Changed - Mono leaks lock/monitor handles
4 Dec 2002 01:21:40 -0000
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 email@example.com.
--- shadow/34963 Tue Dec 3 12:35:14 2002
+++ shadow/34963.tmp.6970 Tue Dec 3 20:21:40 2002
@@ -1,14 +1,14 @@
@@ -121,6 +121,30 @@
As you can see with the above code, LOTS of unique object locks are
created but the task manager doesn't seem to indicate much of an increase
in native OS handles.
I stumbled on the handle leak by accident and it took a _long_ time to
trace the cause back to the lock :(.
+------- Additional Comments From firstname.lastname@example.org 2002-12-03 20:21 -------
+I've had time to trace the source of the bug in the runtime. It
+appears that mon_finalize (thread.c) fails to delete a critical
+Here's what I believe the fix should be. I can't test this cause
+the CVS build is broken :(.
+static void mon_finalize (void *o, void *unused)
+ MonoThreadsSync *mon=(MonoThreadsSync *)o;
+ g_message (G_GNUC_PRETTY_FUNCTION ": Finalizing sync");
+ CloseHandle (mon->monitor);
+ CloseHandle (mon->sema);
+ CloseHandle (mon->waiters_done);