explorer: forked workers have no timeout, no kill-on-drop, and waitpid(-1) reaps unrelated children
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 56/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- rust
- Domain
- testing-qa, tooling
Research direction
Start in crates/moonpool-explorer/src/worker.rs:160 and trace the wait_any call sites in controller.rs:313 and controller.rs:417, then inspect Explorer ownership and SharedMemory cleanup in shared_mem.rs:77. Done means Explorer cleanup terminates active workers, polling observes a per-worker wall-clock ceiling, and reaping is limited to pids spawned by the explorer.
Written by the indexing model from the issue text.
Description
Found during the pre-release source audit of 8d9e779 (read-only, nothing compiled or run). Severity: medium. Status: confirmed.
Where
crates/moonpool-explorer/src/worker.rs:160(wait_any:waitpid(-1, &status, 0), noWNOHANG, no deadline)crates/moonpool-explorer/src/controller.rs:313(final drain loop)crates/moonpool-explorer/src/controller.rs:417(reap_one_and_process)Explorerhas noDropimpl (onlySharedMemorydoes,shared_mem.rs:77)
Failure scenario
A child stuck outside the simulation (a tight loop in user process code, a blocking syscall) is not covered by the in-simulation RunStallGuard; the controller blocks in waitpid until the CI job timeout kills everything with no diagnostic. A controller panic or SIGKILL orphans live children that keep running full simulations while holding the MAP_SHARED assertion and sancov regions. waitpid(-1, ..) also reaps any unrelated child of the host process when moonpool is embedded in a larger harness.
Proposed fix
Add a Drop for Explorer that SIGKILLs every pid in active, poll with WNOHANG against a per-worker wall-clock ceiling, and wait on the specific pids the explorer spawned.
- Dominant language
- Rust
- Stars
- 49
- Forks
- 3
- Avg merge
- 1h 4m
- Merged PRs (30d)
- 41
Contributor guide
No contributing guide indexed for this repository
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.
More from PierreZ/moonpool
-
bug simulation
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
bug github_actions
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
bug simulation
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug simulation
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
documentation release-blocker
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
All issues in PierreZ/moonpool
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gitbutlerapp/gitbutler#15998 · 1 comment ·
-
bug triage:deciding
Difficulty 1/5 Under an hour Newbie friendliness 88/100
open-telemetry/otel-arrow#4132 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100