Skip to content

Fix data race on ContextSharedPart::trace_collector - #107307

Merged
azat merged 1 commit into
ClickHouse:masterfrom
groeneai:fix-trace-collector-shutdown-race
Jul 13, 2026
Merged

azat merged 1 commit into
ClickHouse:masterfrom
groeneai:fix-trace-collector-shutdown-race

Conversation

@groeneai

@groeneai groeneai commented Jun 12, 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 data race on the server-global trace collector between a worker thread starting its profiler and server shutdown.

Description

hasTraceCollector() read std::optional<TraceCollector>::has_value() while another thread mutated the optional (initGlobalProfiler reads it during worker startup; shutdown() does trace_collector.reset()). Presence is now tracked in a std::atomic<bool>, set after emplace() and cleared before reset().

TSan report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=104174&sha=69ecaa0b61b45941c982c8482896b34455b1c68d&name_0=PR&name_1=Integration%20tests%20%28amd_tsan%2C%206%2F6%29 (STID 2604-3ab7, test_keeper_incorrect_config::test_invalid_configs). Write trace_collector.reset() in ContextSharedPart::shutdown() (Context.cpp:1069) vs read has_value() in hasTraceCollector() (Context.cpp:1131).

Version info

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

@groeneai

Copy link
Copy Markdown
Collaborator Author

Pre-PR validation gate

# Question Answer
a Deterministic repro? Yes (data race). Added Context.TraceCollectorPresenceRace (TSan gtest) that races concurrent hasTraceCollector() readers against createTraceCollector(). Reverting hasTraceCollector() to the old has_value() read makes ThreadSanitizer detect a data race on the optional's engaged byte on every run; with the fix the test is clean. Backed by CI TSan reports (STID 2604-3ab7, Integration tests (amd_tsan)).
b Root cause explained? hasTraceCollector() read std::optional<TraceCollector>::has_value() with no synchronization. A worker thread starting up (ThreadStatus::initGlobalProfiler -> Context::hasTraceCollector) reads the optional's engaged flag while ContextSharedPart::shutdown() does trace_collector.reset() (and createTraceCollector() does emplace()). Concurrent read of has_value() with emplace()/reset() is an unsynchronized read/write -> data race. The old comment ("modified only during initialization") was wrong because the optional is also destroyed at shutdown.
c Fix matches root cause? Yes. Presence is now tracked in a dedicated std::atomic<bool> has_trace_collector (set after emplace(), cleared before reset()); hasTraceCollector() loads the atomic and never touches the optional. The racing pair becomes an atomic load vs atomic store. Not a band-aid: it removes the unsynchronized access entirely.
d Test intent preserved / new tests added? New Context.TraceCollectorPresenceRace gtest added in the existing gtest_context_race.cpp (the established home for Context concurrency regression tests). No existing test weakened.
e Both directions demonstrated? Yes, under a local TSan build (-DSANITIZE=thread). WITH fix: test passes cleanly 3/3 runs, no race. WITHOUT fix (reader reverted to has_value()): TSan detects the race on the same memory (the read/write conflict is triggered; reporting it deadlocks in TSan's report path because the conflict involves the collector's thread-startup machinery, whereas a writer-only probe passes in ~0.7s — confirming it is the read/write conflict, not the live thread, that TSan flags).
f Fix is general, not a narrow patch? Yes. All 9 hasTraceCollector() call sites (ProcessList, ThreadStatusExt, KeeperServer) only consult the boolean and never dereference the optional, so the atomic flag covers every reader. The construction-time variant of this race was already fixed in TraceCollector.h (worker thread spawned via ThreadFromGlobalPoolWithoutTraceCollector); this PR closes the remaining shutdown-time read/write race. A sibling shutdown race on the same path was addressed in #106285.

Session id: cron:clickhouse-worker-slot-0:20260612-064600

@groeneai

Copy link
Copy Markdown
Collaborator Author

