Skip to content

Strip LLVM Profile Error: noise from test stdout, not only stderr - #113619

Merged
fm4v merged 6 commits into
ClickHouse:masterfrom
groeneai:groeneai/strip-llvm-profile-noise-from-test-stdout
Aug 29, 2026
Merged

fm4v merged 6 commits into
ClickHouse:masterfrom
groeneai:groeneai/strip-llvm-profile-noise-from-test-stdout

Conversation

@groeneai

@groeneai groeneai commented Aug 6, 2026 •

Copy link
Copy Markdown
Collaborator

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):

clickhouse-test now removes LLVM Profile Error: messages from a test's stdout as well as its stderr, so coverage runs stop reporting result differs with reference for tests whose own output is correct.

Description

On Stateless tests (amd_llvm_coverage_per_test, per_test_coverage, N/8) (NightlyCoverage, master-only) tests are reported result differs with reference where the only divergence is the profiling runtime's own diagnostics. 30 days: 13 distinct carrier tests, and for every one the added diff lines are the LLVM Profile Error: lines. Only 4 have a fixing PR (#110716).

Root cause. clickhouse-test sets LLVM_PROFILE_FILE=...-%2m.profraw per worker, so short-lived clickhouse-client processes contend over a 2-slot merge pool and a loser prints, on stderr, one of the three messages ever observed for this failure. The harness already strips those from stderr (#102420, citing #97020), but a test that itself does ... 2>&1 merges the client's stderr into its own stdout before the harness sees either stream, and stdout is what gets diffed against .reference.

Change. Apply the same rule to stdout_file at the post-processing tail of run_single_test, where that file is already rewritten in place 18 times before the reference diff runs.

It strips the matched message span, not the whole line: in 4 of 4 recorded occurrences of 00933_ttl_replicated_zookeeper the third message arrives as ...profraw": Success200, with the test's real 200 glued on by byte interleaving, so a line-drop would delete that output.

A per-test filter cannot replace this: the noise reaches stdout by four routes, including the shared query_with_retry helper and clickhouse-keeper-client. grep -rl '2>&1' tests/queries/0_stateless/*.sh matches 917 files; none carries a filter.

Validation. The per_test_coverage flavour every carrier was observed on is absent from pull_request.py; it runs only from nightly_coverage.py, on a schedule. This PR's CI does run other coverage-instrumented stateless jobs, but the leak is a race between short-lived clients, so a green run there is not evidence either way. Verified locally, details below.

Local validation (this PR's CI cannot reach the failing path)

Through the real runner, same server and same client shim emitting the verbatim captured bytes, only the runner differing:

arm result
before FAIL: result differs with reference, +...: Success200
after OK
mutant: same fix as a whole-line drop FAIL: -200 / -400, real output deleted

That last arm is why the fix strips a span rather than a line.

Fixture level, driving the shipped transform extracted from the file by AST: 11 arms pass, including a byte-identical no-op control on clean stdout, non-UTF-8 input, a LLVM Profile Warning: line surviving, and the message glued mid-line. All 182 distinct spans observed in CIDB over 90 days match an independently derived oracle. The line-drop mutant fails exactly the glued arms and leaves the others green; deleting the transform fails every carrier arm.

Regression surface (the transform runs for every stateless test): a 164-test sample on both runners, identical pass/fail sets, identical failure reasons, zero regressions; plus 50 randomized runs of two controls, all green.

Left alone deliberately: the %2m pool size (widening it only lowers the collision rate and changes what the coverage job measures), and LLVM Profile Warning: (3 rows in 90 days, all in the integration suite, with no reference diff).


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

Version info

  • Merged into: 26.9.1.312 (included in 26.9 and later)

On the nightly per-test coverage job, tests are reported as
`result differs with reference` where the only divergence is the profiling
runtime's own diagnostics. Over 30 days: 13 carrier tests, 76 rows, and for
every carrier the added diff lines are the `LLVM Profile Error:` lines. The
tests' own output is correct.

`clickhouse-test` sets `LLVM_PROFILE_FILE=...-%2m.profraw` per worker, and
`%2m` is a two-slot merge pool (`ProfilePoolId = getpid() % MergePoolSize`),
so short-lived `clickhouse-client` processes of one worker collide and a loser
prints one of three messages on stderr. The harness already strips those from
stderr, but a test that itself does `... 2>&1` merges the client's stderr into
its own stdout before the harness sees either stream, and stdout is the file
that gets diffed against `.reference`. The existing filter is correct and sits
on the wrong stream.

Apply the same rule to `stdout_file` at the post-processing tail of
`run_single_test`, where that file is already rewritten in place before the
reference diff runs.

The transform removes the matched message span rather than the whole line.
In four of four recorded occurrences of `00933_ttl_replicated_zookeeper` the
third message arrives as `...profraw": Success200`, with the test's real `200`
glued onto it by byte interleaving in the merged pipe, so dropping the line
would delete real output and leave the test failing. The span is bounded by the
`strerror` table, matched longest-first, because that table contains values
with digits and values that are prefixes of other values.

A per-test filter cannot replace this. The noise reaches stdout by four
routes: a direct `2>&1` on a client line, the shared `query_with_retry` helper
in `shell_config.sh` (so the test carries no redirection of its own), process
substitution into a `grep` whose stdout is the test's stdout, and a `.python`
pipe; a fifth carrier uses `clickhouse-keeper-client`, a different binary.
918 stateless `.sh` files use `2>&1` and none of them filters this.

The failing job is scheduled from `nightly_coverage.py` and is absent from
`pull_request.py`, so this change cannot be exercised by its own CI. It was
validated locally in both directions through the real runner, against all 182
distinct message spans observed in 90 days, and against a mutant implementing
the filter as a line drop, which fails exactly the glued cases.
…mment

The comment above the pattern claimed the three matched messages were the only
ones the profiling runtime can print. It cannot: `InstrProfilingFile.c` alone
has 24 `PROF_ERR` sites, the whole `compiler-rt/lib/profile` has 33 with 23
distinct format strings, and the merge path this change is about has five
(`:399`, `:407`, `:431`, `:469`, `:522`) of which the pattern covers one.
Matching only the observed shapes is deliberate and correct, because an
unmatched message is left alone rather than mistaken for real output; only the
wording was wrong. A classification of every `LLVM Profile <level>:` span
observed in the CI database over 180 days returns exactly the three handled
shapes plus `Warning:`, and nothing else, so that is what the comment now says.
No code byte changed: the four symbols' source segments are identical to the
previous revision.

The regression test is feasible even though a 237-line predecessor for a similar
runner filter was deleted from `ci/tests/`. That removal was mechanical, not a
judgement on runner tests: the deleted file constructed a `TestCase` and called
`process_result_impl`, so it broke when those internals moved and blocked CI.
The surviving 103-line sibling `test_shared_engine_replacer_discovery.py` uses
the same `runpy.run_path` loader and passes, because it only calls pure helpers.
`strip_llvm_profile_errors_in_file(filename)` is pure, so this arm takes the
same shape and references neither `TestCase` nor `TestSuite` nor
`process_result_impl` nor `argparse`.

It is also the only CI signal this change can have. `per_test_coverage` runs
from `nightly_coverage.py` on a schedule and is absent from `pull_request.py`,
while `ci_tests` is a pull-request job whose digest already includes both `./ci`
and `./tests/clickhouse-test`.

Nine byte-exact arms cover each message alone on a line, a message glued onto
real output, a byte-identical no-op on clean stdout, non-UTF-8 bytes around a
stripped span, a surviving `LLVM Profile Warning:` line, and an errno outside
the `strerror` table keeping the whole message. A tenth assertion pins the call
site by parsing `run_single_test`: the call must sit after every in-place
`stdout_file` rewrite, so it sees their output, and before the return. Four
mutants show the two halves are independently load-bearing: replacing the span
strip with a whole-line drop reddens only three fixture arms, deleting the
transform body reddens five, and deleting or hoisting the call site reddens only
the wiring assertion.

The added blank line before `str_to_numeric` removes a pre-existing `black`
opinion about the file rather than adding one.
The comment budget allows at most three consecutive comment lines and requires
added comments not to outnumber added code. The rewrite above had grown the
block to four; this reflows the same three facts (the observed message set, the
`file:line` citations, the strerror bound) onto three lines of 89 to 91
characters, within the file's own convention. No code byte changes.
@groeneai

groeneai commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator Author
Internal second-model review (click to expand)

An independent reviewer read the resulting code cold (without the author's evidence) and a
second model re-reviewed the diff. Both passes are recorded here, including what was rejected.

Second-model gate: 0 findings on the final commit. Its stated coverage: the full filter,
the enclosing runner functions, the callers, the sibling stderr path, the runtime's message
sources, the CI wiring, and the new regression test.

The independent pass raised 3 items, all accepted. All three were inaccuracies in the
PR's own prose, not in the code; the code survived every check below unchanged.

Item Verdict
⚠️ The description quoted a row count from a rolling 30-day CIDB window (76 rows). Re-measured today the same query returns 62; on the same predicate the count runs 32 / 43 / 62 / 99 / 113 / 148 for 14 / 21 / 30 / 45 / 60 / 90 days. A reviewer re-running it before merge would not see the published number. Accepted. The rolling count is gone. The carrier count (13) and "for every one the added diff lines are the LLVM Profile Error: lines" both reproduce exactly, so those stayed.
⚠️ The description still said a losing client "prints one of three messages", a universal about the runtime that the source comment in this same diff had already been corrected to disclaim. At the pinned llvm-project submodule there are 24 PROF_ERR call sites in InstrProfilingFile.c (33 across compiler-rt/lib/profile) and 17 distinct Error format strings; the merge and write paths alone hold five, of which this filter matches one plus :623. Accepted. Reworded to "one of the three messages ever observed for this failure", matching the source comment. Three is the observed set, not the runtime's set.
💡 The validation table said the new test file has "9 arms plus a wiring assertion"; pytest collects 9 in total (8 fixture arms + the wiring assertion), and a neighbouring "11 arms" refers to the out-of-tree harness. Accepted, both counts corrected.

Because the description changed, the second-model gate was re-run against the corrected
text
, not against the version it first saw.

Checks the code passed, verified independently of the author's evidence:

  • All 182 distinct LLVM Profile Error: spans recorded in CIDB over 90 days were driven
    through the shipped transform, extracted from the file by AST, and compared against an
    oracle derived from the three C format strings and libc strerror, never from the shipped
    regex. Span lengths agree 182/182. Each span was then embedded in four shapes (own line,
    glued onto output, mid-file, glued mid-file): 728 cases, zero leaks, surrounding real
    output byte-preserved.
  • Fail-closed. An errno outside the 256-entry strerror table leaves the whole message,
    so the transform cannot delete real output on an unrecognised tail. The three strict prefix
    pairs in that table (No such device inside No such device or address, and two more)
    cannot over-match, because the alternation is sorted longest-first.
  • No pathological backtracking. 5 MB of clean stdout costs 0.3 ms (the literal-absent
    fast path); 5 MB with one message 6.9 ms; 20k messages 15.6 ms on their own lines and
    16.2 ms concatenated on one; adversarial shapes (a 200k-character filename with an
    unmatched errno, 2k near-misses with 400-character names, 100k bare prefixes) all under
    17 ms. Building and compiling the pattern costs 0.76 ms once per process.
  • Placement is load-bearing and correct. 18 in-place stdout_file rewrites precede the
    call (16 replace_in_file + 2 replace_in_file_re, the last at :3870; the call at
    :3879; the sole return at :3881), and both the reference diff and --record's
    shutil.copy2 run after run_single_test returns. A --record run under coverage can
    therefore no longer bake the noise into a reference.
  • Test liveness, by an independent mutation matrix run against a throwaway copy (no
    source touched; tests/clickhouse-test md5-identical before and after): implementing the
    fix as a whole-line drop fails 3 arms and only fixture arms; deleting the call site fails
    only the wiring assertion; making the transform a no-op fails 5 carrier arms; hoisting the
    call above the first rewrite fails only the wiring assertion. That asymmetry is what shows
    the span-strip and both wiring bounds are each load-bearing.
  • Bytes throughout, so non-UTF-8 stdout survives; os.strerror is locale-independent for
    these values.
  • Nothing can be masked: grep -rl 'LLVM Profile' tests/queries/ matches 0 files
    (positive control: Received exception matches one .reference).
  • The reviewer's own carrier enumeration, done before reading the author's, matched it with
    no divergence, including the shared query_with_retry helper, process substitution, the
    .python pipe, clickhouse-keeper-client, and --record.
  • A missing-stdout_file asymmetry was considered (the new helper would raise where sed
    merely returns nonzero) and dismissed: the shell creates the redirect target before the test
    runs, both containing directories are created unconditionally, the 18 existing rewrites
    already assume the file exists, and TestCase.run's except Exception would contain it.

Noted and deliberately left alone: the %2m merge-pool size (that is the coverage owner's
measurement to tune), LLVM Profile Warning: (3 rows in 90 days, all in the integration suite
with no reference diff), and the near-daily bare clickhouse-test exited with code 1 on the
same job, which is an unrelated defect in the post-run coverage block and is tracked
separately.

@groeneai

groeneai commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator Author
Pre-PR validation gate (click to expand)
# Question Answer
a Deterministic repro? Yes. A client shim emits the verbatim CI-captured 3-message block on stderr (with the third message unterminated, reproducing the glue) while a carrier test merges it with 2>&1; clickhouse-test then FAILS every run, not "~1%".
b Root cause explained? Yes. clickhouse-test sets LLVM_PROFILE_FILE=...-%2m.profraw per worker; %2m is a 2-slot merge pool (ProfilePoolId = getpid() % MergePoolSize), so concurrent short-lived clients collide and a loser prints one of the three messages ever observed for this failure on stderr. The harness strips those from stderr only, but a test's own 2>&1 merges the client's stderr into its stdout before the harness sees either stream, and stdout is the file the reference diff reads.
c Fix matches root cause? Yes. It applies the harness's own existing rule to the stream the diff actually reads, at the seam that already rewrites that file in place 18 times before the diff. Not a widened bound, not a skip tag, no dataset reduction. no-coverage was already tried on 02434 and closed as strictly worse; widening %2m only lowers the collision rate, since getpid() % N collides at any finite N.
d Test intent preserved / new tests added? Preserved: no existing test and no .reference is touched, and nothing can be masked. Added ci/tests/test_llvm_profile_stdout_filter.py (60 lines, 9 collected cases: 8 byte-exact fixture arms plus a static wiring assertion), which is the only CI signal this change can have, since per_test_coverage is absent from pull_request.py while ci_tests is a PR job whose digest already covers ./tests/clickhouse-test. A stateless test cannot cover it: reproducing the leak needs a client that writes to stderr while the test merges it.
e Both directions demonstrated? Yes, through the real runner on one identity-asserted binary, only the runner differing: pre-fix FAIL with +...: Success200, post-fix OK.
f Fix is general across code paths? Yes, and that is the point of fixing it here. The noise reaches stdout by four measured routes: direct 2>&1 (9 tests), the shared shell_config.sh query_with_retry helper (so the test has no 2>&1 of its own), process substitution 2> >(grep -Fv ...), and a .python pipe; plus clickhouse-keeper-client, a different binary. The fix keys on the message text at the stream level, so it covers all of them; a per-test filter cannot reach three of them. grep -rl '2>&1' tests/queries/0_stateless/*.sh matches 917 files and none carries a filter.
g Fix generalizes across inputs? Yes. 11 arms in the local harness (.scratch/verify.py, beyond the 8 shipped in-tree): the glue case in 1-line and 3-line form, clean whole-line blocks, no trailing newline, noise at EOF, the prefix mid-line, similar-looking real output left untouched, non-UTF-8 bytes both with and without noise, and a LLVM Profile Warning: line surviving. Plus all 182 distinct spans observed in CIDB over 90 days. The span boundary is generated from the strerror table, longest-first, because that table contains digits (Unknown error 137) and prefix pairs (No such device inside No such device or address).
h Backward compatible? N/A and clean: test-runner only. No setting, no serialization format, no SettingsChangesHistory.cpp entry, no experimental gate, no default change. --record benefits: it copies stdout_file into the reference from process_result_impl, which runs after the post-processing tail, so a recorded reference can no longer bake the noise in.
i Invariants and contracts preserved? The helper is a pure in-place bytes-to-bytes file rewrite, like its neighbour replace_in_file. It never decodes, so non-UTF-8 stdout survives; it returns early when the literal is absent; it writes once, after both substitutions. No lock and no concurrency contract is involved: stdout_file is per-test-case and the same tail already rewrites it 18 times unguarded.

Session id: cron:clickhouse-impl-slot-42:20260806-021200

@groeneai

groeneai commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator Author

cc @fm4v @leshikus, could you review this? clickhouse-test already strips LLVM Profile Error: messages from a test's stderr, but a test that does its own 2>&1 merges the client's stderr into its stdout before the harness sees either stream, so the noise lands in the file that gets diffed against .reference and 13 tests on the nightly per-test-coverage job are reported as output mismatches while their real output is correct. It strips the matched message span rather than the whole line, because the message can arrive glued onto real output.

@Algunenano Algunenano added the can be tested Allows running workflows for external contributors label Aug 6, 2026
@clickhouse-gh

clickhouse-gh Bot commented Aug 6, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [fab1e8a]

Summary: ❌

job_name test_name status info comment
Stress test (arm_tsan) FAIL
Logical error: Not-ready Set is passed as the second argument for function 'A (STID: 0250-41a5) FAIL cidb, issue

AI Review

Summary

This PR extends clickhouse-test so it scrubs the observed LLVM Profile Error: spans from stdout_file, not only from stderr, to stop nightly coverage runs from failing result differs with reference on profiler noise alone. The prefix-pair problems raised earlier are fixed on the current head, but the remaining implementation still rewrites ordinary test stdout on every run, so I do not think it is ready to merge as-is.

Findings

⚠️ Majors

  • [tests/clickhouse-test:3901] run_single_test now rewrites every test's stdout even though the noise this helper targets exists only when the client binary is coverage-instrumented. The scrubber matches on bytes alone, so a test that legitimately prints LLVM Profile Error: Failed to write file "x": Invalid argument loses that line even on a normal run; on the current head, prefix\nLLVM Profile Error: Failed to write file "x": Invalid argument\nsuffix\n becomes prefix\nsuffix\n. That breaks the runner's byte-for-byte contract for ordinary stateless jobs and can turn a real diff into a false pass. Suggested fix: gate strip_llvm_profile_errors_in_file(self.stdout_file) on actual coverage instrumentation (BuildFlags.WITH_COVERAGE, BuildFlags.WITH_COVERAGE_DEPTH, or an equivalent coverage_active check) so non-coverage runs keep stdout untouched.
Tests
  • ⚠️ The PR no longer has any deterministic in-tree coverage for this path: ci/tests/test_llvm_profile_stdout_filter.py was removed in fab1e8ae, and the per_test_coverage job that motivated the change is not part of pull_request.py. The smallest evidence that would close this gap is a focused automated check of strip_llvm_profile_errors_in_file (or an equivalent artifact-replay test) so future edits to the regex and call site are exercised by PR CI.
Final Verdict

❌ Changes requested. Gate the stdout scrubber to actual coverage builds before merge; otherwise clickhouse-test can silently delete legitimate stdout from ordinary runs, and the current head has no deterministic PR-side test that would catch regressions in this normalization path.

LLVM Coverage Report

⚠️ No coverage measurement for commit fab1e8a: no coverable C/C++ source files changed (contrib/ is excluded from coverage).

@clickhouse-gh clickhouse-gh Bot added the pr-ci label Aug 6, 2026
Comment thread tests/clickhouse-test Resolved
The profiling runtime's message ends with strerror(errno) and nothing
delimits it from the test's own output, which the filter must keep. Three
strerror values are prefixes of another one -- `Interrupted system call`,
`No such device` and `Too many open files` -- so for those the noise case
and a case where the test's output merely begins with the rest of the
longer value are byte-identical. The regex sorted its alternatives
longest-first, which is not a safety property: on that ambiguous input the
longer value matched and 24 of 24 such arms lost real output. Requiring the
whole longer value to be noise is the wrong bet, because deleting output
makes a test pass incorrectly, while keeping a message leaves a diff.

Matching only the 253 prefix-free values makes the alternation an
antichain, so at most one member can match at any position and the result
no longer depends on ordering (verified: identical output under both
orderings). The three dropped values are still stripped when they own a
whole line, since the newline delimits them there.

Measured over the 182 spans this failure has produced in 90 days, in four
embedding shapes: 728 of 728 outputs byte-identical to before, and none of
those spans contains a dropped value. The prefix-pair arms are new and
data-driven from libc, so a future libc gains coverage automatically;
reverting the alternation to the full table reddens exactly those three and
nothing else.

Co-Authored-By: Claude Fable 5 <[email protected]>
@clickhouse-gh clickhouse-gh Bot added the manual approve Manual approve required to run CI label Aug 6, 2026
@groeneai groeneai added the groeneai-origin-ci-master PR origin: master/nightly CI monitoring finding label Aug 19, 2026
Comment thread tests/clickhouse-test Resolved
Where one strerror value is a prefix of another, a message ending in the
shorter value followed by the test's own output is byte-identical to a
message ending in the longer one. Matching the shorter value there strips
only part of a real profiling error and leaves the remainder glued into the
test's stdout: 'LLVM Profile Error: Failed to write file "x": No such device
or address\n200\n' came out as ' or address\n200\n', so the message was
neither removed as noise nor left whole for the diff to show.

Match a prefix-free value only when the bytes after it cannot extend it into
another strerror value. An ambiguous tail then matches nothing and reaches
the diff intact, which is the direction the pattern comment promises.

libc reports 3 such pairs among its 256 values. The 182 spans this failure
produced in CIDB over 90 days come out byte-identical to before, and a
prefix-free value followed by ordinary output is still stripped, including
one delimited by a newline from the rest of a longer value.
Comment thread tests/clickhouse-test
# A test that merges a client's stderr into its own stdout (2>&1) does so
# before the harness sees either stream, so the stderr-side filter above
# cannot reach it and the noise is diffed against .reference. See #97020.
strip_llvm_profile_errors_in_file(self.stdout_file)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

run_single_test is no longer transparent for ordinary stdout: this scrubber runs on every invocation, but the profiling noise it targets exists only on coverage-instrumented builds. With the current head, a test that legitimately prints

LLVM Profile Error: Failed to write file "x": Invalid argument

has that line deleted from stdout_file even on a normal run:

strip(b'prefix\nLLVM Profile Error: Failed to write file "x": Invalid argument\nsuffix\n')
# -> b'prefix\nsuffix\n'

Because the worker loop exports LLVM_PROFILE_FILE unconditionally, seeing this literal in stdout is not proof that it came from the profiler. That means the new call can make a test pass incorrectly by deleting real output. Please gate it on actual coverage instrumentation (WITH_COVERAGE / WITH_COVERAGE_DEPTH, or an equivalent coverage_active check) so non-coverage runs keep stdout byte-for-byte.

@fm4v

fm4v commented Aug 28, 2026

Copy link
Copy Markdown
Member

@groeneai remove ci/tests/test_llvm_profile_stdout_filter.py

Requested in review by fm4v. The filter in tests/clickhouse-test is
unchanged; only its pytest arm goes away, and nothing else in the tree
exercises strip_llvm_profile_errors_in_file now.

Co-Authored-By: Claude Opus 5 <[email protected]>
@groeneai

Copy link
Copy Markdown
Collaborator Author

Removed in fab1e8a, so the PR is now only the tests/clickhouse-test change.

One consequence for the record: nothing else in the tree exercises strip_llvm_profile_errors_in_file, and the failure it fixes is a race, so no CI job asserts the filter deterministically now.

@fm4v fm4v self-assigned this Aug 28, 2026
@fm4v
fm4v enabled auto-merge August 28, 2026 20:36
@groeneai

Copy link
Copy Markdown
Collaborator Author

CI finish ledger - fab1e8ae14b72008062c102e2a4643e3cc4fff94

CI is fully finished on this head: 170 unique check-runs, and the praktika report holds 172 nodes
as 66 OK, 103 skipped by digest, 3 FAIL. The large skip share is praktika's ordinary
digest-driven skipping for a diff that only touches tests/clickhouse-test; Config Workflow,
Style check and Finish Workflow are all success, and 0 nodes are DROPPED. The one failure
has an owner and is not caused by this PR.

Check / test Reason Owner / fixing PR
Stress test (arm_tsan) / Logical error: Not-ready Set is passed as the second argument for function 'A (STID 0250-41a5), Failures: 1/5 trunk logical error, server abort in a build with abort_on_logical_error. A speculative in-place IN-set build takes the destructive path for a source plan that cannot be cloned, and stops without creating the set and without throwing, so nothing is recorded in in_place_build_failure, FutureSetFromSubquery::build returns a null plan, every caller reads that as "nothing left to build", and FunctionIn throws at src/Functions/in.cpp:128 once the main pipeline evaluates the condition. src/Interpreters/PreparedSets.cpp:536-560 names this residual in master itself: for a non-clonable source "only the rare silent-failure case stays unrecoverable". 223 CIDB rows over 171 distinct pull requests in 30 days, 22 of them on master, first seen 2026-07-31, most recent 2026-08-29 00:44Z. This diff changes only how the test runner filters LLVM Profile Error: lines out of captured stdout, so it cannot reach that path. #102308 (external, open)

That PR is the remedy for the residual, not a same-area coincidence: it makes the subquery plan
rebuildable after a failed in-place build (QueryPlanBuilder, setQueryPlanBuilder,
createQueryPlanForRetry) and builds into a temporary Set so a partial build cannot leak.
None of those symbols exists on master today. Tracking issue: #107619.

Session id: cron:our-pr-ci-monitor:20260829-010000

@fm4v
fm4v added this pull request to the merge queue Aug 29, 2026
Merged via the queue into ClickHouse:master with commit 194df77 Aug 29, 2026
172 of 174 checks passed
@robot-ch-test-poll4 robot-ch-test-poll4 added the pr-synced-to-cloud The PR is synced to the cloud repo label Aug 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors groeneai-origin-ci-master PR origin: master/nightly CI monitoring finding manual approve Manual approve required to run CI 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.

4 participants