Skip to content

fix(vu): serialize VuSession socket I/O with a Mutex - #531

Merged
Lencerf merged 1 commit into
google:mainfrom
Lencerf:push-quqkpwmxozso
Nov 3, 2026
Merged

Lencerf merged 1 commit into
google:mainfrom
Lencerf:push-quqkpwmxozso

Conversation

@Lencerf

@Lencerf Lencerf commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

Wrap UnixStream inside parking_lot::Mutex in VuSession so concurrent vCPU config MMIO requests and worker-side vhost-user requests cannot interleave frames on the socket.

Assisted-by: Antigravity:Gemini-4-Carbon

Wrap UnixStream inside parking_lot::Mutex in VuSession so concurrent
vCPU config MMIO requests and worker-side vhost-user requests cannot
interleave frames on the socket.

Assisted-by: Antigravity:Gemini-4-Carbon
Signed-off-by: Changyuan Lyu <changyuanl@google.com>
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 41699854417

Coverage increased (+0.9%) to 39.388%

Details

  • Coverage increased (+0.9%) from the base build.
  • Patch coverage: 4 uncovered changes across 2 files (19 of 23 lines covered, 82.61%).
  • 3 coverage regressions across 2 files.

Uncovered Changes

File Changed Covered %
alioth/src/virtio/vu/conn.rs 22 19 86.36%
alioth/src/virtio/vu/backend.rs 1 0 0.0%

Coverage Regressions

3 previously-covered lines in 2 files lost coverage.

File Lines Losing Coverage Coverage
alioth/src/virtio/dev/vsock/uds_vsock.rs 2 81.51%
alioth/src/virtio/vu/conn.rs 1 54.4%

Coverage Stats

Coverage Status
Relevant Lines: 16237
Covered Lines: 6202
Line Coverage: 38.2%
Relevant Branches: 1672
Covered Branches: 852
Branch Coverage: 50.96%
Branches in Coverage %: Yes
Coverage Strength: 895.0 hits per line

💛 - Coveralls

@Lencerf
Lencerf added this pull request to the merge queue Nov 3, 2026
Merged via the queue into google:main with commit 74c41b9 Nov 3, 2026
20 checks passed
@Lencerf
Lencerf deleted the push-quqkpwmxozso branch November 3, 2026 19:52
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.

2 participants