podman: failed to write to /proc/self/oom_score_adj: Permission denied
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
When running rootless podman I’m getting failed to write to /proc/self/oom_score_adj: Permission denied error, but container runs after it.
Steps to reproduce the issue:
podman run -it --rm anycontainer
Describe the results you received: The container runs, but after I get an error message in the terminal
Describe the results you expected: The container should start without error message.
Additional information you deem important (e.g. issue happens only occasionally):
Error message: failed to write to /proc/self/oom_score_adj: Permission denied
Output of podman version:
podman version 1.2.0
Output of podman info --debug:
debug:
compiler: gc
git commit: ""
go version: go1.11.6
podman version: 1.2.0
host:
BuildahVersion: 1.7.2
Conmon:
package: podman-1.2.0-1.1.x86_64
path: /usr/lib/podman/bin/conmon
version: "failed to write to /proc/self/oom_score_adj: Permission denied, conmon
version 1.14.0\ncommit: "
Distribution:
distribution: '"opensuse-tumbleweed"'
version: "20190423"
MemFree: 2402082816
MemTotal: 11992973312
OCIRuntime:
package: runc-1.0.0~rc6-3.1.x86_64
path: /usr/bin/runc
version: |-
runc version 1.0.0-rc6
spec: 1.0.1-dev
SwapFree: 2145845248
SwapTotal: 2147479552
arch: amd64
cpus: 4
hostname: kraken
kernel: 5.0.8-1-default
os: linux
rootless: true
uptime: 4h 43m 30.3s (Approximately 0.17 days)
insecure registries:
registries: []
registries:
registries:
- docker.io
store:
ConfigFile: /home/dario/.config/containers/storage.conf
ContainerStore:
number: 1
GraphDriverName: vfs
GraphOptions: null
GraphRoot: /home/dario/.local/share/containers/storage
GraphStatus: {}
ImageStore:
number: 20
RunRoot: /tmp/1000
VolumePath: /home/dario/.local/share/containers/storage/volumes
Additional environment details (AWS, VirtualBox, physical, etc.): physical
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 56 (14 by maintainers)
I ran into the same issue on Fedora 38. Per a comment in #19930 I downgraded crun
sudo dnf downgrade crunand that seems to have worked for now.Update: This solved it for me:
edit /usr/lib/systemd/system/user@.service and remove the following line.
OOMScoreAdjust=100https://github.com/systemd/systemd/commit/ce7de0ba8ef355c5119e7dffc46e075b257dc90d#diff-e712f4f510835ff8be07a088402d790305356f9284023c7a286056ccf38147e3R28Reboot
Source: https://bbs.archlinux.org/viewtopic.php?pid=2012166#p2012166
I have updated from Fedora Silverblue 38 to 39 and one of the first things I did was to check whether podman is still working. Nope! All rootless containers fail with
Since /usr is write protected in Fedora Silverblue I have copied user@.service:
I can confirm that after a reboot rootless container start again.
podman version 4.6.2 crun version 1.9
My laptop updated cri-o this morning, 1.13.5 to 1.13.7, and the
oom_score_adjwarning is gone.Yeah that is actually what I ended up doing, my comment was a bit premature. I ended up using the equivalent of systemctl edit user@.service but since I deploy on CoreOS with Ignition that means I created the directory /etc/systemd/system/user@.service.d with the file override.conf and just two lines;
I recently updated to podman 4.6.2 on fedora 38 and noticed this issue as well.
I have updated to Podman 4.6.2 and noticed the regression.
The workaround from @bosd worked on my box - but not sure that’s really optimal, as @MaximilianGaedig states in his comment
Running into this problem on a new Fedora machine I’m trying to set up, except plain
podman runis working fine, butdocker-compose upis giving me this problem.Podman 4.6.2, Compose v2.21.0
Downgrading to Podman
4.4.2(only other installable version out of the box with dnf) shows no error (but just doesn’t have any output or anything weirdly), another server running4.6.1works perfectly fine.I know this is closed and all, but what worked for me was setting this environment variable as mentioned in the release notes:
DOCKER_BUILDKIT=0podman version 4.6.1 Docker Compose version v2.21.0
Hi there, After install docker, I was able to run podman containers
sudo dnf -y install dnf-plugins-core sudo dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.reposudo dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-pluginsudo systemctl start dockerCould this be due (also) to ACLs ? Specifically in my case, I had to set ZFS acltype=posix in order to NOT encounter issues while trying to spin up e.g. Mosquitto MQTT Container (otherwise I’d get mkdir - operation not permitted). See https://github.com/containers/podman/issues/11213.
However, now that ACLs are enabled in ZFS, it became much slower. I tried to set xattr=sa to make it faster by storing extended attributes in the inode/dnode directly, but that didn’t really help.
podman start mycontaineror evenpodman pshangs indefinitively. Only solution is to reboot !Then the hanging/freezing stopped and now I get this
I also tried the previous fixes, both in /etc/systemd/system/user@.service and /etc/systemd/system/user@.service.d/override.conf but it doesn’t help.
I have a much older version of Podman being on Debian Linux but still … It also seems after enabling ACL I get more and more weird errors
Strangely it doesn’t happen with all containers. I could get (again) podman-compose to bring down (destroy) & up (recreate) an instance of Home Assistant, while Mosquitto MQTT Container Image stubbornly refuses to work.
I fixed it below the link(https://github.com/containers/podman/issues/19930#issuecomment-1732162092). You can try it.
4 years later? The old bug should be locked and a new bug should be opened 🙏
MacOS with latest podman here. I remove provided line via podman machine ssh connection however after restart of the VM, this property of OOMScoreAdjust=100 appears to be there again and error expectedly repeats, is there any workaround in that case? Thank you
BTW this is tracked in #19930 and https://github.com/containers/podman/pull/19843 is supposed to fix it. (downgrading crun to 1.8.7 apparently also helps)
Having this issue on Fedora Silverblue using toolbox, strangely didn’t happen until I rebased by system to KDE using this guide https://communityblog.fedoraproject.org/rebasing-fedora-silverblue-to-kinoite/ Doing it as sudo works fine however but that seems like it’s begging for trouble
edit: fixed itself after a reboot I will keep this comment in case someone can reproduce it using those steps
that is correct 🙂