Skip to content

Print Pipeline on Unfinished Processor Removal - #115584

Merged
Michicosun merged 8 commits into
masterfrom
print_pipeline_on_unfinished_processor_removal
Aug 22, 2026
Merged

Michicosun merged 8 commits into
masterfrom
print_pipeline_on_unfinished_processor_removal

Conversation

@Michicosun

@Michicosun Michicosun commented Aug 20, 2026 •

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

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

This patch moves dumpPipeline from PipelineExecutor to ExecutingGraph and adds debug logging to logical errors inside the graph.


Workflow [PR]
Sync PR [sync-upstream/pr/115584]

Version info

  • Merged into: 26.8.1.1898 (included in 26.8 and later)

@clickhouse-gh

clickhouse-gh Bot commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [6d142fa]

Summary: ✅


AI Review

Summary

This PR moves pipeline dumping into ExecutingGraph and adds graph dumps to internal LOGICAL_ERROR paths such as unfinished processor removal. The earlier live-counter data race was fixed by switching those new sites to dump(false), but the current version still leaves the new unfinished-removal diagnostic ambiguous on repeated processor classes, broadens address printing into older user-visible dump paths, and does not add a focused regression test for the main behavior it introduces.

Findings

⚠️ Majors

  • [src/Processors/Executors/ExecutingGraph.cpp:84] The new unfinished-removal exception still identifies the offending node only by getName(). In wide pipelines there are often many same-class processors, so Trying to remove not finished processor ResizeProcessor plus a dump of multiple ResizeProcessor_* at 0x... nodes still does not tell the reader which node actually violated the invariant. Use describeProcessor(processor.get()) (or at least getUniqID()) in these new Graph: exceptions so the message maps to one concrete node in the dump.

  • [src/Processors/Executors/ExecutingGraph.cpp:356] ExecutingGraph::dump() now hard-codes with_addresses = true, which changes older Current state: / Pipeline stuck diagnostics from stable pipeline shapes into per-run pointer dumps. The helper comment in printPipeline already documents addresses as opt-in noise for user-facing output. Keep address rendering as an explicit flag and enable it only on the new malformed-graph paths that actually need endpoint correlation.

Tests

⚠️ The PR still has no focused regression test for the new unfinished-removal LOGICAL_ERROR path. A small ExecutingGraph/updatePipeline test that removes a processor before it reaches Finished and asserts the exception contains Graph: plus the structural dump would both prove the new behavior and guard against accidentally switching those sites back to the live-counter dump.

Final Verdict

Status: ⚠️ Request changes

Minimum required actions:

  • Make the new unfinished-removal diagnostic identify the concrete processor instance, not just its class name.
  • Stop forcing addresses into all ExecutingGraph::dump() callers; keep them opt-in for the new malformed-graph diagnostics only.
  • Add a focused regression test for the new Graph: unfinished-removal exception path.

LLVM Coverage Report

Metric Baseline Current Δ
Lines 87.10% 87.00% -0.10%
Functions 91.90% 91.90% +0.00%
Branches 79.40% 79.30% -0.10%

Changed lines: Changed C/C++ lines covered: 90/109 (82.57%) · Uncovered code

Full report · Diff report

@clickhouse-gh clickhouse-gh Bot added the pr-not-for-changelog This PR should not be mentioned in the changelog label Aug 20, 2026
@yariks5s yariks5s self-assigned this Aug 20, 2026
@Michicosun
Michicosun enabled auto-merge August 20, 2026 11:02
@clickhouse-gh

clickhouse-gh Bot commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Comparing 6d142fab9 with master b4fb5420d (stripped binary size, per-symbol sizes and ThinLTO time; object sizes against the warmup build of b16561cc8; compile times per translation unit against the most recent warmup build that recompiled it).

✅ No significant changes.

Binary sizes
Binary Master PR Δ
programs/clickhouse-stripped 704.42 MiB 701.40 MiB -3.02 MiB (-0.43%)

Only the stripped binary is compared: the official master build keeps debug symbols while PR builds strip them, so the other binaries differ by construction.

Object file sizes

5 object files changed (+21.01 KiB total), 0 added.

Object file Master PR Δ
src/CMakeFiles/dbms.dir/Processors/Executors/ExecutingGraph.cpp.o 158.22 KiB 192.11 KiB +33.89 KiB (+21.42%)

737 more object files are built by the master warmup baseline only (it builds every object-file target, a pull request build only clickhouse-bundle) and not compared.

Compile time of recompiled translation units

202 translation units recompiled, 2033 s compile time in total, 202 of them have a recent master baseline.

Job report

@Michicosun
Michicosun added this pull request to the merge queue Aug 21, 2026
@Michicosun
Michicosun removed this pull request from the merge queue due to a manual request Aug 21, 2026
@Michicosun
Michicosun enabled auto-merge August 21, 2026 12:59
@Michicosun
Michicosun added this pull request to the merge queue Aug 22, 2026
Merged via the queue into master with commit 8cfff23 Aug 22, 2026
349 of 350 checks passed
@Michicosun
Michicosun deleted the print_pipeline_on_unfinished_processor_removal branch August 22, 2026 08:04
@robot-clickhouse-ci-1 robot-clickhouse-ci-1 added the pr-synced-to-cloud The PR is synced to the cloud repo label Aug 22, 2026
alexey-milovidov added a commit that referenced this pull request Aug 30, 2026
`#115584` defers processor removal into `removeReadyGroups`, which any
executor frame may call at either gap `updateNode` makes in `nodes_mutex`.
That widened an existing window in which a frame parked at such a gap resumes
and dereferences an `Edge` another frame has freed, so re-landing `#115584`
without `#116103` would restore the `heap-use-after-free` at
`auto & node = *edge->to;` reported on `master` as `STID 2837-40ba`.

Related: #116103
Related: #115584
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-not-for-changelog This PR should not be mentioned in the changelog 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