haskell-distributed / haskell-distributed/distributed-process
[NTTCP-12] Fix potential locking when waiting on the crossed MVar
Nobody has claimed this yet.
- Dominant language
- Haskell
- Stars
- 751
- Forks
- 99
- Avg merge
- 45m
- Merged PRs (30d)
- 2
Description
[Imported from JIRA. Reported by Facundo Dominguez @facundominguez) as NTTCP-12 on 2015-05-27 20:55:45]
The handler of incomming requests is waiting on the {{crossed}} MVar before accepting an incoming connection.
This wait is potentially indefinite (if the CrossConnectRequest message does not arrive), and it looks unnecessary. At least I cannot come up with any problematic interleaving of events in the absence of it.
We should either remove the {{crossed}} MVar or document what is helping to accomplish (preferrably the problematic ordering of events that is being ruled out).
There is the commit [message|https://github.com/haskell-distributed/network-transport-tcp/commit/6207de60bae7fcf39c108a49bdc152a98abdd277] of the commit that introduces it. Unfortunately, it doesn't explain the "certain ordering of events" that motivates it.
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
Start with the incoming-request handler and the crossed MVar described in the issue, then read commit 6207de60bae7fcf39c108a49bdc152a98abdd277 for its original context. Determine whether the wait can be removed safely or document the ordering it protects; done means the locking concern is resolved and the rationale is explicit.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- distributed-systems
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100