Fix vsock test flake - #1198
Conversation
|
Before the fix: After the fix: |
|
One more follow up, I have been running a stress test for ~4hrs and ~8500 iterations and have not encountered any issues. |
iximeow
left a comment
There was a problem hiding this comment.
sgtm, one suggestion about how we figure out what to wait for but I'm not sure if I'm missing something and a fixed flake is a fixed flake.
|
|
||
| // This is the vsock poller copying the REQUEST data and calling | ||
| // `push_used` which bumps the tx ring's used index. | ||
| let initial_tx_used = harness.tx_used_idx(); |
There was a problem hiding this comment.
the diff seems fine but.. if things are quiescent until we publish_chain(); queue_notify(), couldn't we do this at the start of the loop and have a mildly more straightforward check like..
let expected_tx = harness.tx_used_idx() + tx_consumed;
/* do tx */
wait_for_condition(|| harness.tx_used_idx() >= expected_tx, 5000);
and not worry about whatever the state was as we got to the loop?
There was a problem hiding this comment.
I fixed the awkwardness here and I think it reads much more clearly now. If you are good with it, I will merge..
Summary [ 95.536s] 3000/3000 stress run iterations: 3000 passed
There was a problem hiding this comment.
yeah, this is a lot nicer, thanks 🙏
|
for the sake of less CI flakiness, i'm ok with merging even though header-check fails (fixed by #1208, and only failing because CI now has a newer viona version than Propolis knows about. but that new version is only additive, so ... it's fine!) |
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 callingreset_tx_cursorsat the top of the loop resets theQueueWritertoo soon. This opens a window forthe 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.