Skip to content

libkrun v1.17.5 - vsock Queue Overflow Fixes

Choose a tag to compare

@ZhiXiao-Lin ZhiXiao-Lin released this 11 Mar 03:37
· 44 commits to main since this release

🎉 libkrun v1.17.5

vsock Queue Overflow Fixes

This release resolves critical vsock queue overflow issues that caused network stalls under heavy load.

Key Fixes

vsock Queue Management:

  • Fix queue overflow when container applications perform heavy network communication
  • Implement backpressure mechanism with rx_ready_fd signaling
  • Add paused_proxies queue to prevent CPU busy-loops
  • Fix CreditUpdate logic to only update on successful packet push

Flow Control:

  • Prevent flow control deadlocks in credit-based flow control
  • Add proper signaling when RX queue space becomes available
  • Implement level-triggered epoll handling to avoid busy-loops

Code Quality:

  • Add missing AsRawFd imports in balloon and rng event handlers
  • Add detailed error logging for queue overflow scenarios

Verification

  • ✅ nginx container test: 10/10 requests successful
  • ✅ No queue overflow errors under load
  • ✅ Stable network communication
  • ✅ Proper backpressure handling

Files Changed

  • src/devices/src/virtio/vsock/muxer.rs
  • src/devices/src/virtio/vsock/muxer_thread.rs
  • src/devices/src/virtio/vsock/event_handler.rs
  • src/devices/src/virtio/vsock/tsi_stream.rs
  • src/devices/src/virtio/vsock/unix.rs
  • src/devices/src/virtio/vsock/proxy.rs
  • src/devices/src/virtio/balloon/event_handler.rs
  • src/devices/src/virtio/rng/event_handler.rs

Upgrade Notes

This is a recommended upgrade for all users experiencing network stalls or high CPU usage in vsock communication.