Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.6.13 memory.memsw.limit_in_bytes: no such file or directory #7828

Closed
baskamic opened this issue Dec 16, 2022 · 19 comments · Fixed by #7836
Closed

1.6.13 memory.memsw.limit_in_bytes: no such file or directory #7828

baskamic opened this issue Dec 16, 2022 · 19 comments · Fixed by #7836
Labels
area/cri Container Runtime Interface (CRI) kind/bug priority/P0

Comments

@baskamic
Copy link

Description

Errors started to appears after upgrade to 1.6.13 on k8s worker nodes with disabled swap.

RunContainerError: "failed to create containerd task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error setting cgroup config for procHooks process: open /sys/fs/cgroup/memory/kubepods.slice/kubepods-burstable.slice/kubepods-burstable-pode4d342df_98e0_47d9_ac43_65e42fd694ef.slice/cri-containerd-ecbc9db26facdd91d47f8b5b54e20f97c66e6da2a0dac434fea9ec565e6a4be3.scope/memory.memsw.limit_in_bytes: no such file or directory:

Something similar to: cri-o/cri-o#5527

Steps to reproduce the issue

Unknown

Describe the results you received and expected

Received multiple errors and problems with pods creation.
Expected work as 1.6.12 without errors

What version of containerd are you using?

1.6.13

Any other relevant information

No response

Show configuration if it is related to CRI plugin.

No response

@AkihiroSuda
Copy link
Member

@cpuguy83
Copy link
Member

I met the same issue thinking it was a quirk on the vm I'd spun up (hadn't used the toolchain before).
Since it failed both on my tests and in a normal runc container I just worked around it.

I'm wondering if there was a kernel update that causes memsw to not even exist, or maybe it really just is a coincidence that I hit this at the same time (no containerd involvement) and hadn't seen it before.

@MaxRink
Copy link

MaxRink commented Dec 16, 2022

We are also running into this, with an current Ubuntu 2004

 Kernel Version:                5.4.0-135-generic
 OS Image:                      Ubuntu 20.04.5 LTS
 Operating System:              linux
 Architecture:                  amd64
 Container Runtime Version:     containerd://1.6.13

Edit:

and it only affects containers with requests and or limits set

@hopefulwalker
Copy link

I'm also running into this with ubuntu20.04.
master230 Ready control-plane 62m v1.24.9 192.168.56.230 <none> Ubuntu 20.04.5 LTS 5.4.0-131-generic containerd://1.6.13

my coredns met this problem.
Error: failed to create containerd task: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error setting cgroup config for procHooks process: open /sys/fs/cgroup/memory/kubepods.slice/kubepods-burstable.slice/kubepods-burstable-pod3b92b885_e844_4154_9674_62a17aac05e7.slice/cri-containerd-coredns.scope/memory.memsw.limit_in_bytes: no such file or directory: unknown

@fabiomirmar
Copy link

Same problem with 20.04 + kernel 5.4.0-135 + containerd 1.6.13. Reverting containerd to 1.6.12-1 avoids the issue.

@hkerma
Copy link

hkerma commented Dec 18, 2022

Hello, also running on that error, Ubuntu 20.04, kernel 5.4.0-110, containerd v1.6.13. Definitely comes from the latest release as I did not have such issues with 1.6.12-1.

@fuweid
Copy link
Member

fuweid commented Dec 18, 2022

Is there anyone can share the pod spec? thanks

@fuweid
Copy link
Member

fuweid commented Dec 18, 2022

cc @AkihiroSuda @mikebrow

I think we should check the /proc/swap or CONFIG_SWAP before we set the memorySwap in oci-runtime-spec.
Some kernels weren't built with the flag. The memory.memsw.limit_in_bytes file is missing in this case.

@claudiomerli
Copy link

Hi, i'm having same issue on k8s with containerd. Removing resources request/limit specification on pods fix the issue. I don't know if you set them on your container

@claudiomerli
Copy link

Downgrading containerd to 1.6.12 it works properly

@fabiomirmar
Copy link

In my case, what was crashing was coredns. Here's the pod spec:

https://pastebin.ubuntu.com/p/8b96vKfk6r/

@claudiomerli
Copy link

In my case, what was crashing was coredns. Here's the pod spec:

https://pastebin.ubuntu.com/p/8b96vKfk6r/

Yeah, exactly the same for me

@AkihiroSuda
Copy link
Member

PR:

Workaround: append swapaccount=1 to the kernel cmdline

@AkihiroSuda AkihiroSuda added priority/P0 area/cri Container Runtime Interface (CRI) labels Dec 19, 2022
@AkihiroSuda AkihiroSuda pinned this issue Dec 19, 2022
livingshade pushed a commit to livingshade/bookinfo-grpc that referenced this issue Dec 19, 2022
@brendandburns
Copy link

brendandburns commented Dec 19, 2022

This also affects Debian 10: Linux kube0 4.19.0-22-amd64 #1 SMP Debian 4.19.260-1 (2022-09-29) x86_64 GNU/Linux where the swap controller is also disabled by default.

This is a pretty nasty bug b/c it causes all containers to fail to start (at least on my home system)

@AkihiroSuda
Copy link
Member

Keeping open until releasing v1.6.14

@dmcgowan
Copy link
Member

livingshade added a commit to livingshade/bookinfo-grpc that referenced this issue Feb 3, 2023
add tracing

update

update

now I understand how package works

temp

fix containerd.io version to 1.6.12

see containerd/containerd#7828

update config

update

update gitignore

update config

change folder structure

update

update config

update

update

update

update

update

update

update

update
@fatmanurozdemir
Copy link

same error but reverting containerd version did not work for me.
I get "failed to create containerd task: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error setting cgroup config for procHooks process: openat2 /sys/fs/cgroup/kubepods/besteffort/poddc92ef05-2620-46d9-aa99-20c3e5e8027/8d01c30fb02300775d081e866901dbf9a34612ded56acda0213a021332033164/cpu.max: no such file or directory: unknown" error when I want to run a pod inside an edge node(NVIDIA AGX Orin).
Kernel Version: 5.15.122-tegra
OS Image: Ubuntu 22.04.3 LTS
Operating System: linux
Architecture: aarch64
Container Runtime Version: containerd://1.6.27

The default containerd version was 1.6.27. I installed 1.6.12 and 1.7.12 versions but it did not resolve the issue.

@AkihiroSuda
Copy link
Member

cpu.max: no such file or directory

The error seems quite different from the OP.
Please open a new issue.

@fatmanurozdemir
Copy link

I did #9651

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cri Container Runtime Interface (CRI) kind/bug priority/P0
Projects
None yet
Development

Successfully merging a pull request may close this issue.