runtime-tools icon indicating copy to clipboard operation
runtime-tools copied to clipboard

Kernel specification requirements for validation tests

Open YJDoc2 opened this issue 3 years ago • 0 comments

Are there any specific kernel specification requirements for using validation tests? I was running these tests on my local machine for runc and the linux_cgroups_memory test failed with following error (run with superuser access):

failed to create the container
time="2021-06-15T17:41:00+05:30" level=warning msg="signal: killed"
time="2021-06-15T17:41:00+05:30" level=error msg="container_linux.go:349: starting container process caused \"process_linux.go:449: container init caused \\\"process_linux.go:415: setting cgroup config for procHooks process caused \\\\\\\"failed to write \\\\\\\\\\\\\\\"50593792\\\\\\\\\\\\\\\" to \\\\\\\\\\\\\\\"/sys/fs/cgroup/memory/cgrouptest/memory.memsw.limit_in_bytes\\\\\\\\\\\\\\\": open /sys/fs/cgroup/memory/cgrouptest/memory.memsw.limit_in_bytes: permission denied\\\\\\\"\\\"\""
container_linux.go:349: starting container process caused "process_linux.go:449: container init caused \"process_linux.go:415: setting cgroup config for procHooks process caused \\\"failed to write \\\\\\\"50593792\\\\\\\" to \\\\\\\"/sys/fs/cgroup/memory/cgrouptest/memory.memsw.limit_in_bytes\\\\\\\": open /sys/fs/cgroup/memory/cgrouptest/memory.memsw.limit_in_bytes: permission denied\\\"\""
not ok 1 - exit status 1

repeated six times. After digging a bit, it seems, that this might be an issue related to my kernel not being configured with CONFIG_MEMCG_SWAP_ENABLED similar to the issue in podman https://github.com/containers/podman/issues/6365

We are using these tests at youki https://github.com/containers/youki/ in Github actions to verify that the runtime confirms with the OCI specs, and in the Github action these tests seem to work fine, but when tried to test on a local env, even runc and crun seem to fail these.

Can you elaborate on if there are any required kernel specifications on which these tests must be run, and if there is any document regarding to these? If not, can you suggest any ways in which these tests can be used on local systems?

Thanks.

Specification of my local env used to run the tests on runc :

Kernel-Release    5.4.0-74-generic
Kernel-Version    #83-Ubuntu SMP Sat May 8 02:35:39 UTC 2021
Architecture      x86_64
Cores             8
Total Memory      7869
cgroup version    v1 and v2
cgroup mounts
  blkio           "/sys/fs/cgroup/blkio"
  cpu             "/sys/fs/cgroup/cpu,cpuacct"
  cpuset          "/sys/fs/cgroup/cpuset"
  devices         "/sys/fs/cgroup/devices"
  hugetlb         "/sys/fs/cgroup/hugetlb"
  memory          "/sys/fs/cgroup/memory"
  net_cls         "/sys/fs/cgroup/net_cls,net_prio"
  net_prio        "/sys/fs/cgroup/net_cls,net_prio"
  pids            "/sys/fs/cgroup/pids"
  unified         "/sys/fs/cgroup/unified"

YJDoc2 avatar Jun 15 '21 12:06 YJDoc2