setting cgroup config for procHooks process caused: open pids.max: no such file or directory #11632
Labels
kind/bug
Categorizes issue or PR as related to a bug.
locked - please file new issue/PR
Assist humans wanting to comment on an old issue or PR with locked comments.
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
After adding systemd.unified_cgroup_hierarchy=1 to the kernel command line, containers have trouble starting due to a missing "pids.max" file.
This is a different error than #26 in troubleshooting.md, which is about a failure to open a cpu.max file that exists with the wrong permissions.
This issue does look similar to #10824 which was fixed in 3.3.0, but that issue is for podman machine / VM startup failures and not containers.
This issue actually looks most similar to #10800. I am running RHEL 8.4 not Alpine, but I did enable cgroups v2 / unified cgroup hierarchy, and the error message that user saw when removing a pod was also related to a missing pids.max file.
I had this issue with an internal application, which was built from a Dockerfile and started using podman-compose. I was able to start the pod / containers without rebooting after I removed and rebuilt the image a few times.
I aso ran some other podman commands, but I don't remember exactly what they were. It boiled down to "remove all volumes, networks, pods, and images", then rebuild from scratch.
Once I built the application and started it successfully, I could stop and restart it normally with no issues. But the error always reappeared after a reboot.
I was not able to work around the issue for my minimal testcase below (using the redis image). The error happens even for a clean image pull / container start.
Steps to reproduce the issue:
podman pull 'docker.io/library/redis:latest'
podman create redis
podman start
Describe the results you received:
Container failed to start with an error message about a missing "pids.max" file.
Describe the results you expected:
Container starts with no error message.
Additional information you deem important (e.g. issue happens only occasionally):
Issue happens consistently.
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/master/troubleshooting.md)
Tested with 3.2.3, the latest version available for my RHEL8 system. If newer CentOS RPMs are available and installing these on RHEL will not cause issues, I can test with these.
Additional environment details (AWS, VirtualBox, physical, etc.):
cat "/sys/fs/cgroup/user.slice/user-$(id -u).slice/user@$(id -u).service/cgroup.controllers"
Shows an empty file. I have not created any delegate.conf or customized any Podman / systemd container service unit files.
(venv) [user@localhost flawdb]$ podman pull 'docker.io/library/redis:latest'
Trying to pull docker.io/library/redis:latest...
Getting image source signatures
Copying blob 5da5e1b21a2f done
Copying blob 6af3a5ca4596 done
Copying blob a330b6cecb98 done
Copying blob 4f9efe5b47a5 done
Copying blob 8b3e2d14a955 done
Copying blob 14bfbab96d75 done
Copying config 02c7f20544 done
Writing manifest to image destination
Storing signatures
02c7f2054405dadaf295fac7281034e998646996e9768e65a78f90af62218be3
(venv) [user@localhost flawdb]$ podman create redis
9fc09e52c64dba93ea80ad27a441aa5ecb87492d7ada9bbd6df62fb58ba3452e
(venv) [user@localhost flawdb]$ podman start 9fc09e52c64d
Error: unable to start container "9fc09e52c64dba93ea80ad27a441aa5ecb87492d7ada9bbd6df62fb58ba3452e": container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: process_linux.go:508: setting cgroup config for procHooks process caused: open /sys/fs/cgroup/user.slice/user-1002.slice/user@1002.service/user.slice/libpod-9fc09e52c64dba93ea80ad27a441aa5ecb87492d7ada9bbd6df62fb58ba3452e.scope/pids.max: no such file or directory: OCI runtime attempted to invoke a command that was not found
The text was updated successfully, but these errors were encountered: