
#4934: threadWaitRead works incorrectly on nonthreaded RTS ------------------------------------------------+-------------------------- Reporter: slyfox | Owner: Type: bug | Status: new 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 slyfox): Some notes about the code which does '''threadWaitRead''' from haskell, but does not perform '''read()'''. For xmobar the bug was in polling on X11 socket from haskell code, and handling of sockets from C code (which ignored bad FD). Thus such code led to 100% CPU busy loop: {{{ x11_ctx <- get_x11_ctx forever $ do threadWaitRead (x11_connection x11_ctx) x11_poll_events event_callback -- ignores -EBADF }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/4934#comment:18 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler