Skip to content

Fix LOGICAL_ERROR in geohashesInBox on mixed const arguments and BFloat16 - #107063

Merged
alexey-milovidov merged 2 commits into
ClickHouse:masterfrom
groeneai:groeneai/fix-geohashesInBox-logical-error
Jul 1, 2026
Merged

alexey-milovidov merged 2 commits into
ClickHouse:masterfrom
groeneai:groeneai/fix-geohashesInBox-logical-error

Conversation

@groeneai

@groeneai groeneai commented Jun 10, 2026 •

Copy link
Copy Markdown
Collaborator

Changelog category (leave one):

  • Bug Fix (user-visible misbehavior in an official stable release)

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

Fixed a LOGICAL_ERROR ("Unsupported argument types") in the geohashesInBox function when its coordinate arguments mixed constant and non-constant values, or when a coordinate was a BFloat16. Mixed const/non-const Float32 arguments now work, and BFloat16 arguments are rejected with a clear error.

Description

geohashesInBox aborted with LOGICAL_ERROR on two inputs found by the function fuzzer (issue #106832):

  1. Mixed constant/non-constant coordinates, e.g. geohashesInBox(CAST(0. AS Float32), materialize(CAST(0. AS Float32)), CAST(1. AS Float32), CAST(1. AS Float32), 1). The Float32/Float64 dispatch inspected the runtime column class, but a constant coordinate stays wrapped in ColumnConst in a mixed call, so Float32 data was sent to the Float64 path. Dispatch now uses the declared argument type.
  2. BFloat16 coordinates. The validator accepted any isFloat type, but only Float32/Float64 are implemented. The validator now requires isNativeFloat, matching the documented contract, so BFloat16 is rejected with ILLEGAL_TYPE_OF_ARGUMENT.

Added a stateless regression test (04327_geohashesInBox_const_mix_and_bfloat16).

Version info

  • Merged into: 26.7.1.368 (included in 26.7 and later)

@pufit pufit added the can be tested Allows running workflows for external contributors label Jun 10, 2026
@groeneai

Copy link
Copy Markdown
Collaborator Author

Pre-PR validation gate

# Question Answer
a Deterministic repro? Yes. clickhouse-local -q "SELECT geohashesInBox(CAST(0. AS Float32), materialize(CAST(0. AS Float32)), CAST(1. AS Float32), CAST(1. AS Float32), 1);" aborts (SIGABRT, exit 134) on master HEAD fc73f46fae65 every time. The BFloat16 variant SELECT geohashesInBox(CAST(0. AS BFloat16), CAST(0. AS BFloat16), CAST(1. AS BFloat16), CAST(1. AS BFloat16), 1); also aborts.
b Root cause explained? Two causes, both reaching the LOGICAL_ERROR at geohashesInBox.cpp:102. (1) executeImpl selected the Float32/Float64 specialization with checkColumn<ColumnVector<Float32>> on the raw first column. When the call mixes const and non-const coordinates, useDefaultImplementationForConstants does not collapse the constants, so a const coordinate stays wrapped in ColumnConst (not a ColumnVector<Float32>), the dispatch falls through to execute<Float64>, and the inner checkAndGetColumn<ColumnVector<Float64>> on Float32 data returns nullptr -> LOGICAL_ERROR. (2) The validator accepted isFloat, which admits BFloat16, but only Float32/Float64 have an execute instantiation, so a BFloat16 coordinate hits the same path.
c Fix matches root cause? Yes. (1) Dispatch now uses the declared argument type WhichDataType(arguments[0].type).isFloat32(), which is correct regardless of const wrapping. (2) The validator now requires isNativeFloat (Float32 or Float64), matching the documented contract, so BFloat16 is rejected at analysis time with ILLEGAL_TYPE_OF_ARGUMENT. No symptom-guarding; the dispatch and the type contract are fixed at their source.
d Test intent preserved / new tests added? New stateless test 04327_geohashesInBox_const_mix_and_bfloat16 added. It covers the const/non-const mix for Float32 and Float64, all-const and all-non-const paths, BFloat16 rejection (incl. the mixed-const BFloat16 path), and the existing same-type guard. Existing geohash tests are unchanged.
e Both directions demonstrated? Yes. Pre-fix: both reproducers SIGABRT (exit 134). Post-fix: the mixed-const cases return ["s"], BFloat16 returns ILLEGAL_TYPE_OF_ARGUMENT (Code 43). The new test passes 30/30 with --no-random-settings and via clickhouse-test with default randomization (the only failures in randomized runs were an unrelated local-env Invalid time zone: zoneinfo/UTC, which also breaks a bare SELECT now() on this minimal server and does not occur in CI).
f Fix is general, not a narrow patch? Yes. The runtime-class dispatch anti-pattern was grepped across src/Functions/ and only geohashesInBox.cpp used it for this Float32/Float64 selection. Both manifestations (const mix and BFloat16) of the same LOGICAL_ERROR are covered, not just the single fuzzer query. The fix targets the dispatch and the validated type set, not the crash site.

Session id: cron:clickhouse-worker-slot-6:20260610-192200

@clickhouse-gh

clickhouse-gh Bot commented Jun 10, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [82d5a5b]

Summary: ✅


AI Review

Summary

This PR fixes geohashesInBox by validating coordinates as Float32 or Float64 and dispatching on the declared argument type instead of the runtime column class, so mixed const/non-const Float32 calls no longer reach the wrong specialization and BFloat16 is rejected during analysis. I found no current correctness, safety, or test-coverage issues in the changed code.

Final Verdict

✅ Approved. No new inline findings.

@clickhouse-gh clickhouse-gh Bot added the pr-bugfix Pull request with bugfix, not backported by default label Jun 10, 2026
@groeneai

Copy link
Copy Markdown
Collaborator Author

cc @nikitamikhaylov @scanhex12 could you review? Fixes the geohashesInBox LOGICAL_ERROR from issue #106832: the Float32/Float64 dispatch looked at the runtime column class, so a constant coordinate in a mixed const/non-const call (wrapped in ColumnConst) took the wrong specialization; the validator also accepted BFloat16 which has no implementation. Dispatch now uses the declared type, and the validator requires isNativeFloat.

@groeneai

Copy link
Copy Markdown
Collaborator Author

CI fully finished (Finish Workflow passed). Failures, both pre-existing chronic classes, none PR-caused (this PR fixes geohashesInBox LOGICAL_ERROR on mixed const args):

  • Stateless tests (arm_asan_ubsan, azure, sequential) -- azure-infra-outage / db-disk "Server died" chronic class.
  • Stress test (arm_release) -- generic stress instability (deadlock/hung/fault harness markers).
    No Fast/Bugfix/Style failure.

@nikitamikhaylov

Copy link
Copy Markdown
Member

@groeneai CI has found a HUGE problem in Stateless tests (arm_asan_ubsan, azure, sequential)

Stack trace:
==2093==ERROR: AddressSanitizer: heap-use-after-free on address 0xfb5ad1bba840 at pc 0xaabd1f6cdce8 bp 0xfb5a3ff5dfe0 sp 0xfb5a3ff5d7d0
READ of size 65536 at 0xfb5ad1bba840 thread T698 (MergeMutate)
AddressSanitizer: CHECK failed: sanitizer_allocator_secondary.h:199 "((nearest_chunk)) >= ((h->map_beg))" (0xfb5ad1bb9000, 0xcc6e96b9cc6e96b9) (tid=2247)
#0 0xaabd1f6cdce4 in __asan_memcpy (/home/ubuntu/actions-runner/_work/ClickHouse/ClickHouse/ci/tmp/clickhouse+0x1c4fdce4) (BuildId: 802394ad4ee965f0bbabc8043b9b08399954d283)
#1 0xaabd2ecfde44 in DB::WriteBuffer::write(char const*, unsigned long) src/IO/WriteBuffer.cpp:55:9
#2 0xaabd3b55e390 in DB::ISerialization::serializeBinaryBulkWithMultipleStreams(DB::IColumn const&, unsigned long, unsigned long, DB::ISerialization::SerializeBinaryBulkSettings&, std::__1::shared_ptr<DB::ISerialization::SerializeBinaryBulkState>&) const src/DataTypes/Serializations/ISerialization.cpp:254:9
#3 0xaabd4a6ca1d0 in DB::MergeTreeDataPartWriterWide::writeSingleGranule(DB::NameAndTypePair const&, DB::IColumn const&, std::__1::set<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>> const&, std::__1::shared_ptr<DB::ISerialization::SerializeBinaryBulkState>&, DB::ISerialization::SerializeBinaryBulkSettings&, DB::Granule const&) src/Storages/MergeTree/MergeTreeDataPartWriterWide.cpp:489:20
#4 0xaabd4a6c7b94 in DB::MergeTreeDataPartWriterWide::writeColumn(DB::NameAndTypePair const&, DB::IColumn const&, std::__1::set<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>&, std::__1::vector<DB::Granule, std::__1::allocator<DB::Granule>> const&) src/Storages/MergeTree/MergeTreeDataPartWriterWide.cpp:585:9
#5 0xaabd4a6c5ae8 in DB::MergeTreeDataPartWriterWide::write(DB::Block const&, DB::PODArray<unsigned long, 4096ul, Allocator<false, false>, 63ul, 64ul> const*, DB::Block*) src/Storages/MergeTree/MergeTreeDataPartWriterWide.cpp:396:13
#6 0xaabd4ab05d24 in DB::MergedBlockOutputStream::writeImpl(DB::Block const&, DB::PODArray<unsigned long, 4096ul, Allocator<false, false>, 63ul, 64ul> const*, DB::Block*) src/Storages/MergeTree/MergedBlockOutputStream.cpp:455:13
#7 0xaabd4a3d6334 in DB::MergeTask::ExecuteAndFinalizeHorizontalPart::executeImpl() const src/Storages/MergeTree/MergeTask.cpp:1507:64
#8 0xaabd4a3d0ac8 in DB::MergeTask::ExecuteAndFinalizeHorizontalPart::execute() src/Storages/MergeTree/MergeTask.cpp:1116:16
#9 0xaabd4a3e60c8 in DB::MergeTask::execute() src/Storages/MergeTree/MergeTask.cpp:2376:24
#10 0xaabd4a3a99ec in DB::MergePlainMergeTreeTask::executeStep() src/Storages/MergeTree/MergePlainMergeTreeTask.cpp:64:33
#11 0xaabd4a46ff34 in DB::TaskRuntimeData::executeStep() const src/Storages/MergeTree/MergeTreeBackgroundExecutor.h:74:22
#12 0xaabd4a4787a0 in DB::MergeTreeBackgroundExecutor<DB::DynamicRuntimeQueue>::routine(std::__1::shared_ptr<DB::TaskRuntimeData>) src/Storages/MergeTree/MergeTreeBackgroundExecutor.cpp:369:36
#13 0xaabd4a47b658 in DB::MergeTreeBackgroundExecutor<DB::DynamicRuntimeQueue>::threadFunction() src/Storages/MergeTree/MergeTreeBackgroundExecutor.cpp:432:13
#14 0xaabd2ed886fc in std::__1::__function::__policy_func<void ()>::operator()[abi:fqe220101]() const contrib/llvm-project/libcxx/include/__functional/function.h:502:12
#15 0xaabd2ed886fc in std::__1::function<void ()>::operator()() const contrib/llvm-project/libcxx/include/__functional/function.h:754:10
#16 0xaabd2ed886fc in ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool::worker() src/Common/ThreadPool.cpp:802:17
#17 0xaabd2ed82adc in std::__1::__function::__policy_func<void ()>::operator()[abi:fqe220101]() const contrib/llvm-project/libcxx/include/__functional/function.h:502:12
#18 0xaabd2ed82adc in std::__1::function<void ()>::operator()() const contrib/llvm-project/libcxx/include/__functional/function.h:754:10
#19 0xaabd2ed82adc in startThreadFromGlobalPool(std::__1::shared_ptr<ThreadFromGlobalPoolState>, std::__1::function<void ()>, unsigned long, unsigned long, bool, bool)::$_0::operator()() src/Common/ThreadPool.cpp:961:13
#20 0xaabd2ed82adc in std::__1::__invoke_result_impl<void, startThreadFromGlobalPool(std::__1::shared_ptr<ThreadFromGlobalPoolState>, std::__1::function<void ()>, unsigned long, unsigned long, bool, bool)::$_0&>::type std::__1::__invoke[abi:fqe220101]<startThreadFromGlobalPool(std::__1::shared_ptr<ThreadFromGlobalPoolState>, std::__1::function<void ()>, unsigned long, unsigned long, bool, bool)::$_0&>(startThreadFromGlobalPool(std::__1::shared_ptr<ThreadFromGlobalPoolState>, std::__1::function<void ()>, unsigned long, unsigned long, bool, bool)::$_0&) contrib/llvm-project/libcxx/include/__type_traits/invoke.h:90:27
#21 0xaabd2ed82adc in void std::__1::__invoke_void_return_wrapper<void, true>::__call[abi:fqe220101]<startThreadFromGlobalPool(std::__1::shared_ptr<ThreadFromGlobalPoolState>, std::__1::function<void ()>, unsigned long, unsigned long, bool, bool)::$_0&>(startThreadFromGlobalPool(std::__1::shared_ptr<ThreadFromGlobalPoolState>, std::__1::function<void ()>, unsigned long, unsigned long, bool, bool)::$_0&) contrib/llvm-project/libcxx/include/__type_traits/invoke.h:350:5
#22 0xaabd2ed82adc in void std::__1::__invoke_r[abi:fqe220101]<void, startThreadFromGlobalPool(std::__1::shared_ptr<ThreadFromGlobalPoolState>, std::__1::function<void ()>, unsigned long, unsigned long, bool, bool)::$_0&>(startThreadFromGlobalPool(std::__1::shared_ptr<ThreadFromGlobalPoolState>, std::__1::function<void ()>, unsigned long, unsigned long, bool, bool)::$_0&) contrib/llvm-project/libcxx/include/__type_traits/invoke.h:356:10
#23 0xaabd2ed82adc in void std::__1::__function::__policy_func<void ()>::__call_func[abi:fqe220101]<startThreadFromGlobalPool(std::__1::shared_ptr<ThreadFromGlobalPoolState>, std::__1::function<void ()>, unsigned long, unsigned long, bool, bool)::$_0>(std::__1::__function::__policy_storage const*) contrib/llvm-project/libcxx/include/__functional/function.h:443:12
#24 0xaabd2ed83d7c in std::__1::__function::__policy_func<void ()>::operator()[abi:fqe220101]() const contrib/llvm-project/libcxx/include/__functional/function.h:502:12
#25 0xaabd2ed83d7c in std::__1::function<void ()>::operator()() const contrib/llvm-project/libcxx/include/__functional/function.h:754:10
#26 0xaabd2ed83d7c in ThreadPoolImpl<std::__1::thread>::ThreadFromThreadPool::worker() src/Common/ThreadPool.cpp:812:17
#27 0xaabd2ed917a0 in std::__1::__invoke_result_impl<void, void (ThreadPoolImpl<std::__1::thread>::ThreadFromThreadPool::*)(), ThreadPoolImpl<std::__1::thread>::ThreadFromThreadPool*>::type std::__1::__invoke[abi:fqe220101]<void (ThreadPoolImpl<std::__1::thread>::ThreadFromThreadPool::*)(), ThreadPoolImpl<std::__1::thread>::ThreadFromThreadPool*>(void (ThreadPoolImpl<std::__1::thread>::ThreadFromThreadPool::*&&)(), ThreadPoolImpl<std::__1::thread>::ThreadFromThreadPool*&&) contrib/llvm-project/libcxx/include/__type_traits/invoke.h
#28 0xaabd2ed917a0 in void std::__1::__thread_execute[abi:fqe220101]<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (ThreadPoolImpl<std::__1::thread>::ThreadFromThreadPool::*)(), ThreadPoolImpl<std::__1::thread>::ThreadFromThreadPool*, 0ul, 1ul>(std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (ThreadPoolImpl<std::__1::thread>::ThreadFromThreadPool::*)(), ThreadPoolImpl<std::__1::thread>::ThreadFromThreadPool*>&, std::__1::__integer_sequence<unsigned long, 0ul, 1ul>) contrib/llvm-project/libcxx/include/__thread/thread.h:161:3
#29 0xaabd2ed917a0 in void* std::__1::__thread_proxy[abi:fqe220101]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (ThreadPoolImpl<std::__1::thread>::ThreadFromThreadPool::*)(), ThreadPoolImpl<std::__1::thread>::ThreadFromThreadPool*>>(void*) contrib/llvm-project/libcxx/include/__thread/thread.h:169:3
#30 0xaabd1f6cc6c4 in asan_thread_start(void*) asan_interceptors.cpp
#31 0xff5f41280394 in start_thread nptl/pthread_create.c:442:8
#32 0xff5f412e9e98  misc/../sysdeps/unix/sysv/linux/aarch64/clone.S:79

NEVER, listen NEVER miss it again. Always investigate failurs, there is NO such thing as infra outage. Write this down to your memory.

@groeneai

Copy link
Copy Markdown
Collaborator Author

@nikitamikhaylov You're right, and my earlier comment calling this "azure-infra-outage" was wrong. This is a genuine heap-use-after-free, not infra. The secondary AddressSanitizer: CHECK failed: sanitizer_allocator_secondary.h:199 line is fallout from the heap corruption the UAF already caused, it is not proof of host-OOM. Recorded the correction so it does not happen again.

It is not caused by this PR. This PR touches only src/Functions/geohashesInBox.cpp plus one stateless test; the crash is on a background MergeMutate thread in src/Storages/MergeTree (wide-part merge writer), which nothing in this PR reaches. Evidence it is a trunk bug:

  • Same fingerprint (STID 2046-50c3) fired the same day (2026-06-10) on an unrelated PR Fix BAD_GET on ALTER for tables created with inline disk SETTINGS #103818 ("Fix BAD_GET on ALTER for inline disk SETTINGS") on a different sanitizer job. Two unrelated PRs, identical stack = trunk.
  • It is the wide-writer sibling of a chronic compact-writer family that has recurred on master: STID 2046-4f7a (2026-05-15), 3866-4140 (2026-05-22), 1760-433a (2026-06-09), 1367-379f (2026-06-10), all on *_asan_ubsan, ... sequential, all on the MergeMutate thread in the compact/wide merge-read path.

Root cause (source-grounded): during a horizontal merge the column buffer is freed by result_column->assumeMutableRef().shrinkToFit() at MergeTreeSequentialSource.cpp:265 (the realloc frees the old allocation) while the writer's deferred chunked serialization still holds a pointer into it (MergeTreeDataPartWriterWide::writeSingleGranule -> serializeBinaryBulkWithMultipleStreams -> WriteBuffer::write, the 64KB Float64 granule, hence READ of size 65536). assumeMutableRef() does not check use_count, so when the column is shared (use_count > 1) the shrinkToFit realloc invalidates the pointer the writer is reading. This free site is still unguarded on current master.

Status: no fix PR exists upstream or from us. PR #100185 ("Add assertions in IColumn::mutate to verify deep unique ownership of sub-columns") adds a use_count()==1 guard at exactly this line, but it is still open and is assertion-hardening, not a fix. We track this consolidated compact/wide merge-read UAF family. It is genuinely rare (about 5 master hits in 30 days across millions of merges; a max-effort local ASAN + thread-fuzzer stress run did not reproduce it), so per the no-speculative-patch-without-a-repro rule we have not posted a blind fix. We will keep working the repro.

This PR (geohashesInBox LOGICAL_ERROR fix) is unrelated and unaffected.

@alexey-milovidov

Copy link
Copy Markdown
Member

The fix is correct.

The dispatch bug is real: executeImpl chose the Float32/Float64 specialization from the runtime column class via checkColumn<ColumnVector<Float32>>, but a constant coordinate in a mixed const/non-const call stays wrapped in ColumnConst (constant folding does not apply when not all arguments are constant), so Float32 data was routed to the execute<Float64> branch and the inner checkAndGetColumn<ColumnVector<Float64>> returned nullptr → LOGICAL_ERROR. Dispatching on the declared argument type (WhichDataType(arguments[0].type).isFloat32()) is the correct, constness-agnostic fix. Tightening the validator from isFloat to isNativeFloat is also right: isFloat admits BFloat16, which has no execute instantiation, so BFloat16 should be rejected at analysis time with ILLEGAL_TYPE_OF_ARGUMENT rather than reaching the same logical error.

The two red checks are pre-existing trunk flakiness, not caused by this PR (which touches only src/Functions/geohashesInBox.cpp and one stateless test):

  • Stateless tests (arm_asan_ubsan, azure, sequential) — AddressSanitizer: heap-use-after-free (STID: 2046-50c3) on a background MergeMutate wide-part merge-writer thread (MergeTreeDataPartWriterWide::writeSingleGranule → serializeBinaryBulkWithMultipleStreams → WriteBuffer::write), which nothing in this PR reaches. The identical fingerprint fired on master (pull_request_number = 0) on 2026-06-14 and on the unrelated PR Fix BAD_GET on ALTER for tables created with inline disk SETTINGS #103818 on 2026-06-10. Since it reproduces on master without this change, it cannot be caused by this PR. It belongs to the chronic compact/wide merge-writer UAF family (e.g. STID 2046-4f7a on master 2026-05-15).
  • Stress test (arm_release) — "Hung check failed, possible deadlock found", the generic stress-test hung-check flakiness, unrelated to this function.

So this is good to merge once CI is re-run to clear the flaky checks.

…at16

geohashesInBox(Float32) crashed with "Unsupported argument types"
LOGICAL_ERROR for two reasons:

1. executeImpl chose the Float32 vs Float64 specialization by inspecting
   the runtime class of the first column with checkColumn<ColumnVector<...>>.
   When the call mixes constant and non-constant coordinates (so the default
   constant folding does not collapse the constants), a constant coordinate
   stays wrapped in ColumnConst, which is not a ColumnVector<Float32>. The
   dispatch then picked the Float64 path for Float32 data and failed the
   inner checkAndGetColumn. Dispatch now uses the declared argument type,
   which is correct regardless of constness.

2. The argument validator accepted isFloat, which also admits BFloat16, but
   only Float32 and Float64 have an execute specialization, so a BFloat16
   coordinate hit the same LOGICAL_ERROR. The validator now requires
   isNativeFloat (Float32 or Float64), matching the documented contract, so
   BFloat16 is rejected with ILLEGAL_TYPE_OF_ARGUMENT instead of crashing.

Reproducer:
  SELECT geohashesInBox(CAST(0. AS Float32), materialize(CAST(0. AS Float32)),
                        CAST(1. AS Float32), CAST(1. AS Float32), 1);

Closes: ClickHouse#106832

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@groeneai
groeneai force-pushed the groeneai/fix-geohashesInBox-logical-error branch from ec25165 to 526308e Compare June 17, 2026 03:47
@groeneai

Copy link
Copy Markdown
Collaborator Author

Thanks for confirming. Re-triggered CI (force-pushed an identical-tree commit, no content change) to clear the two red checks, which match your read:

  • Stateless tests (arm_asan_ubsan, azure, sequential) heap-use-after-free is the chronic merge-writer UAF family (STID 2046-4f7a / 2046-50c3), background MergeMutate thread, unrelated to this PR. Still live on master: last master hit 2026-06-14 on Stateless tests (amd_asan_ubsan, db disk, distributed plan, sequential). Tracked separately.
  • Stress test (arm_release) was a generic "Hung check failed".

Both should clear on the re-run.

@groeneai

Copy link
Copy Markdown
Collaborator Author

CI re-ran on 526308e and fully finished (Finish Workflow passed). The two red checks flagged in the approval both cleared on this run:

  • Stateless tests (arm_asan_ubsan, azure, sequential) heap-use-after-free (STID 2046-50c3) did not recur.
  • Stress test (arm_release) "Hung check failed" did not recur.

One unrelated red remains: BuzzHouse (amd_debug) errored with FileNotFoundError ... status.tsv at ast_fuzzer_job.py:240. That is the chronic fuzzer-runner harness flake (the runner aborts before writing status.tsv; 3 of the 4 BuzzHouse builds passed on this identical SHA), not a fuzzer finding and not caused by this PR. It is tracked separately with a runner-diagnostics fix in #107676.

So the fix is clean and the only remaining red is a known harness flake.

@PedroTadim

Copy link
Copy Markdown
Member

@groeneai merge with master

@groeneai

groeneai commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator Author

@PedroTadim merged current master into the branch (merge commit 82d5a5b, master 6cad378). Conflict-free: the merge touches nothing in our diff, which stays exactly the 3 files (src/Functions/geohashesInBox.cpp + the one stateless test, +31/-5). CI is re-running on the fresh base.

@clickhouse-gh

clickhouse-gh Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 85.40% 85.50% +0.10%
Functions 92.60% 92.60% +0.00%
Branches 77.60% 77.70% +0.10%

Changed lines: Changed C/C++ lines covered: 12/12 (100.00%) · Uncovered code

Full report · Diff report

@groeneai

groeneai commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator Author

CI finish ledger — 82d5a5b

CI fully finished on the fresh master-merge head (Finish Workflow = success; all builds, functional, integration, stress, AST fuzzer, BuzzHouse, unit tests green). The two reds from earlier runs (the chronic arm_asan_ubsan azure sequential merge-writer HUAF and Stress test (arm_release) hung check) did NOT recur. No PR-caused failure.

Check / test Reason Owner
(no failing tests) CI green on this head n/a
CH Inc sync private sync CH Inc sync (private, not actionable)

Session id: cron:our-pr-ci-monitor:20260701-150000

@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Jul 1, 2026
Merged via the queue into ClickHouse:master with commit 9eccc9a Jul 1, 2026
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 Jul 1, 2026
@clickgapai

Copy link
Copy Markdown
Contributor

Hi — this looks like a backport candidate for 26.1, 26.2, 26.3, 26.4, 26.5. I ran this PR's own regression test against each branch's binary and the bug reproduces there (the fix isn't present yet).

@groeneai

groeneai commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks for the cross-branch verification. Confirming the affected releases are 26.1, 26.2, 26.3, 26.4, 26.5.

As an external fork contributor I do not open manual backport PRs. Backports to release branches are driven by the pr-must-backport label on this master PR, which a maintainer applies. Flagging here so a maintainer can decide whether to label it for backport.

zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
…shesInBox-logical-error

Fix LOGICAL_ERROR in geohashesInBox on mixed const arguments and BFloat16
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 pr-bugfix Pull request with bugfix, not backported by default 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.

8 participants