ungoogled-software/ungoogled-chromium · error · ChildProcessError
tar command returned %s
Error message
tar command returned %s
What it means
_extract_tar_with_tar runs the system tar binary with '-xf archive -C output_dir'; a non-zero exit status is logged and re-raised as ChildProcessError. Extraction did not complete successfully.
Source
Thrown at utils/_extraction.py:121
(stdout_data, stderr_data) = proc2.communicate()
if proc2.returncode != 0:
get_logger().error('7z commands returned non-zero status: %s', proc2.returncode)
get_logger().debug('stdout: %s', stdout_data)
get_logger().debug('stderr: %s', stderr_data)
raise ChildProcessError()
_process_relative_to(output_dir, relative_to)
def _extract_tar_with_tar(binary, archive_path, output_dir, relative_to):
get_logger().debug('Using BSD or GNU tar extractor')
output_dir.mkdir(exist_ok=True)
cmd = (binary, '-xf', str(archive_path), '-C', str(output_dir))
get_logger().debug('tar command line: %s', ' '.join(cmd))
result = subprocess.run(cmd, check=False)
if result.returncode != 0:
get_logger().error('tar command returned %s', result.returncode)
raise ChildProcessError()
# for gnu tar, the --transform option could be used. but to keep compatibility with
# bsdtar on macos, we just do this ourselves
_process_relative_to(output_dir, relative_to)
def _extract_tar_with_winrar(binary, archive_path, output_dir, relative_to):
get_logger().debug('Using WinRAR extractor')
output_dir.mkdir(exist_ok=True)
cmd = (binary, 'x', '-o+', str(archive_path), str(output_dir))
get_logger().debug('WinRAR command line: %s', ' '.join(cmd))
result = subprocess.run(cmd, check=False)
if result.returncode != 0:
get_logger().error('WinRAR command returned %s', result.returncode)
raise ChildProcessError()
_process_relative_to(output_dir, relative_to)
View on GitHub (pinned to f85e84a480)
Solutions
- Run tar -xf manually to see the real error message
- Install/upgrade tar with the needed filter support (e.g. zstd) or pre-decompress the archive
- Verify archive integrity (tar -tf) before extracting
- Check write permissions and free space on output_dir
Defensive patterns
Strategy: try-catch
Validate before calling
import subprocess
r = subprocess.run([tar_bin, '-tf', str(archive_path)], capture_output=True)
if r.returncode != 0:
raise RuntimeError(f'tar cannot read archive: {r.stderr!r}') Try / catch
try:
extract_tar_file(archive, out)
except ChildProcessError:
logger.exception('system tar failed; check tar version and filters')
# retry after pre-decompressing or with another extractor Prevention
- Check tar --version supports the archive's compression (zstd, etc.)
- Pre-decompress .tar.zst/.tar.xz if the target system's tar is old
- Validate archive integrity before extraction
- Ensure output_dir is writable and has free space
When it happens
Trigger: Corrupt/truncated archive, tar lacking support for the compression filter (e.g. zstd on old bsdtar/GNU tar), unsupported archive format, or unwritable output_dir.
Common situations: macOS bsdtar or an old GNU tar without zstd support, .tar.zst archives on older CI images, disk quota exceeded, or SELinux/permission problems on the destination.
Related errors
- 7z commands returned non-zero status: %s
- WinRAR command returned %s
- 7z command returned %s
- Could not find relative_to directory in extracted files: %s
- Temporary unpacking directory already exists: %s
AI-assisted analysis of ungoogled-software/ungoogled-chromium@f85e84a480 (2026-08-29).
Data as JSON: /api/errors/181b7bb4e6a2eadc.
Report an issue: GitHub.