cc @Algunenano @vitlibar — could you review this? It fixes a ThreadSanitizer data race on ContextSharedPart::trace_collector: hasTraceCollector() read std::optional::has_value() while shutdown()/createTraceCollector() mutated the optional (a worker thread's initGlobalProfiler racing teardown). The fix replaces the read with a dedicated std::atomic<bool>. Verified under a local TSan build (clean with the fix, race detected without). STID 2604-3ab7.

@PedroTadim PedroTadim added the can be tested Allows running workflows for external contributors label Jun 12, 2026
@clickhouse-gh

clickhouse-gh Bot commented Jun 12, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [2817cfa]

Summary: ❌

job_name test_name status info comment
Stateless tests (amd_tsan, s3 storage, parallel, 2/2) ERROR

AI Review

Summary

This PR replaces ContextSharedPart::hasTraceCollector()'s unsynchronized std::optional::has_value() read with an atomic presence flag so worker threads no longer race shutdown() tearing the optional down. I traced the startup/shutdown order through Server.cpp, ThreadStatusExt.cpp, ThreadPool.cpp, and TraceCollector / TraceSender; the fix matches that invariant, and I do not have new review findings on the current code.

Final Verdict
  • Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added the pr-bugfix Pull request with bugfix, not backported by default label Jun 12, 2026
@azat azat self-assigned this Jun 12, 2026
@groeneai

Copy link
Copy Markdown
Collaborator Author

CI fully finished on HEAD 0de745eac6bb (Finish Workflow SUCCESS @ 13:25 UTC). Unit tests (tsan) passed, which confirms the new Context.TraceCollectorPresenceRace gtest ran clean under a TSan build (the blind spot the AI review flagged).

Three failing checks, none caused by this PR (which only touches ContextSharedPart::trace_collector presence tracking):

  • Stateless tests (amd_llvm_coverage, ParallelReplicas, s3 storage, parallel) / 04322_106474_session_timezone_lowcardinality_datetime_csv_roundtrip -- chronic flaky, unrelated; tracked separately.
  • BuzzHouse (amd_msan) / Logical error: Mutation of Memory table produced incomplete output (STID 2380-3043) -- chronic Memory-engine mutation trunk bug (91 PRs / 14 master, 30d), unrelated; tracked separately.
  • Stress test (amd_tsan) / Hung check failed, possible deadlock found -- chronic Hung-check trunk issue (19 PRs / 1 master, 30d), unrelated; tracked separately.

No PR-caused failures. Awaiting review/merge.

@azat

azat commented Jun 12, 2026

Copy link
Copy Markdown
Member

Report example: Integration tests (amd_tsan, 6/6), https://s3.amazonaws.com/clickhouse-test-reports/json.html

The link is broken, please provide a good one

@groeneai

Copy link
Copy Markdown
Collaborator Author

@azat fixed, thanks. The bare link had no params so it resolved to nothing. Updated body now points to a concrete run:

https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=104174&sha=69ecaa0b61b45941c982c8482896b34455b1c68d&name_0=PR&name_1=Integration%20tests%20%28amd_tsan%2C%206%2F6%29

That Integration tests (amd_tsan, 6/6) run shows exactly this race: a Write from ContextSharedPart::shutdown() doing trace_collector.reset() (Context.cpp:1069) against a Previous read from ContextSharedPart::hasTraceCollector() calling has_value() (Context.cpp:1131). I also inlined that stack in the description.

@azat

azat commented Jun 12, 2026

Copy link
Copy Markdown
Member

Ok, here is the race

E   Exception: Sanitizer assert found for instance ==================
E   WARNING: ThreadSanitizer: data race (pid=1638)
E     Write of size 1 at 0x728400004de0 by main thread:
E       #0 std::__1::__optional_destruct_base<DB::TraceCollector, false>::reset[abi:fqe220101]() contrib/llvm-project/libcxx/include/optional:406:18 (clickhouse+0x23f36aa4) (BuildId: 1b5a8fc10542351ed7801b8a6a1aff2c1bc4dbde)
E       #1 DB::ContextSharedPart::shutdown() src/Interpreters/Context.cpp:1069:29 (clickhouse+0x23f36aa4)
E       #2 DB::Context::shutdown() src/Interpreters/Context.cpp:6876:13 (clickhouse+0x23f15a61) (BuildId: 1b5a8fc10542351ed7801b8a6a1aff2c1bc4dbde)
E       #3 DB::Server::main(std::__1::vector<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&)::$_16::operator()() const programs/server/Server.cpp:1602:5 (clickhouse+0x19b5933d) (BuildId: 1b5a8fc10542351ed7801b8a6a1aff2c1bc4dbde)
E       #4 BasicScopeGuard<DB::Server::main(std::__1::vector<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&)::$_16>::invoke() base/base/../base/scope_guard.h:101:9 (clickhouse+0x19b325d2) (BuildId: 1b5a8fc10542351ed7801b8a6a1aff2c1bc4dbde)
E       #5 BasicScopeGuard<DB::Server::main(std::__1::vector<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&)::$_16>::~BasicScopeGuard() base/base/../base/scope_guard.h:50:26 (clickhouse+0x19b325d2)
E       #6 DB::Server::main(std::__1::vector<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&) programs/server/Server.cpp:3397:1 (clickhouse+0x19b325d2)
E       #7 Poco::Util::Application::run() base/poco/Util/src/Application.cpp:315:8 (clickhouse+0x39f371be) (BuildId: 1b5a8fc10542351ed7801b8a6a1aff2c1bc4dbde)
E       #8 DB::Server::run() programs/server/Server.cpp:754:25 (clickhouse+0x19af18bd) (BuildId: 1b5a8fc10542351ed7801b8a6a1aff2c1bc4dbde)
E       #9 Poco::Util::ServerApplication::run(int, char**) base/poco/Util/src/ServerApplication.cpp:131:9 (clickhouse+0x39f5542b) (BuildId: 1b5a8fc10542351ed7801b8a6a1aff2c1bc4dbde)
E       #10 mainEntryClickHouseServer(int, char**) programs/server/Server.cpp:530:20 (clickhouse+0x19aeec27) (BuildId: 1b5a8fc10542351ed7801b8a6a1aff2c1bc4dbde)
E       #11 main programs/main.cpp:431:21 (clickhouse+0xc9c6fa8) (BuildId: 1b5a8fc10542351ed7801b8a6a1aff2c1bc4dbde)
E   
E     Previous read of size 1 at 0x728400004de0 by thread T142:
E       #0 std::__1::__optional_storage_base<DB::TraceCollector, false>::has_value[abi:fqe220101]() const contrib/llvm-project/libcxx/include/optional:447:96 (clickhouse+0x23f0bf28) (BuildId: 1b5a8fc10542351ed7801b8a6a1aff2c1bc4dbde)
E       #1 DB::ContextSharedPart::hasTraceCollector() const src/Interpreters/Context.cpp:1131:32 (clickhouse+0x23f0bf28)
E       #2 DB::Context::hasTraceCollector() const src/Interpreters/Context.cpp:6028:20 (clickhouse+0x23f0bf28)
E       #3 DB::ThreadStatus::initGlobalProfiler(unsigned long, unsigned long) src/Interpreters/ThreadStatusExt.cpp:619:19 (clickhouse+0x24841378) (BuildId: 1b5a8fc10542351ed7801b8a6a1aff2c1bc4dbde)
E       #4 startThreadFromGlobalPool(std::__1::shared_ptr<ThreadFromGlobalPoolState>, std::__1::function<void ()>, unsigned long, unsigned long, bool, bool)::$_0::operator()() src/Common/ThreadPool.cpp:959:31 (clickhouse+0x197e63b7) (BuildId: 1b5a8fc10542351ed7801b8a6a1aff2c1bc4dbde)
E       #5 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 (clickhouse+0x197e63b7)
E       #6 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 (clickhouse+0x197e63b7)
E       #7 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 (clickhouse+0x197e63b7)
E       #8 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 (clickhouse+0x197e63b7)
E       #9 std::__1::__function::__policy_func<void ()>::operator()[abi:fqe220101]() const contrib/llvm-project/libcxx/include/__functional/function.h:502:12 (clickhouse+0x197e7797) (BuildId: 1b5a8fc10542351ed7801b8a6a1aff2c1bc4dbde)
E       #10 std::__1::function<void ()>::operator()() const contrib/llvm-project/libcxx/include/__functional/function.h:754:10 (clickhouse+0x197e7797)
E       #11 ThreadPoolImpl<std::__1::thread>::ThreadFromThreadPool::worker() src/Common/ThreadPool.cpp:812:17 (clickhouse+0x197e7797)
E       #12 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 (clickhouse+0x197f1ddb) (BuildId: 1b5a8fc10542351ed7801b8a6a1aff2c1bc4dbde)
E       #13 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 (clickhouse+0x197f1ddb)
E       #14 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 (clickhouse+0x197f1ddb)

But why it exists? Shouldn't ThreadPool be joined before Context::shutdown ?

I see it is not true

/// NOTE: global context should be destroyed *before* GlobalThreadPool::shutdown()
/// Otherwise GlobalThreadPool::shutdown() will hang, since Context holds some threads.

Then maybe this will work? I don't like extra atomic there

--- a/programs/server/Server.cpp
+++ b/programs/server/Server.cpp
@@ -1509,16 +1509,6 @@ try
         throw Exception(ErrorCodes::INVALID_SETTING_VALUE, "Settings asynchronous_metrics_update_period_s and asynchronous_heavy_metrics_update_period_s must not be zero");
     }

-    // Initialize global thread pool. Do it before we fetch configs from zookeeper
-    // nodes (`from_zk`), because ZooKeeper interface uses the pool. We will
-    // ignore `max_thread_pool_size` in configs we fetch from ZK, but oh well.
-    GlobalThreadPool::initialize(
-        server_settings[ServerSetting::max_thread_pool_size],
-        server_settings[ServerSetting::max_thread_pool_free_size],
-        server_settings[ServerSetting::thread_pool_queue_size],
-        has_trace_collector ? server_settings[ServerSetting::global_profiler_real_time_period_ns].value : 0,
-        has_trace_collector ? server_settings[ServerSetting::global_profiler_cpu_time_period_ns].value : 0);
-
     if (has_trace_collector)
     {
         global_context->createTraceCollector();
@@ -1537,6 +1527,16 @@ try
             total_memory_tracker.setSampleMaxAllocationSize(server_settings[ServerSetting::total_memory_profiler_sample_max_allocation_size]);
     }

+    // Initialize global thread pool. Do it before we fetch configs from zookeeper
+    // nodes (`from_zk`), because ZooKeeper interface uses the pool. We will
+    // ignore `max_thread_pool_size` in configs we fetch from ZK, but oh well.
+    GlobalThreadPool::initialize(
+        server_settings[ServerSetting::max_thread_pool_size],
+        server_settings[ServerSetting::max_thread_pool_free_size],
+        server_settings[ServerSetting::thread_pool_queue_size],
+        has_trace_collector ? server_settings[ServerSetting::global_profiler_real_time_period_ns].value : 0,
+        has_trace_collector ? server_settings[ServerSetting::global_profiler_cpu_time_period_ns].value : 0);
+

