failed to build podman image
System
- xuname:
- Void 5.15.28_1 x86_64 AuthenticAMD
- package:
affected package(s) including the version:podman-4.0.2_2
Expected behavior
build a new image with name t1:latest
Actual behavior
$ podman build -t t1 -f C1
STEP 1/2: FROM voidlinux-musl
STEP 2/2: RUN xbps-install -Suy ncurses-base bash
error running container: error from /usr/bin/runc creating container for [/bin/sh -c xbps-install -Suy ncurses-base bash]: time="2022-03-14T11:37:11+01:00" level=warning msg="unable to get oom kill count" error="no directory specified for memory.oom_control"
time="2022-03-14T11:37:11+01:00" level=error msg="runc create failed: unable to start container process: error during container init: error mounting \"cgroup\" to rootfs at \"/sys/fs/cgroup\": mount /proc/self/fd/8:/sys/fs/cgroup/cpuset (via /proc/self/fd/9), flags: 0x20502f: operation not permitted"
: exit status 1
ERRO[0005] did not get container create message from subprocess: read |0: i/o timeout
Error: error building at STEP "RUN xbps-install -Suy ncurses-base bash": error while running runtime: exit status 1
Steps to reproduce the behavior
$ cat C1
from voidlinux-musl
RUN xbps-install -Suy ncurses-base bash
Looks like an error while mounting cgroup filesystem(s). Are you by chance using the legacy or hybrid cgroups setup? It seems to work fine with a pure-cgroup2 setup for me.
Also side note:
from voidlinux-musl
I think you mean FROM voidlinux/voidlinux-musl?
I have test this on a qemu VM with a fresh installed system and don't hit this issue. This
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
devtmpfs on /dev type devtmpfs (rw,nosuid,noexec,size=986000k,nr_inodes=246500,mode=755,inode64)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,noexec,inode64)
tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,mode=755,inode64)
/dev/sda1 on / type ext4 (rw,relatime)
securityfs on /sys/kernel/security type securityfs (rw,relatime)
cgroup on /sys/fs/cgroup type tmpfs (rw,relatime,mode=755,inode64)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu type cgroup (rw,relatime,cpu)
cgroup on /sys/fs/cgroup/cpuacct type cgroup (rw,relatime,cpuacct)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,relatime,blkio)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,relatime,net_cls)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,relatime,perf_event)
cgroup on /sys/fs/cgroup/net_prio type cgroup (rw,relatime,net_prio)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,relatime,hugetlb)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,relatime,pids)
cgroup2 on /sys/fs/cgroup/unified type cgroup2 (rw,relatime,nsdelegate)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,relatime,inode64)
is the out put from mount.
This is the mount output on the machine hit this issue.
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
devtmpfs on /dev type devtmpfs (rw,nosuid,noexec,size=32894852k,nr_inodes=8223713,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,noexec)
tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,mode=755)
/dev/nvme0n1p3 on / type ext4 (rw,noatime)
securityfs on /sys/kernel/security type securityfs (rw,relatime)
cgroup on /sys/fs/cgroup type tmpfs (rw,relatime,mode=755)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu type cgroup (rw,relatime,cpu)
cgroup on /sys/fs/cgroup/cpuacct type cgroup (rw,relatime,cpuacct)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,relatime,blkio)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,relatime,net_cls)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,relatime,perf_event)
cgroup on /sys/fs/cgroup/net_prio type cgroup (rw,relatime,net_prio)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,relatime,hugetlb)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,relatime,pids)
cgroup2 on /sys/fs/cgroup/unified type cgroup2 (rw,relatime,nsdelegate)
/dev/nvme0n1p1 on /boot type ext4 (rw,noatime)
/dev/nvme0n1p2 on /boot/efi type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,relatime,size=73400320k)
I also test on an other machine (glibc, no efi, Intel) with hits the issue.
$ podman build -t t1 -f C1
STEP 1/2: FROM voidlinux/voidlinux-musl
STEP 2/2: RUN xbps-install -Suy ncurses-base bash
error running container: error from /usr/bin/runc creating container for [/bin/sh -c xbps-install -Suy ncurses-base bash]: time="2022-03-15T11:12:38+01:00" level=warning msg="unable to get oom kill count" error="no directory specified for memory.oom_control"
time="2022-03-15T11:12:38+01:00" level=error msg="runc create failed: unable to start container process: error during container init: error mounting \"cgroup\" to rootfs at \"/sys/fs/cgroup\": mount /proc/self/fd/8:/sys/fs/cgroup/cpuset (via /proc/self/fd/9), flags: 0x20502f: operation not permitted"
: exit status 1
ERRO[0005] did not get container create message from subprocess: read |0: i/o timeout
Error: error building at STEP "RUN xbps-install -Suy ncurses-base bash": error while running runtime: exit status 1
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
devtmpfs on /dev type devtmpfs (rw,nosuid,noexec,size=16366884k,nr_inodes=4091721,mode=755,inode64)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,noexec,inode64)
tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,mode=755,inode64)
/dev/nvme0n1p2 on / type ext4 (rw,noatime)
securityfs on /sys/kernel/security type securityfs (rw,relatime)
cgroup on /sys/fs/cgroup type tmpfs (rw,relatime,mode=755,inode64)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu type cgroup (rw,relatime,cpu)
cgroup on /sys/fs/cgroup/cpuacct type cgroup (rw,relatime,cpuacct)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,relatime,blkio)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,relatime,net_cls)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,relatime,perf_event)
cgroup on /sys/fs/cgroup/net_prio type cgroup (rw,relatime,net_prio)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,relatime,hugetlb)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,relatime,pids)
cgroup2 on /sys/fs/cgroup/unified type cgroup2 (rw,relatime,nsdelegate)
/dev/nvme0n1p1 on /boot type ext4 (rw,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,relatime,inode64)
I was facing the same issue. Changing from hybrid to unified cgroups mode in /etc/rc.conf fixed it.
Hey all, looks like the cgroup manager config was not being changed. Maybe the new update will fix the issue with hybrid cgroup mode.
Issues become stale 90 days after last activity and are closed 14 days after that. If this issue is still relevant bump it or assign it.