#4533: IO manager can leak MVars if threads are killed
---------------------------------+------------------------------------------
Reporter: bos | Owner:
Type: bug | Status: new
Priority: normal | Component: Runtime System
Version: 7.0.1 | Keywords:
Testcase: | Blockedby:
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: Incorrect result at runtime
---------------------------------+------------------------------------------
Comment(by bos):
I spent a little bit of time working on this tonight, and have attached
the (not currently working) patch I put together.
This deadlocks on the example program from #4514, so it's clearly
seriously ill in some way. I haven't figured out exactly what's going
wrong yet, but I think that maybe the callback closure is being GCed
because nothing refers to it.
Maybe I'll have to extend the {{{registerFd}}} signature to accept a value
(in this case the {{{MVar}}}) that the manager can hold a weak reference
to, which the client guarantees to keep alive as long as it is.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4533#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs