Skip to content

ff body-heal test flakes: an unsized body's read returns before the server speaks again #997

Open

Description

@GLinnik21

ff::body_heal_tests::an_unsized_body_is_not_given_the_silence_deadline (rust-modules/media/src/ff_body_heal_tests.rs, added in #817) failed once in CI's host unit tests (hostsim) job on PR #996:

thread 'ff::body_heal_tests::an_unsized_body_is_not_given_the_silence_deadline' (6233) panicked at media/src/ff_body_heal_tests.rs:267:5:
read returned before the server spoke again
test result: FAILED. 1868 passed; 1 failed; 64 ignored; 0 measured; 0 filtered out; finished in 87.43s
cargo-test-parallel: FAILED plx_media (exit 101)

Run: https://github.com/GLinnik21/plx-native/actions/runs/40095074837/job/120875520002

PR #996 touches no file under rust-modules/media/. The same head's local make check passed this crate's hostsim pass (1869 passed; 0 failed; 64 ignored). So this is an intermittent failure on main's code, not that PR's.

The test holds an unsized body silent for BODY_SILENCE * 3, then asserts that read_to_end did not return before the server spoke again (began.elapsed() >= quiet). In this run the read returned early. Why is not determined. Candidates to check:

  • another deadline in the read path that is shorter than 3 × BODY_SILENCE under CI load;
  • the releaser thread waking early;
  • the read ending on something other than the server's resumed bytes.

The assertion that would distinguish them, srv.heads().len() == 1, comes after the one that failed.

Done when the cause is named with evidence, and the test either passes reliably under load or asserts what it means without a wall-clock race.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinginternalTooling, CI, tests and code health; no user-facing change

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions