[GHC] #13167: GC and weak reference finalizers and exceptions
GHC
ghc-devs at haskell.org
Mon May 14 07:56:18 UTC 2018
#13167: GC and weak reference finalizers and exceptions
-------------------------------------+-------------------------------------
Reporter: Yuras | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by simonmar):
The example program in the description doesn't wait for the finalizer
threads to complete, so it might exit while there are still finalizers
alive. This is why you don't see deterministic output. Probably adding a
`threadDelay 1000000` at the end would be enough.
A deadlock sounds like a plausible explanation for the behaviour you're
seeing.
The fix to `runFinalizerBatch` looks good - we should probably do that
anyway (I'm sure you could construct a test case to demonstrate the
problem that it fixes).
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13167#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list