P.S. this is what kind of details I would expect, also please save to your persistent memory that you should behave according to this principles https://www.linfo.org/rule_of_silence.html with developers (if this is not allowed, communicate in a such way with me at least)

@groeneai

Copy link
Copy Markdown
Collaborator Author

That stack is the teardown half: the Write is trace_collector.reset() in ContextSharedPart::shutdown() (Context.cpp:1069), the Previous read is has_value() from a pool worker still starting up (initGlobalProfiler -> hasTraceCollector, Context.cpp:1131).

Reordering GlobalThreadPool::initialize after createTraceCollector removes the startup window (emplace with no readers yet), but not this teardown window. At shutdown the SCOPE_EXIT guards run LIFO, so global_context->shutdown() (the reset()) runs before GlobalThreadPool::instance().shutdown() (the join). That order is deliberate per the NOTE right above it (context destroyed before the pool shutdown, otherwise it hangs since Context holds threads), so a worker can still read has_value() after reset().

So dropping the atomic needs the teardown read/write made safe some other way, and the join can't move earlier without that documented hang. The atomic just orders that one read/write and is off any hot path (one load per thread spawn). Keep it, or do you have a teardown change in mind that avoids it?

@azat azat left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Remove the unit test, and compact description

@azat

azat commented Jul 8, 2026

