Skip to content
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

Lima instance does not recover from socket_vmnet restart #3020

Open
nirs opened this issue Dec 13, 2024 · 0 comments
Open

Lima instance does not recover from socket_vmnet restart #3020

nirs opened this issue Dec 13, 2024 · 0 comments
Labels
bug Something isn't working component/network/vmnet

Comments

@nirs
Copy link
Member

nirs commented Dec 13, 2024

Description

If we restart socket_vment limactl will fail to forward packets with this log:

{"level":"error","msg":"Failed to forward packets from VZ to VMNET: write unix -\u003e/var/run/socket_vmnet: write: broken pipe","time":"2024-12-13T21:29:30+02:00"}

From this point the lima0 interface will not receive or send anything since we stopped reading from the the VZ datagram socket and the unix socket connected to socket_vmnet. The only way to recover is to restart the vm.

We can recover from this by changing the forwarding code to reconnect to socket_vment after errors, and start forwarding again. Some packets will be lost, but networking code must be able to recover from lost packets.

This is not easy since we after we get an error on the socket_vmnet socket, we need to stop both io.Copy() goroutines without closing the VZ datagram socketpair. To do this we may need to implement interruptible Copy() instead of using io.Copy().

@nirs nirs added bug Something isn't working component/network/vmnet labels Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working component/network/vmnet
Projects
None yet
Development

No branches or pull requests

1 participant