distributed-process icon indicating copy to clipboard operation
distributed-process copied to clipboard

Fix testBreakConnection and undo workaround

Open facundominguez opened this issue 10 years ago • 4 comments

The bug:

A process PA in NA monitors a process PB in NB
NA and NB are disconnected
PA tries to send a message to another process PB1 in NB
A monitor notification about PB1 death arrives to PA
No monitor notification about PB arrives to PA.

This is observed only in tests so far (MonitorNode, MonitorLiveNode, MonitorChannel from CH). These tests break connections with testBreakConnection, which doesn't deliver EventConnectionLost. If the transport delivered EventConnectionLost, then d-p would notify the death of all processes, I hope.

Instead, d-p has a patch that workarounds the problem: haskell-distributed#246

facundominguez avatar Jul 17 '15 13:07 facundominguez

These tests break connections with testBreakConnection, which doesn't deliver EventConnectionLost isn't this a bug specific to the network-transport backend being used during tests?

mboes avatar Nov 02 '15 13:11 mboes

Yes, probably so.

facundominguez avatar Nov 02 '15 14:11 facundominguez

Then move issue to e.g. n-t-tcp? Does n-t-inmemory suffer from the same problem?

mboes avatar Nov 02 '15 14:11 mboes

testBreakConnection is not implemented by n-t-tcp, but it is rather done in d-p-tests [1].

Addressing this probably requires implementing breakConnection in n-t-tcp (now haskell-distributed/network-transport-tcp#39). n-t-inmemory already implements it and AFAICS it does deliver EventConnectionLost.

[1] https://github.com/haskell-distributed/distributed-process/blob/24cc188d83b74cd3094deaf0b94d99473c38c7b1/distributed-process-tests/tests/runTCP.hs#L25

facundominguez avatar Nov 02 '15 18:11 facundominguez