Re: [GHC] #4934: threadWaitRead works incorrectly on nonthreaded RTS
#4934: threadWaitRead works incorrectly on nonthreaded RTS ------------------------------------------------+-------------------------- Reporter: slyfox | Owner: Type: bug | Status: patch Priority: normal | Milestone: ⊥ Component: Runtime System | Version: 7.0.1 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 Type of failure: Incorrect result at runtime | (amd64) Test Case: | Difficulty: Blocking: | Unknown | Blocked By: | Related Tickets: ------------------------------------------------+-------------------------- Comment (by Simon Marlow <marlowsd@…>): In [changeset:"9fd507e5758f4141ac2619f0db57136bcab035c6/ghc"]: {{{ #!CommitTicketReference repository="ghc" revision="9fd507e5758f4141ac2619f0db57136bcab035c6" Raise exceptions when blocked in bad FDs (fixes Trac #4934) Before the patch any call to 'select()' with 'bad_fd' led to: - unblocking of all threads - hiding exception for 'threadWaitRead bad_fd' The patch fixes both cases in this way: after 'select()' failure we iterate over each blocked descriptor and poll individually to see it's actual status, which is: - READY (move to run queue) - BLOCKED (leave in blocked queue) - INVALID (send an IOErrror exception) Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/4934#comment:26> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC