[GHC] #10629: threadWaitRead throws BlockedIndefinitelyOnMVar

GHC ghc-devs at haskell.org
Fri Jul 10 22:20:12 UTC 2015


#10629: threadWaitRead throws BlockedIndefinitelyOnMVar
-------------------------------------+-------------------------------------
              Reporter:              |             Owner:  simonmar
  facundo.dominguez                  |            Status:  new
                  Type:  bug         |         Milestone:
              Priority:  normal      |           Version:  7.10.1
             Component:  Runtime     |  Operating System:  Linux
  System                             |   Type of failure:  Incorrect result
              Keywords:              |  at runtime
  concurrency sockets                |        Blocked By:
          Architecture:              |   Related Tickets:
  Unknown/Multiple                   |
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------
 In a project using the network-transport-tcp package, I'm observing
 {{{threadWaitRead}}} throw the exception {{{BlockedIndefinitelyOnMVar}}}.

 The call stack is roughly:

 {{{
 ...
 n-t-tcp:Network.Transport.TCP.handleIncomingMessages
 n-t-tcp:Network.Transport.TCP.Internal.recvInt32
 n-t-tcp:Network.Transport.TCP.Internal.recvExact
 network:Network.Socket.ByteString:recv
 network:Network.Socket.ByteString:recvInner
 network:Network.Socket.Internal:throwSocketErrorWaitRead
 base:Control.Concurrent:threadWaitRead
 }}}

 IIUC this would be an RTS bug. The socket file descriptor is healthy and
 works fine if the exception is caught and {{{threadWaitRead}}} is retried.

 Unfortunately, I can only reproduce this in a particular machine and with
 a rather complex test case.

 I'd appreciate any advice on inspecting the RTS code to scan for the cause
 of {{{BlockedIndefinitelyOnMVar}}} being thrown.

 Of course, if someone can help explaining this behavior I'll be most
 thankful.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10629>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list