Skip to content

Error: copying system image from manifest list: trying to reuse blob */diff: no such file or directory #21810

Open
@luckylinux

Description

@luckylinux

Issue Description

I am facing a very weird issue.

My standard folder structure is like this (the idea behind splitting into several folders was to make it easier to handle e.g. ZFS based snapshots and backups):

/home/podman/bin
/home/podman/build
/home/podman/cache
/home/podman/certificates
/home/podman/compose
/home/podman/config
/home/podman/containers
/home/podman/data
/home/podman/images
/home/podman/local
/home/podman/log
/home/podman/root
/home/podman/run
/home/podman/secrets
/home/podman/storage
/home/podman/tmp
/home/podman/volumes

The issue does NOT show up with ZFS. Everything seems to work fine there, with zdata/PODMAN/ mounted with --rbind to /home/podman/:

zdata/PODMAN on /zdata/PODMAN type zfs (rw,noatime,xattr,noacl,casesensitive)
zdata/PODMAN/BUILD on /zdata/PODMAN/BUILD type zfs (rw,noatime,xattr,noacl,casesensitive)
zdata/PODMAN/CACHE on /zdata/PODMAN/CACHE type zfs (rw,noatime,xattr,noacl,casesensitive)
zdata/PODMAN/DATA on /zdata/PODMAN/DATA type zfs (rw,noatime,xattr,noacl,casesensitive)
zdata/PODMAN/LOG on /zdata/PODMAN/LOG type zfs (rw,noatime,xattr,noacl,casesensitive)
zdata/PODMAN/STORAGE on /zdata/PODMAN/STORAGE type zfs (rw,noatime,xattr,noacl,casesensitive)
zdata/PODMAN/IMAGES on /zdata/PODMAN/IMAGES type zfs (rw,noatime,xattr,noacl,casesensitive)
zdata/PODMAN/CONFIG on /zdata/PODMAN/CONFIG type zfs (rw,noatime,xattr,noacl,casesensitive)
zdata/PODMAN/COMPOSE on /zdata/PODMAN/COMPOSE type zfs (rw,noatime,xattr,noacl,casesensitive)
zdata/PODMAN/CERTIFICATES on /zdata/PODMAN/CERTIFICATES type zfs (rw,noatime,xattr,noacl,casesensitive)
zdata/PODMAN/VOLUMES on /zdata/PODMAN/VOLUMES type zfs (rw,noatime,xattr,noacl,casesensitive)
zdata/PODMAN/SECRETS on /zdata/PODMAN/SECRETS type zfs (rw,noatime,xattr,noacl,casesensitive)
zdata/PODMAN/LOCAL on /zdata/PODMAN/LOCAL type zfs (rw,noatime,xattr,noacl,casesensitive)
zdata/PODMAN/ROOT on /zdata/PODMAN/ROOT type zfs (rw,noatime,xattr,noacl,casesensitive)
zdata/PODMAN/CONFIG on /home/podman/.config/containers type zfs (rw,noatime,xattr,noacl,casesensitive,x-systemd.automount)
zdata/PODMAN/STORAGE on /home/podman/storage type zfs (rw,noatime,xattr,noacl,casesensitive,x-systemd.automount)
zdata/PODMAN/BUILD on /home/podman/build type zfs (rw,noatime,xattr,noacl,casesensitive,x-systemd.automount)
zdata/PODMAN/CERTIFICATES on /home/podman/certificates type zfs (rw,noatime,xattr,noacl,casesensitive,x-systemd.automount)
zdata/PODMAN/COMPOSE on /home/podman/compose type zfs (rw,noatime,xattr,noacl,casesensitive,x-systemd.automount)
zdata/PODMAN/CONFIG on /home/podman/config type zfs (rw,noatime,xattr,noacl,casesensitive,x-systemd.automount)
zdata/PODMAN/LOG on /home/podman/log type zfs (rw,noatime,xattr,noacl,casesensitive,x-systemd.automount)
zdata/PODMAN/ROOT on /home/podman/root type zfs (rw,noatime,xattr,noacl,casesensitive,x-systemd.automount)
zdata/PODMAN/DATA on /home/podman/data type zfs (rw,noatime,xattr,noacl,casesensitive,x-systemd.automount)
zdata/PODMAN/IMAGES on /home/podman/images type zfs (rw,noatime,xattr,noacl,casesensitive,x-systemd.automount)
zdata/PODMAN/VOLUMES on /home/podman/volumes type zfs (rw,noatime,xattr,noacl,casesensitive,x-systemd.automount)
zdata/PODMAN/CACHE on /home/podman/cache type zfs (rw,noatime,xattr,noacl,casesensitive,x-systemd.automount)
zdata/PODMAN/LOCAL on /home/podman/local type zfs (rw,noatime,xattr,noacl,casesensitive,x-systemd.automount)
zdata/PODMAN/SECRETS on /home/podman/secrets type zfs (rw,noatime,xattr,noacl,casesensitive,x-systemd.automount)

