Conversation
🔍 Claude ReviewSEVERITY: medium Findings[MEDIUM] e2fsck signal-kill mishandled — The new e2fsck exit code check uses: if e2fsck_output.status.code().unwrap_or(1) >= 4 {On Unix, [LOW] Stale README reference to removed The PR correctly removed the [LOW] The wire protocol field was widened to u64, but SummaryThe e2fsck exit code improvement is valuable but has a bug: signal-killed processes bypass the error check due to Review by Claude | Run |
🔧 Auto-Fix CreatedI found issues and created a fix PR: #269 Fixes included:
Please review and merge the fix PR first, then this PR. |
🔧 CI Auto-FixCreated fix PR: #270 The CI failure was caused by a rustfmt formatting issue in |
- Wire protocol Written size u32 → u64 to prevent truncation on copy_file_range/remap_file_range returns exceeding 4GB - Loopback IP exhaustion now returns error instead of silently reusing 127.0.0.2 (would cause IP conflicts) - Remove security.capability xattr fast-path that returned ENODATA for all files, hiding real capabilities - Check e2fsck exit code before resize2fs (exit >= 4 means uncorrectable filesystem errors) - slirp4netns stdout/stderr changed from Stdio::piped() to Stdio::null() to prevent pipe buffer deadlock - Check truncate exit code in create_disk_from_dir - parse_size uses checked_mul to prevent silent overflow - Delete dead code mount_vsock_with_readers in fc-agent Tested: cargo test -p fuse-pipe --lib (42 pass), cargo test -p fcvm --lib (48 pass)
🔍 Claude ReviewSEVERITY: medium Findings[MEDIUM] Slirp stderr→null breaks error diagnostic path ( The PR changes slirp4netns stdout/stderr from Fix: Keep stderr as [MEDIUM] e2fsck signal-kill mishandled — previously reported, fix still pending As noted in previous review, [LOW] Stale README reference — previously reported, fix still pending As noted in previous review, SummaryThe slirp pipe-deadlock fix inadvertently breaks error diagnostics by sending stderr to null while the error handler still tries to read it. The e2fsck signal-kill issue from the previous review remains unfixed (PR #269 pending). Review by Claude | Run |
🔧 Auto-Fix CreatedI found issues and created a fix PR: #271 Fixes included:
Please review and merge the fix PR first, then this PR. |
Fixes: - UFFD server auto-exit: use CancellationToken instead of exiting when connections drop to zero (server must stay alive for new clones) - Health monitor false positive: return None (unknown) instead of Some(true) when fcvm binary not found for podman healthcheck - Health monitor no fast polling revert: reset to startup interval when VM becomes unhealthy after being healthy - Hardcoded port 80: use url.port().unwrap_or(80) for rootless health - Slirp port forwarding: bail on error response instead of warn - Bridged cleanup: collect all errors instead of stopping on first - Clone setup leak: clean up data_dir and state on failure - Thread-local groups: Drop guard ensures cleanup on panic - Shell injection: replace bash -c with direct Command args for TAP device verification - set_var unsoundness: pass max_write as parameter instead of using std::env::set_var in multi-threaded context
- e2fsck signal-kill: unwrap_or(1) → unwrap_or(8) so signal-killed process is treated as fatal error, not "errors corrected" - Slirp stderr: keep stderr piped (only read after process exits, no deadlock risk) so error diagnostics aren't lost - Remove stale FCVM_NO_XATTR_FASTPATH env var from README (fast-path was removed in Wave 1)
# Conflicts: # fc-agent/src/fuse/mod.rs
Fix 8 bugs from codebase review (Wave 1)
Fix 8 bugs from codebase review (Wave 1)
Summary
Systematic codebase review identified 57 issues across fcvm, fuse-pipe, and fc-agent. This PR fixes 21 of them across two waves plus review feedback.
Wave 1 — 8 quick wins
Written { size }changed from u32 to u64 to prevent silent truncation on copy_file_range returns >4GBbail!instead of silently reusing 127.0.0.2 (would cause IP conflicts)Stdio::null(), stderr stays piped for diagnosticscreate_disk_from_dirchecked_mulprevents silent overflowmount_vsock_with_readersin fc-agentWave 2 — 10 correctness and safety fixes
CancellationTokeninstead of exiting when connections drop to zero — server must stay alive for new clonesNone(unknown) instead ofSome(true)when fcvm binary not foundurl.port().unwrap_or(80)for rootless health checksbail!on error response instead of silent warningbash -cwith directCommandargs for TAP device verificationstd::env::set_varin multi-threaded contextReview feedback — 3 fixes
unwrap_or(1)→unwrap_or(8)so signal-killed process is treated as fatalFCVM_NO_XATTR_FASTPATHenv var docs after fast-path removalTest plan
```
cargo test -p fuse-pipe --lib # 42 pass
cargo test -p fcvm --lib # 48 pass
cargo test -p exec-proto # 6 pass
cargo build --release # clean
cargo fmt -- --check # clean
```