Skip to content

ADFA-4544: reach the tar diagnostic on a broken pipe (+ throttle log …#193

Merged
luisguzman-adfa merged 1 commit into
mainfrom
fix/ADFA-4544-surface-tar-failure
Jul 12, 2026
Merged

ADFA-4544: reach the tar diagnostic on a broken pipe (+ throttle log …#193
luisguzman-adfa merged 1 commit into
mainfrom
fix/ADFA-4544-surface-tar-failure

Conversation

@luisguzman-adfa

Copy link
Copy Markdown
Collaborator

Completes ADFA-4544's diagnostic. On a broken pipe (tar dies mid-extraction), closing/flushing tar's stdin re-threw EPIPE and escaped to the outer catch as a bare "Fatal Error: EPIPE", bypassing waitFor() and the rich diagnostic (tar exit code, last tar output, free disk space).

Changes (TarExtractor.java only):

  • Close tar's stdin defensively (swallow the close/flush EPIPE) and guard the happy-path flush, so waitFor() and the failure diagnostic always run.
  • Throttle the per-file "Tar Output" logcat line so it stops flooding logcat (which dropped the real error "over proc quota"); the full tail is kept in memory for the surfaced diagnostic.

Diagnostic-only — no happy-path behaviour change. Makes a future extraction failure legible (e.g. exit 137 phantom-process kill, or ENOSPC) instead of an opaque EPIPE. Relates to ADFA-4496.

…flood)

When tar died mid-stream, closing its stdin via try-with-resources re-threw
EPIPE on flush/close, which escaped to the outer catch as a bare 'Fatal
Extraction Error: EPIPE' and bypassed the rich diagnostic (tar exit code, last
tar output, disk space). Close tarInput defensively (swallow the close EPIPE)
and guard the happy-path flush, so waitFor() and the diagnostic always run.
Also throttle the per-file 'Tar Output' logcat line — it was flooding logcat
('over proc quota' drops) and could swallow tar's real error; the full tail is
still retained in memory for the surfaced diagnostic.
@luisguzman-adfa
luisguzman-adfa merged commit fe489c4 into main Jul 12, 2026
1 check passed
@luisguzman-adfa
luisguzman-adfa deleted the fix/ADFA-4544-surface-tar-failure branch July 12, 2026 06:30
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