Skip to content

fix: log vsock accept guard blocks reconnects after first client - #219

Merged
CodeMaster4711 merged 1 commit into
mainfrom
fix/log-vsock-stale-client-guard
Aug 8, 2026
Merged

fix: log vsock accept guard blocks reconnects after first client#219
CodeMaster4711 merged 1 commit into
mainfrom
fix/log-vsock-stale-client-guard

Conversation

@CodeMaster4711

Copy link
Copy Markdown
Collaborator

Root cause of logs staying empty in the frontend even after #213/#214 landed.

stream_logs in csfx-guest-init only calls listener.accept() while client.is_none(). Once one client connects, that branch of the select! never fires again until a write to the stale client fails — which only happens on the next log line produced. If the agent side reconnects (browser tab reload, gateway retry, etc.) before another log line is written, guest-init never pulls the new connection off the accept queue: the vsock handshake succeeds at the kernel level (agent logs guest log vsock connected), but nobody on the guest side ever reads or writes on it, so the stream sits open with zero bytes forever — exactly the symptom (log client accepted logged once, but the agent shows 5 separate connect attempts, only 1 of which was actually accepted).

Fix: drop the is_none() guard so a new connection always replaces whatever was there, dead or not.

@CodeMaster4711
CodeMaster4711 merged commit 1fd8ef6 into main Aug 8, 2026
3 of 4 checks passed
@CodeMaster4711
CodeMaster4711 deleted the fix/log-vsock-stale-client-guard branch August 8, 2026 11:15
@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

cargo audit found vulnerabilities:

  • RUSTSEC-2026-0204 crossbeam-epoch@0.9.18: Invalid pointer dereference in fmt::Pointer impl for Atomic and Shared when the underlying pointer is invalid
  • RUSTSEC-2026-0235 rkyv@0.7.46: Insufficient archive validation can cause out-of-bounds reads in archives containing Rc/Arc
  • RUSTSEC-2023-0071 rsa@0.9.10: Marvin Attack: potential key recovery through timing sidechannels

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant