Skip to content

Backport #109178 to 26.6: Preserve original key order in bucketed Map serialization - #112962

Merged
clickhouse-gh[bot] merged 2 commits into
26.6from
backport/26.6/109178
Aug 3, 2026
Merged

clickhouse-gh[bot] merged 2 commits into
26.6from
backport/26.6/109178

Conversation

@robot-clickhouse-ci-1

@robot-clickhouse-ci-1 robot-clickhouse-ci-1 commented Aug 1, 2026 •

Copy link
Copy Markdown
Contributor

Original pull-request #109178

This pull-request is a last step of an automated backporting.
Treat it as a standard pull-request: look at the checks and resolve conflicts.
Merge it only if you intend to backport changes to the target branch, otherwise just close it.

The PR source

The PR is created in the CI job

Version info

  • Merged into: 26.6.2.147

@robot-clickhouse-ci-1 robot-clickhouse-ci-1 added pr-backport Changes, backported to release branch. Do not use manually - automated use only! pr-bugfix Pull request with bugfix, not backported by default labels Aug 1, 2026
@clickhouse-gh

clickhouse-gh Bot commented Aug 1, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [BackportPR], commit [a4fa23a]

Summary: ✅

@alexey-milovidov

Copy link
Copy Markdown
Member

🕵 The only red check was Integration tests (amd_asan_ubsan, db disk, old analyzer, 5/6) — a runner machine wedge, not a test failure: the Run step of job 91435509718 never reported completed_at and post-job cleanup took ~4 minutes (02:01:35 → 02:05:23), which means the machine itself was unresponsive. The report shows the shard as ERROR with 0s duration and no per-test detail. The same shard has wedged identically on several unrelated 26.6 pull requests (#112371, #112885, #112676).

I merged 26.6 into the branch (the 15 new commits touch none of the files this backport changes) to get a fresh run on different runners.

@groeneai, please investigate why the amd_asan_ubsan, db disk, old analyzer, 5/6 integration shard keeps wedging on the 26.6 branch and provide a fix in a separate PR. If a fix is already in progress, link it here.

@groeneai

groeneai commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Yes, a fix is in progress: #112984 (mine, open). It is blocked, and the reason for the block changes what the fix has to be, so it is worth stating.

Root cause. The outer job container starts with --memory = physical - 2 GiB (LIMITED_MEM, 59.78 GiB of a 61.78 GiB m7i.4xlarge), leaving 2 GiB for the runner agent, dockerd and the kernel. The job also runs --cgroupns=host, so the nested dockerd parents its containers at the host root: the nested ClickHouse/Keeper/MinIO containers (default mem_limit: 12g each) escape the outer limit entirely and their charge lands in a sibling host cgroup. Measured directly: outer capped at 1 GiB, nested wrote 1.5 GiB, outer memory.current stayed at 154 MiB with oom_kill 0. The host runs out, the runner agent stops heartbeating, and the API finalizes the job roughly 50 minutes before the runner notices. That is the shape you saw: Run with no completed_at, slow post-job cleanup, and a 0s ERROR node with no per-test detail because the run never reaches reporting, which is also why CIDB holds no rows for this class.

The hazard is already documented in-tree for this same image, above KEEPER_DIND_MEM in ci/defs/job_configs.py: Keeper stress was capped to about 70% of physical for exactly this reason. The regular integration job still uses LIMITED_MEM.

In job 91435509718 the last output is 01:11:32 at 62%, all three xdist workers stop within milliseconds of each other (one event, not three independent timeouts), cancellation lands at 01:57:54, and post-job cleanup terminates orphan python3, sh and docker processes. The comparable master run terminates no orphans.

The 26.6 concentration, which I can now confirm and explain. Re-measured today from the Actions job records: 8 wedges across the four pull requests you list, all between 48.0 and 53.7 minutes, on 8 distinct on-demand m7i.4xlarge instances, so it is not one bad machine. Control: 0 wedges in 19 real runs of the same shard on master-base pull requests, and master's own 5/6 runs 89 to 94 minutes and passes.

The cause is the shard's module split, which differs per branch. From the two job logs: 26.6's 5/6 carries test_keeper_snapshot_chunked_transfer (18 tests, 12 Keeper nodes, 7 of them with MinIO) and test_backup_restore_on_cluster (73 log references), while master's 5/6 carries neither (0 and 7). Worker count is 3/3 either way, so 26.6's shard reaches a higher peak concurrent container count and crosses the line where master's does not. The backport itself contributes nothing: its changed_integration_tests is empty.

Why #112984 is not merged. Its containment mechanism needs cgroup v2, and the runners are v1: every job's dmesg shows systemd.unified_cgroup_hierarchy=0 on the kernel command line, measured on 6 distinct instances, so there is no cgroup.controllers, no memory.max and no cgroup.subtree_control to bound the nested daemon with. The PR fails closed with its own refusal (rc=3, still reproducing in job 91497857260). I did not push a fail-open version, because that would ship the containment guarantee the body promises with nothing behind it.

So it needs one of two decisions, which I put to the CI team on #112984 and which is still open: move the Linux runner AMI to cgroup v2, or rewrite the containment against v1 memory.limit_in_bytes. If you would rather I took the second route now without waiting, say so and I will.

One note on the fresh run you triggered: its 5/6 shard is 35 minutes in as I write this, so it is still inside the window where the earlier ones died. A repeat at around 50 minutes would be expected rather than new information.

@clickhouse-gh
clickhouse-gh Bot merged commit 4865d16 into 26.6 Aug 3, 2026
40 checks passed
@clickhouse-gh
clickhouse-gh Bot deleted the backport/26.6/109178 branch August 3, 2026 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-backport Changes, backported to release branch. Do not use manually - automated use only! pr-bugfix Pull request with bugfix, not backported by default

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants