Skip to content

Antalya 25.8 - Fix CrashWriter to check empty endpoint before sending crash report#1508

Merged
zvonand merged 1 commit intoantalya-25.8from
fix/crash-endpoint-check-antalya-25.8
Mar 11, 2026
Merged

Antalya 25.8 - Fix CrashWriter to check empty endpoint before sending crash report#1508
zvonand merged 1 commit intoantalya-25.8from
fix/crash-endpoint-check-antalya-25.8

Conversation

@CarlosFelipeOR
Copy link
Collaborator

This PR improves the fix for #1437 (previously fixed in #1438).

The original fix prevented the exception by not creating the CrashWriter instance when disabled, but this resulted in no logging when crashes occurred with reporting disabled.

This PR implements Option B: always create the instance and add an early return in sendError() when the endpoint is empty. This prevents the exception while providing informative logs (<Debug> CrashWriter: Not sending crash report (crash reporting is disabled)) when crashes happen with reporting disabled.

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

CI/CD Options

Exclude tests:

  • Fast test
  • Integration Tests
  • Stateless tests
  • Stateful tests
  • Performance tests
  • All with ASAN
  • All with TSAN
  • All with MSAN
  • All with UBSAN
  • All with Coverage
  • All with Aarch64
  • All Regression
  • Disable CI Cache

Regression jobs to run:

  • Fast suites (mostly <1h)
  • Aggregate Functions (2h)
  • Alter (1.5h)
  • Benchmark (30m)
  • ClickHouse Keeper (1h)
  • Iceberg (2h)
  • LDAP (1h)
  • Parquet (1.5h)
  • RBAC (1.5h)
  • SSL Server (1h)
  • S3 (2h)
  • Tiered Storage (2h)

@github-actions
Copy link

Workflow [PR], commit [72dc68f]

@CarlosFelipeOR
Copy link
Collaborator Author

QA Verification

Tested the fix by sending kill -SEGV to the server process and checking the crash logs.

Test Environment

  • Version: 25.8.16.20001.altinityantalya
  • Git Hash: d006751

Results ✅

PASSED - The fix works correctly:

  • ✅ No BAD_ARGUMENTS exception occurred (previously would show: Code: 36. DB::Exception: Empty protocol in the URL. (BAD_ARGUMENTS))
  • ✅ Expected log message appears: <Debug> CrashWriter: Not sending crash report (crash reporting is disabled)
  • ✅ No attempt to send crash report with empty endpoint

Crash Log Output

The crash was handled correctly with the informative log message:

2026.03.10 17:30:17.091982 [ 2819855 ] {} <Trace> BaseDaemon: Received signal 11
2026.03.10 17:30:17.092122 [ 2819855 ] {} <Fatal> BaseDaemon: ########## Short fault info ############
2026.03.10 17:30:17.092153 [ 2819855 ] {} <Fatal> BaseDaemon: (version 25.8.16.20001.altinityantalya, build id: 3038DF0907550E746F1D3AE5782185C910FA9621, git hash: d0067516968b65e97dde5438b400226df32be1a6, architecture: x86_64) (from thread 2819804) Received signal 11
2026.03.10 17:30:17.092162 [ 2819855 ] {} <Fatal> BaseDaemon: Signal description: Segmentation fault
2026.03.10 17:30:17.092176 [ 2819855 ] {} <Fatal> BaseDaemon: Address: 0x3e8002b0b9e. Access: read. Unknown si_code.
2026.03.10 17:30:17.092197 [ 2819855 ] {} <Fatal> BaseDaemon: Stack trace: 0x0000737097a98d72 0x0000737097a9b7ed 0x00005b2cf902bf4f 0x00005b2cec6236cb 0x00005b2ce88a7b0a 0x00005b2cf8492666 0x00005b2ce888f4b0 0x00005b2ce888ca48 0x00005b2ce1aef61f 0x0000737097a2a1ca 0x0000737097a2a28b 0x00005b2ce1aee02e
2026.03.10 17:30:17.092205 [ 2819855 ] {} <Fatal> BaseDaemon: ########################################
2026.03.10 17:30:17.092213 [ 2819855 ] {} <Fatal> BaseDaemon: (version 25.8.16.20001.altinityantalya, build id: 3038DF0907550E746F1D3AE5782185C910FA9621, git hash: d0067516968b65e97dde5438b400226df32be1a6) (from thread 2819804) (no query) Received signal Segmentation fault (11)
2026.03.10 17:30:17.092215 [ 2819855 ] {} <Fatal> BaseDaemon: Address: 0x3e8002b0b9e. Access: read. Unknown si_code.
2026.03.10 17:30:17.092218 [ 2819855 ] {} <Fatal> BaseDaemon: Stack trace: 0x0000737097a98d72 0x0000737097a9b7ed 0x00005b2cf902bf4f 0x00005b2cec6236cb 0x00005b2ce88a7b0a 0x00005b2cf8492666 0x00005b2ce888f4b0 0x00005b2ce888ca48 0x00005b2ce1aef61f 0x0000737097a2a1ca 0x0000737097a2a28b 0x00005b2ce1aee02e
2026.03.10 17:30:17.092686 [ 2819855 ] {} <Fatal> BaseDaemon: 3. __GI___futex_abstimed_wait_cancelable64 @ 0x0000000000098d72
2026.03.10 17:30:17.092705 [ 2819855 ] {} <Fatal> BaseDaemon: 4. __GI___pthread_cond_wait @ 0x000000000009b7ed
2026.03.10 17:30:17.096903 [ 2819855 ] {} <Fatal> BaseDaemon: 5.0. inlined from ./contrib/llvm-project/libcxx/include/__thread/support/pthread.h:122: std::__libcpp_condvar_wait[abi:ne190107](pthread_cond_t*, pthread_mutex_t*)
2026.03.10 17:30:17.096912 [ 2819855 ] {} <Fatal> BaseDaemon: 5. ./ci/tmp/build/./contrib/llvm-project/libcxx/src/condition_variable.cpp:30: std::condition_variable::wait(std::unique_lock<std::mutex>&) @ 0x00000000207b6f4f
2026.03.10 17:30:17.109935 [ 2819855 ] {} <Fatal> BaseDaemon: 6.0. inlined from ./contrib/llvm-project/libcxx/include/__condition_variable/condition_variable.h:147: void std::condition_variable::wait<BaseDaemon::waitForTerminationRequest()::$_0>(std::unique_lock<std::mutex>&, BaseDaemon::waitForTerminationRequest()::$_0)
2026.03.10 17:30:17.109942 [ 2819855 ] {} <Fatal> BaseDaemon: 6. ./ci/tmp/build/./src/Daemon/BaseDaemon.cpp:535: BaseDaemon::waitForTerminationRequest() @ 0x0000000013dae6cb
2026.03.10 17:30:17.130590 [ 2819855 ] {} <Fatal> BaseDaemon: 7. ./ci/tmp/build/./programs/server/Server.cpp:2878: DB::Server::main(std::vector<String, std::allocator<String>> const&) @ 0x0000000010032b0a
2026.03.10 17:30:17.134707 [ 2819855 ] {} <Fatal> BaseDaemon: 8. ./ci/tmp/build/./base/poco/Util/src/Application.cpp:315: Poco::Util::Application::run() @ 0x000000001fc1d666
2026.03.10 17:30:17.164842 [ 2819855 ] {} <Fatal> BaseDaemon: 9. ./ci/tmp/build/./programs/server/Server.cpp:637: DB::Server::run() @ 0x000000001001a4b0
2026.03.10 17:30:17.193289 [ 2819855 ] {} <Fatal> BaseDaemon: 10. ./ci/tmp/build/./programs/server/Server.cpp:424: mainEntryClickHouseServer(int, char**) @ 0x0000000010017a48
2026.03.10 17:30:17.195541 [ 2819855 ] {} <Fatal> BaseDaemon: 11. ./ci/tmp/build/./programs/main.cpp:381: main @ 0x000000000927a61f
2026.03.10 17:30:17.195551 [ 2819855 ] {} <Fatal> BaseDaemon: 12. __libc_start_call_main @ 0x000000000002a1ca
2026.03.10 17:30:17.195553 [ 2819855 ] {} <Fatal> BaseDaemon: 13. __libc_start_main_alias_2 @ 0x000000000002a28b
2026.03.10 17:30:17.232815 [ 2819855 ] {} <Fatal> BaseDaemon: 14. _start @ 0x000000000927902e
2026.03.10 17:30:17.232823 [ 2819855 ] {} <Fatal> BaseDaemon: Integrity check of the executable skipped because the reference checksum could not be read.
2026.03.10 17:30:17.232833 [ 2819855 ] {} <Debug> CrashWriter: Not sending crash report (crash reporting is disabled)
fish: Job 1, './clickhouse server' terminated by signal SIGSEGV (Address boundary error)

Note: No BAD_ARGUMENTS exception appears in the logs, confirming the fix prevents the error that occurred before PR #1438.

Comparison with PR #1438

The fix successfully resolves #1437 while improving logging behavior.

@CarlosFelipeOR CarlosFelipeOR requested a review from Enmk March 10, 2026 21:10
Copy link
Member

@Enmk Enmk left a comment

Choose a reason for hiding this comment

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

LGTM

@zvonand zvonand merged commit 06f310b into antalya-25.8 Mar 11, 2026
212 of 215 checks passed
@CarlosFelipeOR CarlosFelipeOR added the verified Verified by QA label Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants