Skip to content

fix(ghidra): explain server restart for timeout recovery - #5356

Merged
gensokyo-dev merged 1 commit into
mainfrom
fix/ghidra-analysis-timeout
Oct 20, 2026
Merged

gensokyo-dev merged 1 commit into
mainfrom
fix/ghidra-analysis-timeout

Conversation

@gensokyo-dev

@gensokyo-dev gensokyo-dev commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

A Ghidra startup timeout told analysts to change the environment and reopen the target. REA snapshots configuration when the server starts, so close/reopen on the existing server still uses the old deadline and repeats the cold import. This can make the configurable 330-second default look like a fixed technical limit.

The shared CLI/MCP error now explains Evidence export, cleanup, changing the server launch environment, restarting REA, reconnecting MCP, and allowing enough client request time. The bundled skill (version 43) and owning guides give the same recovery flow and a concrete CLI retry. Analyzer exclusions explicitly reduce coverage. Engine defaults and analysis contracts are unchanged.

Related to #3509; this addresses timeout recovery guidance, not the separate transport-loss report or pending progress/cache designs.

Validation

  • Regression: the new restart assertion failed on the old guidance (129 other tests passed); 198 provider/config tests pass after the fix and again after rebasing onto 58d604330.
  • 100 focused boundary tests passed: provider startup, cancellation, retained cleanup, reopen, and CLI/SDK MCP diagnostic projection.
  • npm run check, npm run docs:check (including 5 consistency tests), npm run verify:package, and npm pack --dry-run passed. Package verification covered installed CLI/MCP, Evidence, skill installation/update, setup/uninstall, and cleanup. Package/boundary checks preceded the final one-commit main rebase; full static/docs checks and the real MCP proof were repeated afterwards.
  • Real stdio MCP on the current source tree: two 1 ms startup failures demonstrate that changing the parent's environment and reopening do not change the existing server. Restarting with 120,000 ms succeeds, independently checks the source-built input * 7 + 3 function, reuses a warm overview, exports its digest-linked Evidence, and removes all owned temporary roots/processes. Whole harness: 132.80 s elapsed, 65.59 s CPU, 1036.0 MiB cgroup peak.

Real Ghidra 12.1.4 / Temurin 21.0.12.1, Linux x86-64; static analysis of the public gsudo 2.5.1 x64 EXE (5,915,592 bytes; SHA-256 47d02ca82bc31ae9f4b6cc1e76dceffe610b9b664d3c18a17e0403463c48d749):

Startup budget Elapsed Family CPU Family peak Outcome
Default 330,000 ms 340.06 s 250.60 s 1235.4 MiB Typed timeout; runtime/processes removed
Fresh process, 1,800,000 ms 326.37 s 324.85 s 1213.4 MiB Success: 18,679 procedures, 4,006 defined strings; cleanup verified

| Fresh process, 1,800,000 ms, 75% CPU | 590.75 s | 404.45 s | 1226.6 MiB | Success beyond 330 s; same counts; cleanup verified |

The final-tree 75% run matched the previous success's normalized result, target digest, analysis profile, and coverage limitations exactly. The final commit amends committer identity to gensokyo-dev; its tested source tree is unchanged.

Fresh ephemeral sessions, default analyzers, 1536M configured Java heap, one CPU, 6 GiB family hard limit / 5 GiB early stop / no swap. Kernel cgroup v2 CPU and memory.peak counters include the harness and file cache, witnessed at payload exit with only the observer remaining. The first baseline overlapped a check on the same CPU, so these are recovery observations, not a speed comparison. The original reporter's EXE was not supplied; real Windows/macOS were not run. Defined-inventory and unknown PDB coverage remain in Evidence.

Two local check attempts were stopped at the 5 GiB guard without OOM. Serialized checks with an 8 GiB hard / 7 GiB early limit passed; final check peak was 5105.1 MiB. All measured lanes reported zero OOM kills.

Context: the error guidance estimate increases from 98 to 141 cl100k_base tokens. The complete current MCP proof, including both connections, failed attempts and replies, estimates 76,850 serialized wire tokens; it uses known tools without tools/list. Schema/prompt loading and actual model usage are unmeasured. No token reduction or analysis speedup is claimed.

Greptile completed review of the final head with 5/5 confidence and no actionable findings. Codex automated review was unavailable because the repository review quota was exhausted.

Author readiness

Human owner: @gensokyo-dev

The human owner explicitly delegated filling readiness, opening ready for review, and merging in the task request. Diff review and validation were performed by the agent under that delegation; no separate human diff review is claimed.

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-20T05:31:25.716894Z 812f967 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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.

@gensokyo-dev
gensokyo-dev force-pushed the fix/ghidra-analysis-timeout branch from 812f967 to 0c84279 Compare October 20, 2026 05:33
@greptile-apps

greptile-apps Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; the recovery advice matches the existing configuration and timeout paths.

Summary

Clarifies that raising Ghidra’s startup deadline requires changing REA’s launch environment and restarting the server.

  • Ghidra timeout errors explain how to apply a larger startup budget.

No actionable issues found. Whitespace checks passed; tests were not run during this review. The supersession check could not be completed because GitHub access required authentication.

Reviews (1) · Last reviewed commit: "fix(ghidra): explain server restart for ..." · Reviewed by Greptile

@gensokyo-dev
gensokyo-dev merged commit 4668cea into main Oct 20, 2026
38 checks passed
@gensokyo-dev
gensokyo-dev deleted the fix/ghidra-analysis-timeout branch October 20, 2026 05:49
@github-actions github-actions Bot mentioned this pull request Oct 20, 2026
3 tasks done
taiqi-dev added a commit to taiqi-dev/rea that referenced this pull request Oct 26, 2026
Adapt upstream morluto#5356, morluto#4650 and morluto#5662 to the Windows fork. Preserve listing facts and live retry policy, carry explicit settings into client setup, and qualify natural timeouts with a source-owned Windows DLL. Windows acceptance, default real-provider checks and SDK schema regressions passed; details in the verification record.
@morluto morluto added area: server Server layer and tool wiring bug Something isn't working provider: ghidra Analysis provider / engine: ghidra labels Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: server Server layer and tool wiring bug Something isn't working provider: ghidra Analysis provider / engine: ghidra

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants