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
-j N: workers sit idle while one runs the last harnesses serially (rayon chunking in run_until_abort) #4961
With --jobs N, the end of a long run degrades to a single worker. run_until_abort (kani-driver/src/harness_runner.rs) runs harnesses with items.par_iter().enumerate().try_for_each(..). rayon splits the slice adaptively into a few large sequential chunks, and once a worker has started a chunk no other worker can take items from it. Harness run times vary by orders of magnitude (from milliseconds to the full --harness-timeout), so a worker can be left with dozens of harnesses while the others have nothing to do.
Thread 0 ran its last 79 harnesses alone, about 28 of the run's 63 minutes, with Threads 1 and 2 idle and a single cbmc process on the machine. The smaller crates in the same project show the same pattern on a smaller scale.
Suggested fix. Make each harness its own unit of work, so an idle worker can always take the next one:
or feed the items through a shared queue. Either way the results are unchanged; only the order in which harnesses start changes, and each harness's output is already reported in its own block. The abort latch keeps working, since every unit still checks it before running.
Activity
Run each harness as its own rayon job so `-j N` workers do not idle a…