[commit: ghc] master: need to release the SM lock around heapCensus() to avoid deadlock with (a592f6b)
Simon Marlow
marlowsd at gmail.com
Thu Jul 21 16:47:40 CEST 2011
Repository : ssh://darcs.haskell.org//srv/darcs/ghc
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/a592f6b40d59aa496dc5f59bd9e59d797ec1c6e1
>---------------------------------------------------------------
commit a592f6b40d59aa496dc5f59bd9e59d797ec1c6e1
Author: Simon Marlow <marlowsd at gmail.com>
Date: Thu Jul 21 14:29:58 2011 +0100
need to release the SM lock around heapCensus() to avoid deadlock with
+RTS -hT and -threaded.
>---------------------------------------------------------------
rts/sm/GC.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/rts/sm/GC.c b/rts/sm/GC.c
index 396992c..2b9ee9d 100644
--- a/rts/sm/GC.c
+++ b/rts/sm/GC.c
@@ -668,7 +668,9 @@ GarbageCollect (rtsBool force_major_gc,
// behind.
if (do_heap_census) {
debugTrace(DEBUG_sched, "performing heap census");
+ RELEASE_SM_LOCK;
heapCensus();
+ ACQUIRE_SM_LOCK;
}
// send exceptions to any threads which were about to die
More information about the Cvs-ghc
mailing list