Skip to content

Fix vsock test flake - #1198

Open
papertigers wants to merge 1 commit into
masterfrom
spr/papertigers/fix-vsock-test-flake
Open

Fix vsock test flake#1198
papertigers wants to merge 1 commit into
masterfrom
spr/papertigers/fix-vsock-test-flake

Conversation

@papertigers

@papertigers papertigers commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

This fixes #1197.

The test is a simple off by one error which leads to a race condition. We end up waiting for
harness.tx_used_idx() to reach one less descriptor than we should be, which means calling
reset_tx_cursors at the top of the loop resets the QueueWriter too soon. This opens a window for
the poller to not read all the RW packets that we are sending. The log in the test confirms this,
and explains why our read_exact() fails.

Aug 14 02:51:12.719 WARN dropping invalid vsock packet: vsock packet header reported 8192 bytes but the descriptor chain contains 0, component: vsock-test

@papertigers

Copy link
Copy Markdown
Contributor Author

Before the fix:

Stress test [   5.027s] iteration 106/3000: 1 test run: 0 passed, 1 failed, 269 skipped                                                                                                    ────────────
      Summary [   7.561s] 106/3000 stress run iterations: 105 passed, 1 failed
         FAIL [   5.025s] [ 106/3000] propolis vsock::poller::test::credit_update_sent_after_flushing_half_buffer
error: test run failed

After the fix:

 Stress test iteration 3000/3000 (00:01:26 elapsed so far, 1 iteration remaining)
        PASS [   0.031s] [3000/3000] propolis vsock::poller::test::credit_update_sent_after_flushing_half_buffer                                                                             Stress test [   0.033s] iteration 3000/3000: 1 test run: 1 passed, 269 skipped
────────────
Summary [  86.578s] 3000/3000 stress run iterations: 3000 passed

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.

Test flake in credit_update_sent_after_flushing_half_buffer

1 participant