Skip to content

fix(vsock)#2254

Open
edef1c wants to merge 2 commits intohermit-os:mainfrom
edef1c:push-vmlltxlzvynv
Open

fix(vsock)#2254
edef1c wants to merge 2 commits intohermit-os:mainfrom
edef1c:push-vmlltxlzvynv

Conversation

@edef1c
Copy link

@edef1c edef1c commented Feb 15, 2026

self.port was assigned ep.cid instead of self.cid, causing subsequent read/write calls to look up a nonexistent port in VSOCK_MAP and fail with EINVAL.

The Op::Response handler set state to Connected but never read buf_alloc or fwd_cnt from the response header. Since RawSocket initializes peer_buf_alloc to 0, the write path would block forever, since no peer buffer space is available.

self.port was assigned ep.cid instead of self.cid, causing subsequent
read/write calls to look up a nonexistent port in VSOCK_MAP and fail
with EINVAL.
The Op::Response handler set state to Connected but never read
buf_alloc or fwd_cnt from the response header. Since RawSocket
initializes peer_buf_alloc to 0, the write path would block forever
(0 >= 0 means "no peer buffer space available").
@edef1c edef1c changed the title vsock fixes fix(vsock) Feb 15, 2026
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark Results

Details
Benchmark Current: ce037fe Previous: 4912505 Performance Ratio
startup_benchmark Build Time 99.49 s 99.11 s 1.00
startup_benchmark File Size 0.86 MB 0.86 MB 1.00
Startup Time - 1 core 0.96 s (±0.03 s) 0.96 s (±0.03 s) 1.00
Startup Time - 2 cores 0.96 s (±0.04 s) 0.96 s (±0.03 s) 1.00
Startup Time - 4 cores 0.98 s (±0.03 s) 0.96 s (±0.02 s) 1.02
multithreaded_benchmark Build Time 102.06 s 102.01 s 1.00
multithreaded_benchmark File Size 0.95 MB 0.95 MB 1
Multithreaded Pi Efficiency - 2 Threads 87.33 % (±8.07 %) 85.65 % (±8.90 %) 1.02
Multithreaded Pi Efficiency - 4 Threads 43.83 % (±3.81 %) 43.12 % (±3.13 %) 1.02
Multithreaded Pi Efficiency - 8 Threads 25.16 % (±2.63 %) 25.03 % (±1.95 %) 1.00
micro_benchmarks Build Time 113.36 s 114.00 s 0.99
micro_benchmarks File Size 0.96 MB 0.96 MB 1.00
Scheduling time - 1 thread 70.14 ticks (±3.69 ticks) 70.19 ticks (±3.58 ticks) 1.00
Scheduling time - 2 threads 37.65 ticks (±3.82 ticks) 38.99 ticks (±4.43 ticks) 0.97
Micro - Time for syscall (getpid) 2.94 ticks (±0.22 ticks) 2.96 ticks (±0.24 ticks) 0.99
Memcpy speed - (built_in) block size 4096 63903.23 MByte/s (±45561.35 MByte/s) 64026.03 MByte/s (±45553.92 MByte/s) 1.00
Memcpy speed - (built_in) block size 1048576 30055.28 MByte/s (±24890.15 MByte/s) 29743.12 MByte/s (±24826.10 MByte/s) 1.01
Memcpy speed - (built_in) block size 16777216 25124.79 MByte/s (±21078.36 MByte/s) 24007.89 MByte/s (±20230.77 MByte/s) 1.05
Memset speed - (built_in) block size 4096 64799.93 MByte/s (±46222.49 MByte/s) 64637.10 MByte/s (±45951.78 MByte/s) 1.00
Memset speed - (built_in) block size 1048576 30837.33 MByte/s (±25327.85 MByte/s) 30516.60 MByte/s (±25260.76 MByte/s) 1.01
Memset speed - (built_in) block size 16777216 25917.41 MByte/s (±21593.26 MByte/s) 24779.16 MByte/s (±20739.68 MByte/s) 1.05
Memcpy speed - (rust) block size 4096 59936.45 MByte/s (±44379.91 MByte/s) 60077.78 MByte/s (±44331.51 MByte/s) 1.00
Memcpy speed - (rust) block size 1048576 29963.69 MByte/s (±25001.03 MByte/s) 29870.69 MByte/s (±24878.06 MByte/s) 1.00
Memcpy speed - (rust) block size 16777216 25043.27 MByte/s (±21178.36 MByte/s) 24212.89 MByte/s (±20297.89 MByte/s) 1.03
Memset speed - (rust) block size 4096 61141.06 MByte/s (±45170.76 MByte/s) 60925.02 MByte/s (±44834.41 MByte/s) 1.00
Memset speed - (rust) block size 1048576 30756.23 MByte/s (±25439.32 MByte/s) 30651.78 MByte/s (±25309.43 MByte/s) 1.00
Memset speed - (rust) block size 16777216 25821.51 MByte/s (±21678.20 MByte/s) 24986.00 MByte/s (±20809.17 MByte/s) 1.03
alloc_benchmarks Build Time 104.63 s 105.28 s 0.99
alloc_benchmarks File Size 0.93 MB 0.93 MB 1.00
Allocations - Allocation success 100.00 % 100.00 % 1
Allocations - Deallocation success 100.00 % 100.00 % 1
Allocations - Pre-fail Allocations 100.00 % 100.00 % 1
Allocations - Average Allocation time 11474.19 Ticks (±275.84 Ticks) 9727.01 Ticks (±267.20 Ticks) 1.18
Allocations - Average Allocation time (no fail) 11474.19 Ticks (±275.84 Ticks) 9727.01 Ticks (±267.20 Ticks) 1.18
Allocations - Average Deallocation time 1132.87 Ticks (±809.57 Ticks) 2219.93 Ticks (±959.95 Ticks) 0.51
mutex_benchmark Build Time 103.20 s 104.33 s 0.99
mutex_benchmark File Size 0.96 MB 0.96 MB 1.00
Mutex Stress Test Average Time per Iteration - 1 Threads 13.08 ns (±0.66 ns) 12.84 ns (±0.76 ns) 1.02
Mutex Stress Test Average Time per Iteration - 2 Threads 15.90 ns (±0.78 ns) 15.44 ns (±0.78 ns) 1.03

This comment was automatically generated by workflow using github-action-benchmark.

@mkroening mkroening self-assigned this Feb 15, 2026
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