containers / podman

Podman: A tool for managing OCI containers and pods.
https://podman.io
Apache License 2.0
24.04k stars 2.43k forks source link

build: committing container: writing blob: bzip2 data invalid: invalid compression level #18793

Open edsantiago opened 1 year ago

edsantiago commented 1 year ago

In f37 rootless:

[+0624s] not ok 188 podman build - workdir, cmd, env, label
...
<+145ms> # $ podman --default-mounts-file=/tmp/podman_bats.qB9gj4/build-test/mounts.conf build --build-arg arg_explicit=explicit_YFmOsU9nF40MJVz --build-arg arg_implicit --dns-search nx1xExZIxBMI.net -t build_test -f build-test/Containerfile build-test
<+972ms> # STEP 1/25: FROM quay.io/libpod/testimage:20221018
...
         # Error: committing container for step {Env:[arg_explicit=explicit_YFmOsU9nF40MJVz arg_implicit=implicit_fkWuGtuyQ03C9fs PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin] Command:run Args:[mkdir -p /a/b/c] Flags:[] Attrs:map[] Message:RUN mkdir -p /a/b/c Original:RUN mkdir -p /a/b/c}: copying layers and metadata for container "7beda7e9d6b03a4df36ba896a1fd95232b7f4a1b50bb4891d0d7c05f4e2d5dfc": writing blob: storing blob to file "/var/tmp/storage3153825298/1": bzip2 data invalid: invalid compression level

It's a one-off... at least so far. Filing in order to track future occurrences.

vrothberg commented 1 year ago

Cc: @nalind @flouthoc just in case you have a suspicion

nalind commented 1 year ago

The amd64 version of that image is compressed with gzip, not bzip2, so it's not clear to me why the storage library's archive package is trying to run it through the Go standard library's bzip2 decompressor, but that's where this error message likely originated. It's also not clear why the checks on the incoming stream's magic and compression type values aren't triggering an error, since they're checked before the compression level.

github-actions[bot] commented 1 year ago

A friendly reminder that this issue had no activity for 30 days.

edsantiago commented 1 year ago

Triggered again, new variant, "bad magic value" instead of "invalid compression level"

[+0510s] not ok 190 podman build - basic test
...
         # COMMIT build_test
         # Error: committing container for step {Env:[PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin] Command:run Args:[echo KOdsNLz8VAWwrPmHZnFPXpbxO0rw4grdJuay7MScBDtoa2QeJy > /BZh6hMBseCEexmhDnvki] Flags:[] Attrs:map[] Message:RUN echo KOdsNLz8VAWwrPmHZnFPXpbxO0rw4grdJuay7MScBDtoa2QeJy > /BZh6hMBseCEexmhDnvki Original:RUN echo KOdsNLz8VAWwrPmHZnFPXpbxO0rw4grdJuay7MScBDtoa2QeJy > /BZh6hMBseCEexmhDnvki}: copying layers and metadata for container "72c09d098d96a6c11b1e758009622124592a72d461f936d56b9d3f4cdcf006fb": writing blob: storing blob to file "/var/tmp/container_images_storage4129358967/1": bzip2 data invalid: bad magic value found
edsantiago commented 9 months ago

Seen just now, f39 remote root:

# podman-remote --url unix:///tmp/podman_tmp_OrRm build -t build_test -f - --format=docker /tmp/podman_bats.GwFaeg/build-test
STEP 1/2: FROM quay.io/libpod/testimage:20240123
STEP 2/2: RUN echo VHroevmgqdX82yKdzq6T1M1YIqw3p9rM9JOSYELXvtqlz8mI3W > /BZhqwRjDOGcfIqUFVS3a
COMMIT build_test
Error: committing container for step {
     Env:[PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin]
     Command:run Args:[echo VHroevmgqdX82yKdzq6T1M1YIqw3p9rM9JOSYELXvtqlz8mI3W > /BZhqwRjDOGcfIqUFVS3a]
     Flags:[]
     Attrs:map[]
     Message:RUN echo VHroevmgqdX82yKdzq6T1M1YIqw3p9rM9JOSYELXvtqlz8mI3W > /BZhqwRjDOGcfIqUFVS3a  
     Heredocs:[]
     Original:RUN echo VHroevmgqdX82yKdzq6T1M1YIqw3p9rM9JOSYELXvtqlz8mI3W > /BZhqwRjDOGcfIqUFVS3a}:
         copying layers and metadata for container "b2a209b63d3fcbc15c40930983ed88ce1114fd3debc4c2a139e1280d012c64de":
         writing blob: storing blob to file "/var/tmp/container_images_storage213025501/1":
         bzip2 data invalid: invalid compression level