Remove output listener read timeout for large image imports#263
Remove output listener read timeout for large image imports#263
Conversation
The 5-minute read timeout on the container output vsock caused the listener to exit during long image imports (10+ min). When the container finally started, its stdout/stderr had nowhere to go. Remove the timeout — the listener stays alive until EOF (connection closed) or the VM exits. The VM exit handler already cleans up.
🔍 Claude ReviewSEVERITY: none FindingsNo issues found. The PR correctly addresses the timeout problem for large image imports. Analysis:
The change is well-justified and follows good async patterns. SummaryClean fix for a real problem. No issues identified. Review by Claude | Run |
🔧 CI Auto-FixCreated fix PR: #264 Issue: The test was failing because the output listener task was hanging when VMs were killed abruptly during stress tests (100 concurrent VMs). The vsock connection wouldn't cleanly close, causing to block indefinitely. Fix: Added explicit task abortion during VM cleanup by storing the output listener task handle and aborting it in . |
The removal of the 5-minute read timeout in run_output_listener allowed long-running image imports to complete, but introduced a hang in stress tests where 100 VMs are spawned/killed rapidly. When VMs are killed abruptly, the vsock connection may not cleanly close, causing read_line() to block indefinitely. This prevents the task from terminating naturally. Fix by: 1. Storing the output listener task handle (removing _ prefix) 2. Adding output_listener_handle parameter to cleanup_vm() 3. Explicitly aborting the task when cleanup_vm() is called This ensures the listener is forcefully terminated during cleanup while still allowing indefinite waits for legitimate long-running operations.
CI Failure AnalysisI analyzed CI #21755094976 but couldn't create an automatic fix. DiagnosisThe test Test expectations:
What Changed in PR:
Observed in logs:
Why Not FixableThis appears to be either:
The code compiles successfully (
Recommendation
|
Summary
The 5-minute read timeout on the container output vsock caused the listener to exit during long image imports (10+ min for 26GB images). Container stdout/stderr was lost.
Fix
Remove the read timeout. The listener stays alive until EOF (connection closed by fc-agent) or VM exit. 6 lines added, 15 removed.
Test plan