Skip to content

Backport #114668 to 26.6: Stop Parquet background reads before releasing the format's read buffer - #114877

Merged
clickhouse-gh[bot] merged 4 commits into
26.6from
backport/26.6/114668
Aug 18, 2026
Merged

clickhouse-gh[bot] merged 4 commits into
26.6from
backport/26.6/114668

Conversation

@robot-clickhouse

@robot-clickhouse robot-clickhouse commented Aug 14, 2026 •

Copy link
Copy Markdown
Member

Original pull-request #114668

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

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

clickhouse-gh Bot commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [BackportPR], commit [f0dcce8]

Summary: ✅

@alexey-milovidov

Copy link
Copy Markdown
Member

🕵 The failed Integration tests (amd_asan_ubsan, db disk, old analyzer, 5/6) attempts were both caused by self-hosted runner connectivity loss (not a test or source failure). I requested another rerun; no code change is indicated.

@alexey-milovidov

Copy link
Copy Markdown
Member

🕵 @groeneai, investigate the failure: https://github.com/ClickHouse/ClickHouse/actions/runs/31865350401/job/95139621296 and provide a fix in a separate PR. The job reached its 7,800-second timeout after unrelated failures/hangs in test_restore_db_replica and test_distributed_load_balancing; the Parquet backport test was not implicated.

@groeneai

Copy link
Copy Markdown
Collaborator

Investigated. The two tests are victims of the stall, not its cause, so I do not think a fix to either one is indicated. Evidence from the job log:

Time (UTC) Event
08:36:20 pytest started; per-test timeout 900s, xdist --session-timeout=7200
09:13:03 last genuine progress line
09:50:44 4 lines within 0.34 ms, including both FAILEDs, after 37.7 min of total silence
11:14:13 praktika: Timeout exceeded [7800], sending SIGTERM

Four independent watchdogs all missed:

  1. pytest-timeout 900s (signal method): test_restore_db_replica[alter table-no exists table-with restart] ran 2301s and test_distributed_load_balancing::test_load_balancing_hostname_longest_common_prefix ran 2261s. No SIGALRM in either.
  2. xdist --session-timeout=7200 was due at 10:36:21. The xdist.dsession.Interrupted: session-timeout: marker never appears in the log.
  3. The praktika 7800s backstop (session_timeout_parallel 7200 + 600, integration_test_job.py:1090-1093) was due at 10:46:20 and fired at 11:14:13, i.e. 1673s (27.9 min) late. It is a bare time.sleep(timeout) in a daemon thread (ci/praktika/utils.py:283-291).
  4. test_keeper_snapshot_chunked_transfer::test_recover_after_s3_read_error_during_transfer started at 09:50:44 and emitted nothing at all.

A time.sleep overshooting by 28 minutes is not something an in-process hang can cause, and three xdist workers do not stop emitting simultaneously. The 4-lines-in-0.34ms burst is one buffered pipe flush, which is also why the log attributes the stall to whichever tests happened to be in flight. This is the same shard and the same shape you diagnosed yourself on this PR on 2026-08-15 ("self-hosted runner connectivity loss ... no code change is indicated"), so I read today's failure as a recurrence rather than a new test-side defect. This shard's resource bounding is #112984.

I could not determine the host-side cause, because the evidence is not collected on this path: dmesg is only dumped on the normal path (integration_test_job.py:1274-1304), and after the SIGTERM the archiving step got 13.3s before GitHub cancelled it, so nothing was uploaded. S3 artifacts return 403 and CIDB has 0 rows for this PR.

That gap is the one thing here I can fix in a separate PR: on the hard-timeout path, capture dmesg and per-cgroup memory before archiving, and cap the archive so it cannot be cut off. Without it every recurrence of this looks like a bare 7800s ERROR with no attribution. Want me to open that, or would you rather it fold into #112984?

@alexey-milovidov

Copy link
Copy Markdown
Member

🕵 Please fold the hard-timeout diagnostics into #112984, where the nested-container resource bounding and attribution work already lives. Keep this backport free of runner-infrastructure changes.

@groeneai

Copy link
Copy Markdown
Collaborator

Will do. Folding it into #112984 and keeping this backport free of runner-infrastructure changes.

Scope going in there: on the hard-timeout path, write dmesg and the per-cgroup memory counters before the log archive rather than after, so the small diagnostics survive the job-level cancellation, and bound the archive so it cannot be cut off mid-write. On the failing run the praktika backstop fired at 11:14:13 and the job was cancelled at 11:14:33, so post-processing had 13.3 seconds and nothing was uploaded, which is why I could not attribute the host-side cause.

@groeneai

Copy link
Copy Markdown
Collaborator

Folded into #112984 as 2a6c611: on the hard-timeout path the per-cgroup counters and the dmesg OOM lines now print to stdout before the log archive, and the archive is bounded there so it cannot outrun the job. Nothing in this backport touched.

@clickhouse-gh
clickhouse-gh Bot merged commit 8aaee94 into 26.6 Aug 18, 2026
38 of 39 checks passed
@clickhouse-gh
clickhouse-gh Bot deleted the backport/26.6/114668 branch August 18, 2026 01:30
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.

3 participants