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
test(flaky): lib_deps_and_core_share_one_job_gate timing assertion fails on macos-15-intel #1667
Seen on release-auto run 37891784183 (v2.5.39 candidate 8b2fa68), job macos / Test (macos-15-intel). Every other platform passed.
panicked at crates/fbuild-build-engine/src/pipeline/library_shared_gate_tests.rs:323:9:
with only one non-core slot, the two lib_deps TUs must not overlap each other:
(1791526639261092000, 1791526639572235000) vs (1791526639418669000, 1791526639672746000)
The test infers gate behavior from wall-clock intervals recorded by the fake compiles. On a slow or oversubscribed runner, the recorded start/end stamps can overlap even when the gate serialized the work, for example if a stamp is taken outside the permit scope. Suggest recording permit acquire/release events under the gate, or asserting on a peak in-flight counter, instead of comparing timestamps.
Root cause and fix: at the failing candidate 8b2fa68 the fake core compile held its gate permit for a fixed sleep_ms: 300, while the lib phase started later. On the slow macos-15-intel runner the core released its slot before the libraries finished, so the gate correctly let both lib TUs share the two free slots. Peak stayed ≤2, which is why the gate-size assertion passed and only the stricter 'libs must not overlap' assertion failed. The gate was fine. The test's assumption that core holds a slot for the whole lib phase was timing-dependent.
#1678 (dc87035) removed that assumption. FakeCoreCompiler now signals started and keeps its permit until a libraries_done notify fires after lib_deps.compile returns, so the 'one non-core slot' precondition holds regardless of runner speed. Passes locally on main (cargo test -p fbuild-build-engine lib_deps_and_core_share_one_job_gate, 5 iterations inside the test). Reopen if it recurs on a run that includes dc87035.
Activity
zackees commentedon Oct 24, 2026
Root cause and fix: at the failing candidate 8b2fa68 the fake core compile held its gate permit for a fixed
sleep_ms: 300, while the lib phase started later. On the slow macos-15-intel runner the core released its slot before the libraries finished, so the gate correctly let both lib TUs share the two free slots. Peak stayed ≤2, which is why the gate-size assertion passed and only the stricter 'libs must not overlap' assertion failed. The gate was fine. The test's assumption that core holds a slot for the whole lib phase was timing-dependent.#1678 (dc87035) removed that assumption.
FakeCoreCompilernow signalsstartedand keeps its permit until alibraries_donenotify fires afterlib_deps.compilereturns, so the 'one non-core slot' precondition holds regardless of runner speed. Passes locally on main (cargo test -p fbuild-build-engine lib_deps_and_core_share_one_job_gate, 5 iterations inside the test). Reopen if it recurs on a run that includes dc87035.