Skip to content

Conversation

@cyphar
Copy link
Owner

@cyphar cyphar commented Sep 24, 2025

It turns out that the the llvm-cov test data ends up taking up ~22GB
after a single run, causing disk exhaustion when writing profiles:

Error: No space left on device (os error 28) at path "/tmp/.tmptg1faV"
LLVM Profile Error: Failed to write file
"/home/runner/work/libpathrs/libpathrs/target/llvm-cov-target/libpathrs-2591742-9389327919420937493_2.profraw":
No space left on device

or when writing the GHA log:

System.IO.IOException: No space left on device :
'/home/runner/actions-runner/cached/_diag/Worker_20250925-173427-utc.log'

Commit bd44fd3 ("gha: clear unused packages for CI") tried to fix
this by using an action to clear unused packages, but this job takes
several minutes to run and isn't guaranteed to solve the problem as we
add more tests.

Instead, sparse-merging the coverage data with llvm-profdata should
resolve this issue. cargo-llvm-cov already does this internally and
searches for any .profraw files in the target directory, so this should
just work without any real downsides.

However, only sparse-merging after each complete run is not sufficient
-- we also need to partition the runs when in CI in order to do this
merge reduction step before the coverage files fill the disk. Ideally we
would use the hash partitioning of nextest but due to some flawed flag
parsing behaviour of cargo-hack we can only partition at the cargo-hack
level for now.

We could also try compressing it, but this would make simple one-shot
runs not as effective. The data is not text so while it does seem to
compress reasonably well it's probably not worth persuing that yet.

Signed-off-by: Aleksa Sarai [email protected]

@cyphar cyphar force-pushed the test-reduce-output branch 18 times, most recently from 7409766 to 58fef6b Compare September 26, 2025 07:03
@cyphar cyphar changed the title test: reduce nextest output test: merge profdata after test runs Sep 26, 2025
@cyphar cyphar force-pushed the test-reduce-output branch 2 times, most recently from e5bb8c3 to 09e296f Compare September 26, 2025 14:45
It turns out that the the llvm-cov test data ends up taking up ~22GB
after a single run, causing disk exhaustion when writing profiles:

  > Error: No space left on device (os error 28) at path "/tmp/.tmptg1faV"
  > LLVM Profile Error: Failed to write file
  > "/home/runner/work/libpathrs/libpathrs/target/llvm-cov-target/libpathrs-2591742-9389327919420937493_2.profraw":
  > No space left on device

or when writing the GHA log:

  > System.IO.IOException: No space left on device :
  > '/home/runner/actions-runner/cached/_diag/Worker_20250925-173427-utc.log'

Commit bd44fd3 ("gha: clear unused packages for CI") tried to fix
this by using an action to clear unused packages, but this job takes
several minutes to run and isn't guaranteed to solve the problem as we
add more tests.

Instead, sparse-merging the coverage data with llvm-profdata should
resolve this issue. cargo-llvm-cov already does this internally and
searches for any .profraw files in the target directory, so this should
just work without any real downsides.

However, only sparse-merging after each complete run is not sufficient
-- we also need to partition the runs when in CI in order to do this
merge reduction step before the coverage files fill the disk. Ideally we
would use the hash partitioning of nextest but due to some flawed flag
parsing behaviour of cargo-hack we can only partition at the cargo-hack
level for now.

We could also try compressing it, but this would make simple one-shot
runs not as effective. The data is not text so while it does seem to
compress reasonably well it's probably not worth persuing that yet.

Signed-off-by: Aleksa Sarai <[email protected]>
@cyphar cyphar merged commit 7962ce1 into main Sep 26, 2025
52 checks passed
@cyphar cyphar deleted the test-reduce-output branch September 26, 2025 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants