Salsa's parallel benchmarks are extremely noisy. I hoped to reduce the noise by using divan's threads feature (salsa-rs/salsa#1272). Unfortunately, CodSpeed hangs.
Codex analysis:
Yes. I reproduced a real race condition in CodSpeed’s Divan integration:
- Every Divan worker calls
add_benchmark_timestamps concurrently. Source
- CodSpeed declares its shared instrumentation handle
Sync without synchronization. Source
- Workers consequently mutate the same FIFO buffer and write message headers and bodies separately, corrupting the protocol. Source
Using a local mock CodSpeed runner:
1 worker: completed successfully
4 workers: Corrupt command tag: 20 → hangs
CodSpeed needs either synchronized access to its instrumentation handle or instrumentation emitted by only one worker.
Salsa's parallel benchmarks are extremely noisy. I hoped to reduce the noise by using divan's
threadsfeature (salsa-rs/salsa#1272). Unfortunately, CodSpeed hangs.Codex analysis:
Yes. I reproduced a real race condition in CodSpeed’s Divan integration:
add_benchmark_timestampsconcurrently. SourceSyncwithout synchronization. SourceUsing a local mock CodSpeed runner:
CodSpeed needs either synchronized access to its instrumentation handle or instrumentation emitted by only one worker.