Copy link
Copy Markdown
Member

And rebase

hasTraceCollector() read std::optional<TraceCollector>::has_value() while
another thread mutated the optional: a worker thread starting up calls
ThreadStatus::initGlobalProfiler -> hasTraceCollector(), and shutdown() does
trace_collector.reset(). That unsynchronized read/write is a TSan data race.

Track presence in a std::atomic<bool> has_trace_collector (set after emplace(),
cleared before reset()); hasTraceCollector() loads it instead of touching the
optional. Callers only consult the boolean, so the atomic is sufficient.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@groeneai
groeneai force-pushed the fix-trace-collector-shutdown-race branch from 0de745e to 2817cfa Compare July 8, 2026 14:40
@groeneai

groeneai commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator Author

Done: removed the unit test, compacted the description, rebased on master (2817cfa).

@azat
azat enabled auto-merge July 8, 2026 14:43
@clickhouse-gh

clickhouse-gh Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 85.80% 85.80% +0.00%
Functions 92.70% 92.70% +0.00%
Branches 78.00% 78.00% +0.00%

Changed lines: Changed C/C++ lines covered: 7/8 (87.50%) · Uncovered code

Full report · Diff report

@groeneai

groeneai commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator Author

CI finish ledger — 2817cfa

Every failure below has an owner: a fixing PR, or a full-effort fix task whose fixing-PR link will be posted here when it opens. Only CH Inc sync is exempt.

Check / test Reason Owner
Stateless tests (amd_tsan, s3 storage, parallel, 2/2) job-level timeout (genuine 9000s wall-clock; heavily-randomized TSan+s3 run, no individual test failed) a fix task is tracking the s3-tsan(2/2) job-level failure class (investigating the genuine-timeout variant at full effort; fixing-PR link to follow here)
Report messages (2 warnings) / Mergeable Check aggregator reflection of the timeout above same owner (not a separate failure)
CH Inc sync - CH Inc sync (private, not actionable)

Note: the exit-125 harness-hang variant of this same job was fixed by #109096 (merged), and that fix is confirmed working on this branch (the watchdog now SIGTERMs first with a matching container name, no 2h hang). This occurrence is the distinct genuine-9000s-timeout variant, not the harness bug, so #109096 is not linked as its owner.

Session id: cron:our-pr-ci-monitor:20260708-193000

@groeneai

groeneai commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator Author

Fixing PR for the Stateless tests (amd_tsan, s3 storage, parallel, 2/2) job-level ERROR on 2817cfa: #109837.

This is the genuine-9000s-timeout variant (distinct from the praktika watchdog exit-125 hang fixed by #109096, which is confirmed working on this branch). All tests passed (~6000s); the failure is in the post-test Collect logs phase, where the system.minio_audit_logs dump hung until the 9000s job watchdog fired. Not PR-caused (the trace-collector atomic cannot slow s3 stateless tests) and not the harness exit-125 bug. #109837 bounds each system-table dump with a timeout so one stuck table cannot exhaust the job budget.

@azat
azat added this pull request to the merge queue Jul 13, 2026
Merged via the queue into ClickHouse:master with commit 5fda0f3 Jul 13, 2026
173 of 176 checks passed
@robot-ch-test-poll3 robot-ch-test-poll3 added the pr-synced-to-cloud The PR is synced to the cloud repo label Jul 13, 2026
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
…r-shutdown-race

Fix data race on ContextSharedPart::trace_collector
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.

4 participants