#4514: IO manager can deadlock if a file descriptor is closed behind its back
---------------------------------+------------------------------------------
Reporter: adept | Owner: bos
Type: bug | Status: patch
Priority: normal | Component: Runtime System
Version: 7.0.1 | Keywords:
Testcase: | Blockedby:
Os: Linux | Blocking:
Architecture: Unknown/Multiple | Failure: Incorrect result at runtime
---------------------------------+------------------------------------------
Comment(by tibbe):
Presumably `threadWaitRead` would throw an exception upon receiving
`evtReadHup`. Alternatively we could have the MVar allocated in
`threadWait` contain something different than unit to indicate that the
file descriptor went away and that `threadWait` should throw an exception.
Another thing: we need to be careful so that the callback `IntMap` doesn't
hold on to `MVar`s after the owning thread is dead (e.g. due to an
exception). Perhaps the callbacks should be weak references.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4514#comment:21>
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