Releases: A3S-Lab/libkrun
libkrun v1.17.5 Windows prebuilt (WHPX)
Prebuilt Windows DLLs for libkrun v1.17.5.
Contents of krun-windows-x64.zip
krun.dll— libkrun Windows WHPX backend (2.3 MB)krun.lib— import library for linkinglibkrunfw.dll— embedded Linux kernel (19 MB), loaded at runtime by krun.dll
Usage
See krun-sys-windows/ for Rust FFI bindings and build instructions.
libkrun v1.17.5 - vsock Queue Overflow Fixes
🎉 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_fdsignaling - Add
paused_proxiesqueue 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
AsRawFdimports 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.rssrc/devices/src/virtio/vsock/muxer_thread.rssrc/devices/src/virtio/vsock/event_handler.rssrc/devices/src/virtio/vsock/tsi_stream.rssrc/devices/src/virtio/vsock/unix.rssrc/devices/src/virtio/vsock/proxy.rssrc/devices/src/virtio/balloon/event_handler.rssrc/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.
libkrun-1.17.4
What's Changed
Bug Fixes
- fix(vsock): fix queue overflow, flow control deadlock, and busy-loop backpressure
Six layered bugs causing vsock to stall or spin under heavy network load:
-
CreditUpdate flow control deadlock —
last_tx_cnt_sentwas updated beforepush_packetconfirmed success; a dropped CreditUpdate would never be retried, permanently freezing the guest send window. -
Silent packet drop —
push_packetsilently discarded packets when the MuxerRxQ was full; now returnsbooland emitswarn!on drop. -
No interrupt on rxq fallback —
VsockMuxer::push_packetdidn't signal the guest interrupt after falling back to rxq, leaving the guest unaware of pending data. -
CreditRequest never triggered interrupt — The
WaitForCreditpath leftsignal_queue = false, so the guest never received a wake-up to respond with CreditUpdate. -
RST packets without interrupt —
process_op_request/process_stream_rwsent RST packets without signaling the interrupt, causing zombie connections under load. -
MuxerThread busy-loop — When the virtio RX queue had no available descriptors, level-triggered epoll fired continuously on the TCP fd (100% CPU, no progress). Fixed with a backpressure mechanism: proxies are removed from epoll (
needs_rx_space=true) and resumed via anrx_ready_fdEventFd written by the device thread on each RX queue replenishment event.
Full Changelog: v1.17.3...v1.17.4