Skip to content

ADFA-4496 feat(sync): detect phantom-process SIGKILL and show an acti…#107

Merged
luisguzman-adfa merged 1 commit into
mainfrom
fix/ADFA-4496-phantom-safety-net
Jul 1, 2026
Merged

ADFA-4496 feat(sync): detect phantom-process SIGKILL and show an acti…#107
luisguzman-adfa merged 1 commit into
mainfrom
fix/ADFA-4496-phantom-safety-net

Conversation

@luisguzman-adfa

Copy link
Copy Markdown
Collaborator

…onable message

Safety net for Android 12+ phantom-process killing (the root of the share flakiness). When the OS reaps the native rsync transfer child, Process.waitFor() returns 137 (128 + SIGKILL). Detect that exit code and, instead of a generic 'exit code 137', tell the user what happened and how to prevent it (Developer options toggle on 14+, or the ADB optimization). No permissions, no logcat.

  • RsyncOutcome: new Transfer.KILLED + wasKilledBySignal(137); classifyTransfer maps 137 -> KILLED. Pure/JVM-tested (RsyncOutcomeTest.sigkillIsClassifiedAsKilled).
  • RsyncManager.startClient: handle KILLED -> onError(rsync_error_process_killed).
  • New string rsync_error_process_killed in en/es/fr/pt/hi/ru (translations are first-pass, worth a native review).

Next slices (designed in the research doc, not in this commit): informed pre-flight using PhantomProcessHelper (detect monitor state + deep-link to Developer options), and host-side daemon-death detection.

…onable message

Safety net for Android 12+ phantom-process killing (the root of the share
flakiness). When the OS reaps the native rsync transfer child, Process.waitFor()
returns 137 (128 + SIGKILL). Detect that exit code and, instead of a generic
'exit code 137', tell the user what happened and how to prevent it (Developer
options toggle on 14+, or the ADB optimization). No permissions, no logcat.

- RsyncOutcome: new Transfer.KILLED + wasKilledBySignal(137); classifyTransfer
  maps 137 -> KILLED. Pure/JVM-tested (RsyncOutcomeTest.sigkillIsClassifiedAsKilled).
- RsyncManager.startClient: handle KILLED -> onError(rsync_error_process_killed).
- New string rsync_error_process_killed in en/es/fr/pt/hi/ru (translations are
  first-pass, worth a native review).

Next slices (designed in the research doc, not in this commit): informed
pre-flight using PhantomProcessHelper (detect monitor state + deep-link to
Developer options), and host-side daemon-death detection.
@luisguzman-adfa luisguzman-adfa merged commit 71eafa7 into main Jul 1, 2026
1 check passed
@luisguzman-adfa luisguzman-adfa deleted the fix/ADFA-4496-phantom-safety-net branch July 1, 2026 04:40
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.

1 participant