threadWaitRead throws BlockedIndefinitelyOnMVar
In a project using the network-transport-tcp package, I'm observing
threadWaitRead throw the exception
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 cluster and with a rather complex test case while using the threaded runtime.
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.