Skip to content

Backport #113224 to 26.6: Do not read the internal database of temporary tables in Merge - #113882

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

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

Conversation

@robot-ch-test-poll

@robot-ch-test-poll robot-ch-test-poll commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

Original pull-request #113224

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.3.20

@robot-ch-test-poll robot-ch-test-poll added pr-backport Changes, backported to release branch. Do not use manually - automated use only! pr-critical-bugfix labels Aug 7, 2026
@clickhouse-gh

clickhouse-gh Bot commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [BackportPR], commit [69ee17f]

Summary: ✅

@alexey-milovidov

Copy link
Copy Markdown
Member

🕵 The only red check, Integration tests (amd_asan_ubsan, db disk, old analyzer, 5/6), was a runner wedge, not a test failure: the shard went silent at 62% (last activity 00:05, unrelated tests test_keeper_snapshot_chunked_transfer / test_restore_db_replica in flight) until the 7800 s session timeout sent SIGTERM at 01:50, ending in ERROR with no per-test failures. This is the same wedge-prone shard previously seen branch-wide on 26.6. I merged the current 26.6 head into the branch to trigger a fresh full run on different runners. @groeneai, investigate the recurring wedge on this shard and provide a fix in a separate PR; if one is already in progress, link it here.

@groeneai

groeneai commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

Same wedge, and this run gives the first direct confirmation of its cause.

It is the same defect. All 14 wedges I can find on 26.6 stop at exactly [ 62%] with the same two modules in flight (test_keeper_snapshot_chunked_transfer, test_restore_db_replica), and the mechanical signature is that the job is finalized long before its own Run step ends: here job.completed_at is 00:15:39Z while the Run step's completed_at is 01:50:29Z, so the API closed the job 95 minutes before the runner noticed.

What is new: this run survived long enough to dump dmesg, and the check fired.

[2026-08-08 01:50:22]   Fail [OOM in dmesg]

That is the host running out of memory, which I had claimed without a direct artifact until now. Earlier wedges never got there (Dumping dmesg count 0 in all four whose logs are still retained), which is why previous reports only showed the symptom. The dmesg.log is attached to this job's report.

Why the three reports looked like three different failures. Three independent timers cover this job and all three lost:

  • --session-timeout=7200 and the 900 s per-test timeout live inside the starved pytest process, so neither fired.
  • The praktika watchdog (session_timeout_parallel + 600 = 7800 s, integration_test_job.py:1092) was armed at 23:29:33 and should have fired at 01:39:33. It fired at 01:50:15, 642 s late. A time.sleep overshooting by 10 minutes is itself a symptom of a starved host.
  • The GitHub side gave up first, at 00:15:39.

Whichever races first decides what the report shows, so job-level cancellation (08-01), a Run step with no completed_at (08-03) and a 7800 s SIGTERM (today) are one defect with three finishing orders, not three defects.

Breadth, from the Actions job records (CIDB is blind here: a wedged shard writes no per-test rows). Last 60 26.6 runs, deduplicated and excluding skipped, 57 runs per shard:

shard runs wedged failed
1/6 .. 4/6, 6/6 57 each 0 0
5/6 57 14 (24.6%) 48 (84%)

It is not load. In the run you linked, 5/6 had 805 items, the smallest of the six; 6/6 had 1265 and passed in 75 minutes, and the five green shards finished in 75 to 93 minutes. 5/6 carries the heaviest concurrent nested-container peak, not the most tests.

Fix status. The fix is #112984, blocked on a question for the CI team rather than on work. The job container gets --memory=64183291904 (59.78 GiB, physical minus 2 GiB) but also --cgroupns=host, so the nested dockerd parents its containers at the host root and the ClickHouse/Keeper/MinIO containers (default mem_limit: 12g) escape that limit entirely. Nothing bounds them today.

One correction so it is not counted twice: PR 112261 splits Integration tests (amd_asan_ubsan, db disk, N/4), a different job. On 26.6 the old-analyzer job is already 6 batches, so 112261 does not touch this shard.

The decision I need, since a third report means the wait is costing real CI time. 112984 refuses to start on these runners because they boot cgroup v1 (systemd.unified_cgroup_hierarchy=0, verified on 6 distinct m7i.4xlarge instances), and every mechanism it uses needs v2. Two routes:

  1. Move the Linux runner AMI to cgroup v2. Small, but the AMI is not in this repo, so I cannot do it in a PR.
  2. Rewrite the containment against cgroup v1 (memory.limit_in_bytes under /sys/fs/cgroup/memory/). Entirely mine to do, roughly a day, different OOM reporting, and dead code the moment the AMI moves.

I will take route 2 now if you say so. I will not make the precondition fail open, because that would ship a bound that does not exist. If you would rather have relief today while either route lands, rebalancing this shard's modules is a small, self-contained change I can send separately, and at 48 failures in 57 runs it is probably worth doing regardless.

@clickhouse-gh
clickhouse-gh Bot merged commit 7094a29 into 26.6 Aug 8, 2026
39 of 40 checks passed
@clickhouse-gh
clickhouse-gh Bot deleted the backport/26.6/113224 branch August 8, 2026 09:01
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-critical-bugfix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants