-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Closed
Labels
Description
Description
Noticed that there is a test failure on gotip (future Go 1.23):
=== RUN TestNewBinaryIOCleanup
io_test.go:64: some descriptors weren't closed (7 != 8)
--- FAIL: TestNewBinaryIOCleanup (0.00s)
FAIL
FAIL github.com/containerd/containerd/v2/cmd/containerd-shim-runc-v2/process 0.003s
FAIL
This happens because 1.23 will make use of pidfd on Linux, see golang/go#62654.
The test thinks that this file descriptor is leaking. The solution is pretty simple, it needs to ignore a file descriptor that is pidfd.
This is a hacky way to ignore file descriptors internal to the runtime, there is a proposal open at golang/go#67639 that should provide a better way to detect leaking fds.
Steps to reproduce the issue
$ go install golang.org/dl/gotip@latest
$ gotip download
$ gotip test -v ./cmd/containerd-shim-runc-v2/process -run=TestNewBinaryIOCleanup
Describe the results you received and expected
Test fails. It should pass and continue to work on 1.21 and 1.22 as well.
What version of containerd are you using?
tip
Any other relevant information
No response
Show configuration if it is related to CRI plugin.
No response
Reactions are currently unavailable