#551: "No threads to run" ignores finalizers -----------------------------+---------------------------------------------- Reporter: chak | Owner: simonmar Type: bug | Status: closed Priority: normal | Milestone: Component: Runtime System | Version: 5.0 Resolution: Fixed | Keywords: -----------------------------+---------------------------------------------- Comment(by marlowsd@…): commit 1ae72ac45e51e63cbf6f3d627d77acc6a36aa0f9 {{{ Author: Simon Marlow <marlowsd@gmail.com> Date: Tue Jul 2 12:10:53 2013 +0100 Fix #7970, #2161, unfix #551 Establish the reachability of threads before weak pointers. Hence a deadlocked thread can keep a weak pointer alive and prevent it from being finalized early. However, an reference from the finalizer of a weak pointer will no longer prevent a thread from being considered deadlocked (#551). To keep the thread alive in that situation you need to use a StablePtr. See comments on #7970 and in the code for more details. rts/sm/MarkWeak.c | 100 +++++++++++++++++++++++++++------------------------- 1 files changed, 52 insertions(+), 48 deletions(-) }}} -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/551#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler