pattern match failure if compiled with -threaded
Always reproducible with the following program, compiled with ghc -rtsopts -threaded test.hs.
import Network (listenOn, PortID(PortNumber))
import Network.Socket (accept, sClose)
import Control.Monad (forever)
import Control.Concurrent (forkIO)
main = listenOn (PortNumber 3333) >>= \s ->
forever $ accept s >>= forkIO . sClose . fst
$ ./test +RTS -N2
user error (Pattern match failure in do expression at libraries/base/System/Event/Thread.hs:63:3-10
base-4.3.0.0
Trac metadata
Trac field | Value |
---|---|
Version | 7.0.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | libraries/base |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |