-
Notifications
You must be signed in to change notification settings - Fork 347
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
Error: invalid socket name: "console-socket" #2910
Comments
Turns out sun_path has a max_length of 108 characters, and the pathname to console-socket for me is 109 characters. I just fixed this on my local by changing environment to the container directory first and then linking the console-socket. I'll make a PR for this shortly. |
@morganllewellynjones Thanks! I'll assign you. |
Thanks! |
Hey @morganllewellynjones , thanks for your PR! If you want to continue contributing, #2917 is a good low-hanging fruit (its ok if you're doing something else, just pinging) |
Thanks @morganllewellynjones! |
Bug Description
docker run -it --rm --runtime youki busybox
docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: /path/to/youki did not terminate successfully: exit status 1: error in executing command: invalid socket name: "console-socket"
Caused by:
ENAMETOOLONG: File name too long
Error: invalid socket name: "console-socket"
Caused by:
ENAMETOOLONG: File name too long
: unknown.
Steps to Reproduce
System and Setup Info
debian 12
rustup 1.27.1 (54dd3d00f 2024-04-24)
cargo 1.80.0 (376290515 2024-07-16)
filesystem ext4
Additional Context
I did some hunting on this one. The break is actually here:
https://docs.rs/nix/latest/src/nix/sys/socket/addr.rs.html#348-378
It occurs in crates/libcontainer/src/tty.rs::setup_console_socket
When we try to connect to our socket in the docker runtime directory, the full pathname is very long. This might be architecture specific, but socket::connect throws an error at:
Looking into a fix, I'm not certain if I have permissions to assign the ticket to myself though.
The text was updated successfully, but these errors were encountered: