haskell-distributed / haskell-distributed/distributed-process

[DP-101] Possibly incorrect monitor behavior

Open
#211 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

api Bug
Dominant language
Haskell
Stars
751
Forks
99
Avg merge
45m
Merged PRs (30d)
2

Description

[Imported from JIRA. Reported by Facundo Dominguez @facundominguez) as DP-101 on 2015-02-09 20:22:23]
The following program blocks because the expected ProcessMonitorNotification never arrives, but a monitor notification would be expected according to the semantic notes.

Tested with runhaskell monitorTest.hs

import Control.Distributed.Process
import Control.Distributed.Process.Node
import Network.Transport.TCP
import qualified Network.Socket as N

main :: IO ()
main = do
  Right (transport, internals) <- createTransportExposeInternals "127.0.0.1" "8080" defaultTCPParameters
  lnode0 <- newLocalNode transport initRemoteTable
  lnode1 <- newLocalNode transport initRemoteTable
  runProcess lnode0 $ do
    self <- getSelfPid
    liftIO $ runProcess lnode1 $ do
      send self ()
      liftIO $ N.close =<< socketBetween internals (nodeAddress $ localNodeId lnode0)
                                                   (nodeAddress $ localNodeId lnode1)
      send self ()
      -- removing this timeout has the test complete
      receiveTimeout 100000 [] :: Process (Maybe ())
      monitor self
      ProcessMonitorNotification _ _ _ <- expect
      liftIO $ putStrLn "SUCCESS!"

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the provided monitorTest.hs program with runhaskell and compare its behavior with the semantic notes referenced in the issue. Trace the monitor and ProcessMonitorNotification handling involved in the connection close and timeout; done means the expected notification arrives and the program reaches the SUCCESS output.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.