-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Go 1.24 breaks runc exec #4602
Comments
If I remember it correctly, rust io copy uses splice by default and run into tty copy issue in shim side. Just tag you if it can help. |
@fuweid Yes, and we replaced the std::io::copy by a copy function imlemented ourselves. |
Was it the same issue (the pipe being locked in the kernel so its other end can't be closed)? Can you point out to the discussion you were having? |
It is a different issue but I think the root cause is the same. containerd/rust-extensions#79 |
Does this bug only effect runc? as there are also many calls of io.Copy in containerd. |
I had ran the containerd CI on 1.24rc1 and 1.24rc2 here containerd/containerd#11211. But couldnt see any failures or we may be missing tests for this case. |
Yes, looks like it's the same underlying issue. @fuweid did you end up reporting this to the kernel folks? |
@kolyshkin @abel-von sorry, I forgot to report it to kernel community. 😢 |
This is now fixed in Go. |
Description
I opened #4598 to check if runc works with Go 1.24 (currently using go1.24rc2) and found out that
runc exec
is badly broken.The cause is allegedly a bug in the kernel, which is reported in https://lore.kernel.org/linux-fsdevel/20250122020850.2175427-1-kolyshkin@gmail.com/T/#u
I've also reported a Go bug to golang/go#71375
We can work around it by reimplementing
io.Copy
but first let's see what kernel and Go developers have to say.Steps to reproduce the issue
See reproducers in the links above. You can also compile runc with Go 1.24 and run
runc exec
in the foreground.Describe the results you received and expected
See above links.
What version of runc are you using?
I belive that any and all versions of runc are affected, when using Go 1.24rc2 (or rc1). The code introducing the use of
io.Copy
to copy from os.Stdin to a process' stdin is introduced in the very first runc commit 9fac183 aka "Initial commit of runc binary".Host OS information
No response
Host kernel information
No response
The text was updated successfully, but these errors were encountered: