You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
flaky: the_intrusive_free_list_round_trips_a_whole_cohort asserts a delta on a process-global counter under parallel tests #8401
box::release_tests::the_intrusive_free_list_round_trips_a_whole_cohort
assertion `left == right` failed: second cohort allocates N cells
left: 515
right: 512
Observed 3 times tonight across unrelated branches while validating #8392, #8397 and #8399, always as a single failure in an otherwise green cargo test --release -p perry-runtime --lib (2594 passed / 1 failed), and never reproducible in isolation — the
same suite reruns clean, and the test passes on its own every time.
box_release_stats() is process-wide, but cargo test runs the suite multi-threaded. Any
other test that allocates a box between the two reads inflates the delta. 515 - 512 = 3
stray allocations from a concurrent test, not a free-list defect.
The intent of the test is sound and worth keeping — it pins that all N cells come from the
intrusive free list rather than falling through to std::alloc. Only the measurement is
unsound under parallelism.
Suggested fix
Either serialize it against other box-allocating tests (a shared mutex / serial_test-style
guard), or make the accounting local — e.g. snapshot and compare free-list occupancy for the
cells this test minted rather than a global allocation counter.
Because it is a 1-in-~7 failure in a 2595-test suite, it will read as a random red on
unrelated PRs and cost reviewers time attributing it — which is exactly what happened
three times tonight.
Activity