Ray's Knowledge Base
Unlock

Full ctest --preset tests times out because the test build has coverage on and ~350 processes lock the same .gcda files

PitfallVerified 5 Oct 2026Holds project: dftracer-utils
Pitfall. The symptom, what causes it, and the fix that was run and seen to work.

Symptom#

A full ctest --preset tests run times out on tests that are fine alone, for example a dftracer_server test that waits 60 s for exit after SIGTERM. Logs print "corrupt arc tag". A single test run alone, even under 14 yes busy loops, passes.

Cause#

The build/build-tests cache has DFTRACER_UTILS_COVERAGE=ON, set in the cache and not in the tests preset. About 350 test processes exit at the same moment and all write and lock the same .gcda files, so exits crawl inside the suite only. Measured at load 32-36: the server exits after SIGTERM in 0.08-0.11 s on a release build and about 0.85 s on the coverage test build. It does not hang.

Fix#

Cap the C++ test parallelism (8 parallel tests worked), or configure the test build with -DDFTRACER_UTILS_COVERAGE=OFF if the user agrees, since cache settings are the user's call. Do not start busy-loop load while a suite run is going, because it fails unrelated tests. Do not dismiss a timeout as "load" without reproducing it: the user treats a server that hangs under parallel load as a real bug.

Evidence#

Measured in a dftracer-utils session on 2026-10-05; the all_suites C++ step was capped at -j8 afterwards.

Also found by searching

  • ctest dftracer_server test times out waiting 60 s for exit after SIGTERM
  • corrupt arc tag gcda in logs
  • full ctest preset tests timeouts under load but tests pass alone
  • DFTRACER_UTILS_COVERAGE=ON in the build cache of build-tests