Skip to content

Fix GAR cleanup and bridge startup races - #17

Merged
toratako merged 2 commits into
masterfrom
fix/gar-cleanup-pid-races
Oct 2, 2026
Merged

toratako merged 2 commits into
masterfrom
fix/gar-cleanup-pid-races

Conversation

@toratako

@toratako toratako commented Oct 2, 2026 •

Copy link
Copy Markdown
Owner

GAR snapshot validation opened a writable Ghidra project, starting database cleanup that could outlive close() and race archive traversal or restore publication. Inspect snapshots read-only without resetting ownership. Native archive and external-link test helpers also avoid starting cleanup on their closed sources.

Bridge startup now stages and publishes its provisional launcher PID without overwriting an existing file. A parent resumed after Java has published its authoritative PID can no longer replace it with the launcher PID, including while Java's file is still empty.

The GAR regression models the cleanup scratch-file lifetime with latches at the writable-inspection boundary and checks that genuine missing project data still fails. It reuses the existing interoperability test's JVM. Both GAR and PID regressions failed before their fixes and passed afterwards. The queue-drain test now waits for the acknowledged JVM to exit before teardown, removing an observed 60-second redundant connection retry. No additional JVM startups or suite serialization were added.

CI's Rust 1.99 also flagged an existing redundant closure borrow in JAR validation. Remove that borrow; all 25 installation tests and local clippy pass.

Local validation on Linux with Ghidra 12.1.2:

  • Library/binary unit tests: 452 passed; harness, output, and routing suites: 225 passed.
  • Project, bootstrap, fixture, and reliability suites: 31 passed.
  • Job/queue/cancellation tests: 5 passed; final native GAR/external-link checks: 2 passed; updated shutdown test: 1 passed, with teardown reduced from 60.00s to 0.00s.
  • xtask tests: 14 passed; installer tests: 2 passed; formatting, clippy, generated command tree, and diff checks passed.

All 25 PR checks passed at 6e7e3a8, including native Linux, Windows, and macOS tests with Ghidra 12.1.3 / Java 21, plus lint and dependency audit. The native CI run passed project/GAR interoperability, daemon (55 tests per OS), read-only and mutation integration, and standalone JAR coverage. Logs confirm that the GAR snapshot regression and queue-drain shutdown test ran successfully on all three OSes.

Ghidra 11 API compatibility was checked against its tagged source; it was not run locally.

Fixes #16.

@toratako
toratako marked this pull request as ready for review October 2, 2026 16:44
@toratako
toratako merged commit f02b724 into master Oct 2, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Investigate intermittent GAR snapshot failure during Ghidra cleanup

1 participant