Re: [GHC] #2408: threadWaitRead on mingw32 threaded causes internal error

threadWaitRead (used in 6.8.x to avoid the non-interruptable getChar) causes internal error on GHC 6.8.2 and 6.8.3:
{{{ prompt: test: internal error: waitRead# on threaded RTS (GHC version 6.8.2 for i386_unknown_mingw32) Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. }}}
This is because in GHC.Conc: {{{ threadWaitRead :: Fd -> IO () threadWaitRead fd #ifndef mingw32_HOST_OS | threaded = waitForReadEvent fd #endif | otherwise = IO $ \s -> case fromIntegral fd of { I# fd# -> case waitRead# fd# s of { s -> (# s, () #) }} }}} So the threaded case is ignored on mingw32, and waitRead# crashes on
#2408: threadWaitRead on mingw32 threaded causes internal error -----------------------------------+--------------------------- Reporter: kirby | Owner: Type: bug | Status: new Priority: normal | Milestone: 6.10.1 Component: libraries/base | Version: 7.6.1 Resolution: | Keywords: Operating System: Windows | Architecture: x86 Type of failure: Runtime crash | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -----------------------------------+--------------------------- Changes (by blackbox.dev): * status: closed => new * cc: blackbox.dev.ml@… (added) * failure: => Runtime crash * version: 6.8.3 => 7.6.1 * owner: simonmar => * resolution: fixed => Comment: This bug still occurs, see last comment on https://github.com/twittner /zeromq-haskell/issues/8 {{{ display.exe: internal error: waitRead# on threaded RTS (GHC version 7.6.3 for i386_unknown_mingw32) Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. }}} Replying to [ticket:2408 kirby]: threaded RTS.
It should be at least written on the threadWaitRead documentation, and a workaround provided.
I've attached a little program to show the issue (if compiled with -threaded on windows).
-- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/2408#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC