haskell-distributed / haskell-distributed/distributed-process

A bad `CreateHandle` can crash the supervisor process

Open
#401 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

distributed-process-supervisor
Dominant language
Haskell
Stars
751
Forks
99
Avg merge
45m
Merged PRs (30d)
2

Description

The code that handles RunClosure spawns a process to deal with initialising the starting the child. The code in wrapHandle, on the other hand, unpacks and executes the Closure (SupervisorPid -> Process(ProcessId, Message)) in the supervisor's own process, which could crash and bring down the managed process itself.

Since this is a common branch - executing every time we spawn a child using that ToChildStart constructor - we should be more careful.

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

Trace the RunClosure and ToChildStart paths into wrapHandle, focusing on where the Closure (SupervisorPid -> Process (ProcessId, Message)) is unpacked and executed. Determine how a failing CreateHandle affects the supervisor, then verify that an invalid handle no longer brings down the managed process or supervisor.

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
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.