Skip to content

fix(hopper): stop Linux demo children when the REA owner exits - #2499

Merged
N0zoM1z0 merged 1 commit into
mainfrom
fix/hopper-orphan-lifecycle
Oct 13, 2026
Merged

N0zoM1z0 merged 1 commit into
mainfrom
fix/hopper-orphan-lifecycle

Conversation

@N0zoM1z0

Copy link
Copy Markdown
Collaborator

After a Linux Hopper demo MCP owner is SIGKILLed, its detached helper continues waiting for Hopper. The vendor singleton forwards later launches into that orphan, so every subsequent native operation exits 75 with license-prompt guidance. This was reproduced with real Hopper 6.4.2 on Ubuntu 24.04, including a successful CLI baseline and a failing different-target analysis after killing only the MCP owner.

Bind the owned Linux helper to REA's private piped stdin. EOF during startup or after bridge readiness unwinds the existing cleanup of its direct Hopper and Xvfb children. The stream accepts both FIFO and libuv Unix socket transports. Add production-boundary tests and real graceful/SIGKILL CLI/MCP recovery checks, with an unrelated Hopper-name sentinel. Clarify the documented macOS document retention and owned Linux demo shutdown behavior.

Fixes #2459.

Validation:

  • npm run check and npm run docs:check passed.
  • 79 focused Hopper launch, startup, cleanup, lease, restart, and verification tests passed; the final changed Python fixture was rerun through its 12-test boundary file. Both Python suites passed (20 tests).
  • Real Hopper 6.4.2 demo on Ubuntu 24.04 x64, Node 24.18.0: baseline SIGKILL reproduction fails with exit 75; the patched workflow cleans helper/Hopper/Xvfb after graceful exit and SIGKILL, recovers the stale lease, reopens the same and a different ELF through the CLI, and allows a subsequent MCP session. Token-based process cleanup verification and the unrelated sentinel passed. The new verifier is included in the existing real-Hopper lane.
  • Codex CLI 0.161.0 connected to the real MCP server, opened /usr/bin/true, listed 86 procedures and returned Evidence. It finished with the session open; afterward no helper/Hopper/Xvfb remained and a different-target CLI analysis succeeded. Temporary copied authentication was removed.
  • Full npm run verify:hopper:linux was attempted on both the patch and untouched main bb540826d: both fail at the same existing fixture omitted its real long literal assertion in verifySearchModes. The focused real owner-exit verifier passed independently; this PR does not claim a full real-Hopper lane pass. Licensed Hopper, macOS, WSL, and the user/mount namespace fallback were not exercised on a real provider.

Already orphaned applications from older REA versions still require closing manually. SIGKILL can retain private runtime files; subsequent sessions recover the lease after the helper finishes child cleanup. The change prevents the recurring singleton wedge without adopting or signaling unrelated applications.

Bind the owned demo helper to REA's private stdin stream and unwind child
cleanup on EOF during startup or analysis. Verify graceful and SIGKILL owner
exit through real CLI/MCP workflows and preserve unrelated processes.

Assisted-by: Reimu (gensokyo-skills:reimu-incident-triage)
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@N0zoM1z0
N0zoM1z0 merged commit c105391 into main Oct 13, 2026
36 checks passed
@N0zoM1z0
N0zoM1z0 deleted the fix/hopper-orphan-lifecycle branch October 13, 2026 04:59
@morluto morluto mentioned this pull request Oct 13, 2026
3 tasks done
@morluto morluto added bug Something isn't working area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior labels Oct 14, 2026
@morluto morluto added the provider: hopper Analysis provider / engine: hopper label Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior bug Something isn't working provider: hopper Analysis provider / engine: hopper

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Linux Hopper demo: dead owner leaves the singleton app wedging every later native op (exit 75, license-prompt advice, green doctor, no recovery)

2 participants