The issue appears only on EXT4.
Here, no mount --rbind is used, and the folders are just plain folders within the user home directory.

/home/podman/bin
/home/podman/build
/home/podman/cache
/home/podman/certificates
/home/podman/compose
/home/podman/config
/home/podman/containers
/home/podman/data
/home/podman/images
/home/podman/local
/home/podman/log
/home/podman/root
/home/podman/run
/home/podman/secrets
/home/podman/storage
/home/podman/tmp
/home/podman/volumes

When trying to install some images (redis:alpine, redis:bookworm, possibly also headscale and headscale-ui, not sure), they usually fail with the following messages:

podman@<SERVERNAME>:~$ podman pull redis:alpine
✔ docker.io/library/redis:alpine
Trying to pull docker.io/library/redis:alpine...
Getting image source signatures
Copying blob 2afe905a8615 skipped: already exists  
Copying blob 4abcf2066143 skipped: already exists  
Copying blob 128c39a261ff skipped: already exists  
Copying blob f27432e97d04 skipped: already exists  
Copying blob 33486cc813b5 skipped: already exists  
Copying blob d29554ca490b skipped: already exists  
Copying blob 4f4fb700ef54 done   | 
Copying blob 5cb59ee00f00 done   | 
Error: copying system image from manifest list: writing blob: adding layer with blob "sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1": creating read-only layer with ID "1234f0cb2a613f6c85750af636ba97719670085a675695486429aef9c7530373": Stat /home/podman/storage/overlay/f5e4e1e17cc9ce821cce6f8fea6123439c6c36904d180a84075cffc3dc85483c/diff: no such file or directory

Debug level log: https://pastebin.com/F65rwZuU

I also tried podman system reset which mostly failed to delete the storage folder:

podman@<SERVERNAME>:~/compose/authentik$ podman system reset
WARNING! This will remove:
        - all containers
        - all pods
        - all images
        - all networks
        - all build cache
        - all machines
        - all volumes
        - the graphRoot directory: "/home/podman/storage"
        - the runRoot directory: "/run/user/1001"
Are you sure you want to continue? [y/N] Y

ERRO[0175] unlinkat /home/podman/storage/overlay/e8378ab0015b2be72773b263dc7148dcc79b2cd263832b3e5c4929d04034f641/merged: device or resource busy 
 A "/home/podman/.config/containers/storage.conf" config file exists.
Remove this file if you did not modify the configuration.
ERRO[0175] failed to remove runtime root dir /run/user/1001, since it is the same as XDG_RUNTIME_DIR 

Steps to reproduce the issue

Steps to reproduce the issue

  1. Install podman on ext4 file system with the directory structure listed above
    a. This can be done mostly automatically using my helper script: https://github.com/luckylinux/podman-tools
    b. ./setup_podman_debian.sh "podman" "dir" "/home/podman"
  2. Run podman pull redis:alpine

Describe the results you received

podman@<SERVERNAME>:~$ podman pull redis:alpine
✔ docker.io/library/redis:alpine
Trying to pull docker.io/library/redis:alpine...
Getting image source signatures
Copying blob 2afe905a8615 skipped: already exists  
Copying blob 4abcf2066143 skipped: already exists  
Copying blob 128c39a261ff skipped: already exists  
Copying blob f27432e97d04 skipped: already exists  
Copying blob 33486cc813b5 skipped: already exists  
Copying blob d29554ca490b skipped: already exists  
Copying blob 4f4fb700ef54 done   | 
Copying blob 5cb59ee00f00 done   | 
Error: copying system image from manifest list: writing blob: adding layer with blob "sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1": creating read-only layer with ID "1234f0cb2a613f6c85750af636ba97719670085a675695486429aef9c7530373": Stat /home/podman/storage/overlay/f5e4e1e17cc9ce821cce6f8fea6123439c6c36904d180a84075cffc3dc85483c/diff: no such file or directory

Debug level log: https://pastebin.com/F65rwZuU

Describe the results you expected

Podman pulling redis:alpine image (and others) normally.

Putting the storage folder graphRoot inside e.g. a subfolder within the user home directory works correctly apparently:

  • /home/podman/containers/storage
  • /home/podman/.local/share/containers/storag

podman info output

host:
  arch: amd64
  buildahVersion: 1.33.5
  cgroupControllers:
  - cpu
  - memory
  - pids
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: conmon_2.1.10+ds1-1_amd64
    path: /usr/bin/conmon
    version: 'conmon version 2.1.10, commit: unknown'
  cpuUtilization:
    idlePercent: 72.8
    systemPercent: 17.26
    userPercent: 9.94
  cpus: 1
  databaseBackend: sqlite
  distribution:
    codename: bookworm
    distribution: debian
    version: "12"
  eventLogger: journald
  freeLocks: 2048
  hostname: ra
  idMappings:
    gidmap:
    - container_id: 0
      host_id: 1001
      size: 1
    - container_id: 1
      host_id: 165536
      size: 65536
    uidmap:
    - container_id: 0
      host_id: 1001
      size: 1
    - container_id: 1
      host_id: 165536
      size: 65536
  kernel: 6.1.0-18-amd64
  linkmode: dynamic
  logDriver: journald
  memFree: 1767870464
  memTotal: 2012446720
  networkBackend: netavark
  networkBackendInfo:
    backend: netavark
    dns:
      package: aardvark-dns_1.4.0-5_amd64
      path: /usr/lib/podman/aardvark-dns
      version: aardvark-dns 1.4.0
    package: netavark_1.4.0-3_amd64
    path: /usr/lib/podman/netavark
    version: netavark 1.4.0
  ociRuntime:
    name: crun
    package: crun_1.14.1-1_amd64
    path: /usr/bin/crun
    version: |-
      crun version 1.14.1
      commit: de537a7965bfbe9992e2cfae0baeb56a08128171
      rundir: /run/user/1001/crun
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +WASM:wasmedge +YAJL
  os: linux
  pasta:
    executable: /usr/bin/pasta
    package: passt_0.0~git20230309.7c7625d-1_amd64
    version: |
      pasta unknown version
      Copyright Red Hat
      GNU Affero GPL version 3 or later <https://www.gnu.org/licenses/agpl-3.0.html>
      This is free software: you are free to change and redistribute it.
      There is NO WARRANTY, to the extent permitted by law.
  remoteSocket:
    exists: true
    path: /run/user/1001/podman/podman.sock
  security:
    apparmorEnabled: false
    capabilities: CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_CHROOT
    rootless: true
    seccompEnabled: true
    seccompProfilePath: /usr/share/containers/seccomp.json
    selinuxEnabled: false
  serviceIsRemote: false
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns_1.2.0-1_amd64
    version: |-
      slirp4netns version 1.2.0
      commit: 656041d45cfca7a4176f6b7eed9e4fe6c11e8383
      libslirp: 4.7.0
      SLIRP_CONFIG_VERSION_MAX: 4
      libseccomp: 2.5.4
  swapFree: 1023406080
  swapTotal: 1023406080
  uptime: 0h 0m 19.00s
  variant: ""
plugins:
  authorization: null
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  - ipvlan
  volume:
  - local
registries:
  search:
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - docker.io
  - quay.io
store:
  configFile: /home/podman/.config/containers/storage.conf
  containerStore:
    number: 0
    paused: 0
    running: 0
    stopped: 0
  graphDriverName: overlay
  graphOptions:
    overlay.mount_program:
      Executable: /usr/bin/fuse-overlayfs
      Package: fuse-overlayfs_1.13-1_amd64
      Version: |-
        fusermount3 version: 3.14.0
        fuse-overlayfs: version 1.13-dev
        FUSE library version 3.14.0
        using FUSE kernel interface version 7.31
    overlay.mountopt: nodev,metacopy=on
  graphRoot: /home/podman/storage
  graphRootAllocated: 18969468928
  graphRootUsed: 4682727424
  graphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Supports shifting: "true"
    Supports volatile: "true"
    Using metacopy: "false"
  imageCopyTmpDir: /home/podman/tmp
  imageStore:
    number: 0
  runRoot: /run/user/1001
  transientStore: false
  volumePath: /home/podman/storage/volumes
version:
  APIVersion: 4.9.3
  Built: 0
  BuiltTime: Thu Jan  1 01:00:00 1970
  GitCommit: ""
  GoVersion: go1.21.6
  Os: linux
  OsArch: linux/amd64
  Version: 4.9.3

Podman in a container

No

Privileged Or Rootless

Rootless

Upstream Latest Release

Yes

Additional environment details

VPS on KVM AMD64.

Debian Bookwork 12 with Podman 4.9.3 pinned from Debian Testing/Trixie.

Additional information

I quickly tested in my local KVM (Proxmox VE) ZFS-based storage for podman: podman pull redis:alpine works correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions