Skip to content

fix(install): surface tar's real failure cause on extraction (ADFA-4544)#133

Merged
luisguzman-adfa merged 1 commit into
mainfrom
feat/ADFA-4544-tar-extract-diagnostics
Jul 3, 2026
Merged

fix(install): surface tar's real failure cause on extraction (ADFA-4544)#133
luisguzman-adfa merged 1 commit into
mainfrom
feat/ADFA-4544-tar-extract-diagnostics

Conversation

@luisguzman-adfa

Copy link
Copy Markdown
Collaborator

The rootfs install extraction only logged "write failed: EPIPE (Broken pipe)" from the Java gzip -> tar pipe and reported a generic "Decompression failed", because it threw before reaching tarProcess.waitFor() — hiding tar's real exit code and stderr. EPIPE just means the tar child closed its stdin (it failed or was killed) mid-stream.

  • On a broken pipe, stop feeding and fall through to waitFor() to capture tar's real exit code (137/signal => killed by the Android 12+ phantom-process killer or OOM).
  • Retain the last 20 lines of tar output (stderr is merged) and include them in the error (an ENOSPC would show "No space left on device" here).
  • Log available disk space (StatFs) before extraction and on failure, plus bytes written.

Diagnostic-only: the happy path is unchanged. Turns the opaque EPIPE into an actionable error (kill vs ENOSPC). Relates to ADFA-4496 (phantom-process handling in the sync path).

The rootfs install extraction only logged "write failed: EPIPE (Broken pipe)" from the
Java gzip -> tar pipe and reported a generic "Decompression failed", because it threw
before reaching tarProcess.waitFor() — hiding tar's real exit code and stderr. EPIPE just
means the tar child closed its stdin (it failed or was killed) mid-stream.

- On a broken pipe, stop feeding and fall through to waitFor() to capture tar's real exit
  code (137/signal => killed by the Android 12+ phantom-process killer or OOM).
- Retain the last 20 lines of tar output (stderr is merged) and include them in the error
  (an ENOSPC would show "No space left on device" here).
- Log available disk space (StatFs) before extraction and on failure, plus bytes written.

Diagnostic-only: the happy path is unchanged. Turns the opaque EPIPE into an actionable
error (kill vs ENOSPC). Relates to ADFA-4496 (phantom-process handling in the sync path).
@luisguzman-adfa luisguzman-adfa marked this pull request as ready for review July 3, 2026 17:59
@luisguzman-adfa luisguzman-adfa merged commit 86840b1 into main Jul 3, 2026
1 check passed
@luisguzman-adfa luisguzman-adfa deleted the feat/ADFA-4544-tar-extract-diagnostics branch July 3, 2026 18:08
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