Conversation
|
It's very strange, why there are some |
|
Yeah that's very strange, we don't have any |
Two questions actually.
|
|
rebased |
There was a problem hiding this comment.
This needs a changelog entry I guess.
We can also switch official builds and some CI to from Go 1.25 to 1.26:
GO_VERSIONin Dockerfile for official builds;GO_VERSIONin .github/workflows/validate.yml for misc CI jobs;GO_VER_PREFIXin .cirrus.yml for cirrus CI jobs;
but it can be done separately later.
Interestingly, this failure seems persistent (at least it failed twice here, before and after a rebase). |
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
|
Still fail here, but I can't reproduce in my local(with almalinux-8): |
|
I was able to reproduce locally using lima and alma-linux-8 [root@lima-alma8 runc]# ssh -tt localhost "make -C /home/kir.linux/git/runc localintegration RUNC_USE_SYSTEMD=yes"
....
not ok 57 runc create[detect fd leak as comprehensively as possible]
# (in test file tests/integration/create.bats, line 76)
# `[ "$violation_found" -eq 0 ]' failed
# runc spec (status=0)
#
# runc create --console-socket /tmp/bats-run-Jh05w8/runc.bfKEyr/tty/sock test_busybox (status=0)
#
# runc state test_busybox (status=0)
# {
# "ociVersion": "1.3.0",
# "id": "test_busybox",
# "pid": 29815,
# "status": "created",
# "bundle": "/tmp/bats-run-Jh05w8/runc.bfKEyr/bundle",
# "rootfs": "/tmp/bats-run-Jh05w8/runc.bfKEyr/bundle/rootfs",
# "created": "2026-03-18T00:00:03.058105702Z",
# "owner": ""
# }
# Permitted: FD 0 -> '/dev/pts/0'
# Permitted: FD 1 -> '/dev/pts/0'
# Permitted: FD 2 -> '/dev/pts/0'
# Permitted: FD 3 -> '/tmp/bats-run-Jh05w8/runc.bfKEyr/state/test_busybox/exec.fifo'
# Permitted: FD 4 -> 'socket:[124368]'
# Permitted: FD 5 -> '/proc'
# Permitted: FD 7 -> '/runc'
# Permitted: FD 8 -> '/tmp/bats-run-Jh05w8/runc.bfKEyr/state/test_busybox/exec.fifo'
# Violation: FD 9 -> '/system.slice/runc-test_busybox.scope/cpu.cfs_quota_us'
# Violation: FD 10 -> '/system.slice/runc-test_busybox.scope/cpu.cfs_period_us'
# Permitted: FD 11 -> '/proc/1/task/1/fd'
# Permitted: FD 12 -> 'anon_inode:[eventpoll]'
# Permitted: FD 13 -> 'anon_inode:[eventfd]'
.... |
|
I suspect it is golang runtime that opens these files (as oc/cgroups/fs doesn't do it unless quota/period is set). The code is in https://github.com/golang/go/blob/master/src/internal/runtime/cgroup/cgroup_linux.go and https://github.com/golang/go/blob/master/src/runtime/cgroup_linux.go, and enabled by the fact that we set Looking into it. |
|
We set We can add Here's the patch: diff --git a/libcontainer/container_linux.go b/libcontainer/container_linux.go
index b4368547..2bc48f10 100644
--- a/libcontainer/container_linux.go
+++ b/libcontainer/container_linux.go
@@ -542,7 +542,8 @@ func (c *Container) newParentProcess(p *Process) (parentProcess, error) {
if cmd.SysProcAttr == nil {
cmd.SysProcAttr = &unix.SysProcAttr{}
}
- cmd.Env = append(cmd.Env, "GOMAXPROCS="+os.Getenv("GOMAXPROCS"))
+ cmd.Env = append(cmd.Env, "GOMAXPROCS=1")
+ cmd.Env = append(cmd.Env, "GODEBUG=containermaxprocs=0,updatemaxprocs=0")
cmd.ExtraFiles = append(cmd.ExtraFiles, p.ExtraFiles...)
if p.ConsoleSocket != nil {
cmd.ExtraFiles = append(cmd.ExtraFiles, p.ConsoleSocket) |
go version go1.25.8 linux/amd64 |
Hmm, interesting. I can repro it easily with that version. |
|
So, we have a few ways to move forward:
@cyphar what do you think? |
I think it's safe to add these two cgroup files to the whitelist. |
|
Let's decide on this before 1.5.0-rc.2 release. The options we have are listed here: #5169 (comment) |
|
@kolyshkin IMHO option 2 seems better. The go variables are only temporary (the behavior will be on and the vars removed in the future) and it seems legit for the go runtime to do that. |
|
@kolyshkin IMHO option 2 seems better. The go variables are only temporary (the behavior will be on and the vars removed in the future) and it seems legit for the go runtime to exhibit this behavior with fds. |
|
My bad; hit the wrong button :) |
|
FWIW, GODEBUG can also be set through |
Niiice! Maybe we can use it; so now we have four options:
I'm not sure though if godebug options are to stay or not (but we can worry about it later), and how do they affect performance (I guess it's within the noise threshold). |
|
Yeah, I was mostly wondering if setting it in I have not looked at the problem at all otherwise, but it caught my eye 🫶 |
Go 1.24 is no longer supported.
Signed-off-by: Aleksa Sarai cyphar@cyphar.com