haskell-distributed / haskell-distributed/distributed-process
Third call to receive after endpoint close will can't be finished
Nobody has claimed this yet.
- Dominant language
- Haskell
- Stars
- 751
- Forks
- 99
- Avg merge
- 45m
- Merged PRs (30d)
- 2
Description
receive function n-t-tcp is implemented in such a way that first call to receive after EndPoint closed will return a chunk that will be evaluated to UserError "EndPointClosed" and next one will never finish.
Simple test:
Right transport1 <- createTransport "127.0.0.1" "0" defaultTCPParameters
Right ep1 <- newEndPoint transport1
closeEndPoint ep1
EndPointClosed <- receive ep1
Right _ <- trySome $ receive ep1
_ <- receive ep1
I'm not sure if this a problem, because use should not call receive after we had EndPointClosed event, maybe only in multithreaded case
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the sequence in the issue, focusing on the third receive after close. Read Network.Transport.TCP.hs around lines 704-717 and determine the expected behavior after EndPointClosed; done means the repeated receive behavior is covered by a test and no longer hangs, subject to the project's intended endpoint-close semantics.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- distributed-systems, networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100