Summary
When running dune runtest --force (used for coverage builds to ensure full recompilation), several test executables hit symlink race conditions during parallel execution.
Failure Details
Affected executables:
test_range_check.exe
test_step.exe
test_plonk_curve_ops.exe
Error: Unix.Unix_error "File exists" symlink
Observed in: Nightly build #1268 on branch dkijania/force-coverage-on-nightly
Log excerpt
test_range_check.exe: internal error, uncaught exception:
(Unix.Unix_error "File exists" symlink
test_step.exe: internal error, uncaught exception:
(Unix.Unix_error "File exists" symlink
test_plonk_curve_ops.exe: internal error, uncaught exception:
(Sys_error
Context
The --force flag was added in PR #18751 to ensure bisect_ppx generates .coverage files for all source files during nightly builds. Without --force, dune's incremental compilation skips unchanged files, leading to incomplete coverage.
The symlink collisions occur because --force causes all targets to rebuild in parallel, and these test executables create symlinks that race with each other.
Impact
- These appear to be warnings/crashes of individual test processes, not test failures that block CI
- The affected tests (pickles-related) may still pass on retry since dune retries failed tests
Suggested Fix
- Investigate which symlinks are being created and whether they can use unique names or atomic operations
- Alternatively, clean the
_build directory before --force runs to avoid stale symlinks
- Consider if
dune clean before runtest --force is cheaper than debugging the race
Summary
When running
dune runtest --force(used for coverage builds to ensure full recompilation), several test executables hit symlink race conditions during parallel execution.Failure Details
Affected executables:
test_range_check.exetest_step.exetest_plonk_curve_ops.exeError:
Unix.Unix_error "File exists" symlinkObserved in: Nightly build #1268 on branch
dkijania/force-coverage-on-nightlyLog excerpt
Context
The
--forceflag was added in PR #18751 to ensure bisect_ppx generates.coveragefiles for all source files during nightly builds. Without--force, dune's incremental compilation skips unchanged files, leading to incomplete coverage.The symlink collisions occur because
--forcecauses all targets to rebuild in parallel, and these test executables create symlinks that race with each other.Impact
Suggested Fix
_builddirectory before--forceruns to avoid stale symlinksdune cleanbeforeruntest --forceis cheaper than debugging the race