Skip to content

Fix No space left on device in the Install packages job - #112687

Merged
alexey-milovidov merged 1 commit into
masterfrom
fix-install-packages-disk-space
Jul 31, 2026
Merged

alexey-milovidov merged 1 commit into
masterfrom
fix-install-packages-disk-space

Conversation

@alexey-milovidov

Copy link
Copy Markdown
Member

The tgz tests of the Install packages job keep failing on the AMD runners with

cp: error writing '/usr/lib/debug/usr/bin/clickhouse.debug': No space left on device

It is not a one-off: master and the release branches hit it on 2026-07-23, 07-25, 07-26 and 07-30, always in Install server tgz, always in both the deb and the rpm image.

The tgz tests run last and are by far the most disk hungry tests of the job. doinst.sh copies the unpacked tarball into the system instead of moving it, so a package occupies twice its size until the unpacked tree is removed - 6.8 GiB for clickhouse-common-static-dbg alone. At that moment the deb, rpm and tgz packages of the same build, over 6 GiB together, are all still sitting in ci/tmp, which is mounted into the container.

This removes the unpacked tree once doinst.sh has installed it, and deletes the deb and the rpm packages once their own tests are done, which frees about 5 GiB. It also prints df -h / between the phases, since nothing in the report told us how tight the disk was.

The --rm plus docker kill container teardown was left alone on purpose: making it synchronous with docker rm -f would serialize the removal of multi-gigabyte writable layers into the critical path, and this job already times out against its 900s limit from time to time.

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

...

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?REF=master&sha=3bb7f633cfc4794a68bd724a8060b472fd6ec5d5&name_0=MasterCI&name_1=Install%20packages%20%28amd_release%29

The tgz tests of the `Install packages` job keep failing on the AMD runners with

    cp: error writing '/usr/lib/debug/usr/bin/clickhouse.debug': No space left on device

They run last and are by far the most disk hungry tests of the job: `doinst.sh`
copies the unpacked tarball into the system instead of moving it, so
`clickhouse-common-static-dbg` alone occupies 6.8 GiB - twice its 3.4 GiB - while
the deb, rpm and tgz packages of the same build, over 6 GiB together, are all
still sitting in the directory mounted into the container.

Remove the unpacked tree once `doinst.sh` has installed it, and delete the deb and
the rpm packages once their own tests are done. This frees about 5 GiB.

https://s3.amazonaws.com/clickhouse-test-reports/json.html?REF=master&sha=3bb7f633cfc4794a68bd724a8060b472fd6ec5d5&name_0=MasterCI&name_1=Install%20packages%20%28amd_release%29

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@clickhouse-gh

clickhouse-gh Bot commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [e011b36]

Summary: ✅


AI Review

Summary

This PR reduces disk pressure in the Install packages job by deleting tested .deb and .rpm archives from ci/tmp before the tgz phase and by removing each unpacked tgz tree after doinst.sh finishes. I did not find a correctness or CI-safety issue in the current patch, and the PR's Install packages jobs are green on both amd_release and arm_release.

Final Verdict

✅ No blocking findings.

@clickhouse-gh clickhouse-gh Bot added the pr-ci label Jul 30, 2026
@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Jul 31, 2026
@alexey-milovidov alexey-milovidov self-assigned this Jul 31, 2026
Merged via the queue into master with commit ea07b94 Jul 31, 2026
179 checks passed
@alexey-milovidov
alexey-milovidov deleted the fix-install-packages-disk-space branch July 31, 2026 16:06
@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Jul 31, 2026
alexey-milovidov pushed a commit to EilRoviSoft/ClickHouse that referenced this pull request Aug 1, 2026
The `Install packages` job runs for about 890 seconds against a 900 seconds
timeout and times out several times a week. More than half of that time goes into
the debug symbols packages, which no test in the job uses - they only start a
server, an init.d script or a keeper and ask for a version.

The packages are picked up by accident: `clickhouse-{server,client,common}*deb`
also matches `clickhouse-common-static-dbg` (3.4 GiB unpacked) and
`clickhouse-keeper*deb` also matches `clickhouse-keeper-dbg` (2.3 GiB), so the
twelve tests install them ten times over. Measured on
3bb7f63, that is 39 seconds of the 75 seconds of
`Install server deb`, 72 of 96 in `Install server tgz` - the tgz packages pay
twice, because `doinst.sh` copies the unpacked tree instead of moving it - and so
on for the rest.

Take the debug symbols out of the four tests that duplicate coverage:
`Run server init.d` and its `proxy to systemd` variant install exactly the same
packages as `Install server deb`, and the tgz tests run over the same tarballs in
the deb and in the rpm image. Every debug symbols package is still installed once
per package format, so nothing is left untested. This saves 213 seconds.

Related: ClickHouse#112687

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-ci pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants