ClickHouse® is a real-time analytics DBMS
Go to file
Azat Khuzhin 75e46f865c Avoid uncaught exception for onFault handler
onFault() is called from the std::thread, and it should catch all
exceptions, otherwise you can unrelated fatal errors.

<details>

<summary>stacktrace</summary>

    2024.04.08 13:15:29.526847 [ 2067427 ] {} <Fatal> BaseDaemon: (version 24.2.2.71 (official build), build id: 57F857DCFE8BA6838F6463E4665CD700852BFF0E, git hash: 9293d361e7) (from thread 2118603) Terminate called for uncaught exception:
    2024.04.08 13:15:29.526904 [ 2067427 ] {} <Fatal> BaseDaemon: Code: 210. DB::NetException: I/O error: Broken pipe, while writing to socket (10.61.7.253:9000 -> 10.101.53.134:46036). (NETWORK_ERROR), Stack trace (when copying this message, always include the lines below):
    2024.04.08 13:15:29.526983 [ 2067427 ] {} <Fatal> BaseDaemon:
    2024.04.08 13:15:29.527042 [ 2067427 ] {} <Fatal> BaseDaemon: 0. ./build_docker/./src/Common/Exception.cpp:96: DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x000000000cf5af1b
    2024.04.08 13:15:29.527061 [ 2067427 ] {} <Fatal> BaseDaemon: 1. ./contrib/llvm-project/libcxx/include/string:1499: DB::NetException::NetException<String, String, String>(int, FormatStringHelperImpl<std::type_identity<String>::type, std::type_identity<String>::type, std::type_identity<String>::type>, String&&, String&&, String&&) @ 0x000000000d07dfe1
    2024.04.08 13:15:29.527082 [ 2067427 ] {} <Fatal> BaseDaemon: 2. ./build_docker/./src/IO/WriteBufferFromPocoSocket.cpp:0: DB::WriteBufferFromPocoSocket::nextImpl() @ 0x000000000d07e97e
    2024.04.08 13:15:29.527125 [ 2067427 ] {} <Fatal> BaseDaemon: 3. ./src/IO/WriteBuffer.h:65: DB::TCPHandler::sendLogs() @ 0x0000000012fd31c1
    2024.04.08 13:15:29.527144 [ 2067427 ] {} <Fatal> BaseDaemon: 4. ./contrib/llvm-project/libcxx/include/atomic:958: void std::__function::__policy_invoker<void ()>::__call_impl<std::__function::__default_alloc_func<DB::TCPHandler::runImpl()::$_0, void ()>>(std::__function::__policy_storage const*) @ 0x0000000012fdcc6e
    2024.04.08 13:15:29.527163 [ 2067427 ] {} <Fatal> BaseDaemon: 5. ./contrib/llvm-project/libcxx/include/__functional/function.h:0: ? @ 0x000000000d25c65b
    2024.04.08 13:15:29.527182 [ 2067427 ] {} <Fatal> BaseDaemon: 6. ./build_docker/./src/Daemon/BaseDaemon.cpp:286: void* std::__thread_proxy[abi:v15000]<std::tuple<std::unique_ptr<std::__thread_struct, std::default_delete<std::__thread_struct>>, SignalListener::run()::'lambda'()>>(void*) @ 0x000000000d25e775
    2024.04.08 13:15:29.527191 [ 2067427 ] {} <Fatal> BaseDaemon: 7. ? @ 0x00007f0fe4906609
    2024.04.08 13:15:29.527211 [ 2067427 ] {} <Fatal> BaseDaemon: 8. ? @ 0x00007f0fe482b353

    2024.04.08 13:15:29.534235 [ 2118604 ] {} <Fatal> BaseDaemon: ########## Short fault info ############
    2024.04.08 13:15:29.534347 [ 2118604 ] {} <Fatal> BaseDaemon: (version 24.2.2.71 (official build), build id: 57F857DCFE8BA6838F6463E4665CD700852BFF0E, git hash: 9293d361e7) (from thread 2118603) Received signal 6
    2024.04.08 13:15:29.534476 [ 2118604 ] {} <Fatal> BaseDaemon: Signal description: Aborted
    2024.04.08 13:15:29.534484 [ 2118604 ] {} <Fatal> BaseDaemon:
    2024.04.08 13:15:29.534510 [ 2118604 ] {} <Fatal> BaseDaemon: Stack trace: 0x00007f0fe474f00b 0x00007f0fe472e859 0x000000000d24f72e 0x0000000017d15be3 0x0000000017d15818 0x0000000012fd350d 0x0000000012fdcc6e 0x000000000d25c65b 0x000000000d25e775 0x00007f0fe4906609 0x00007f0fe482b353
    2024.04.08 13:15:29.534531 [ 2118604 ] {} <Fatal> BaseDaemon: ########################################
    2024.04.08 13:15:29.534609 [ 2118604 ] {} <Fatal> BaseDaemon: (version 24.2.2.71 (official build), build id: 57F857DCFE8BA6838F6463E4665CD700852BFF0E, git hash: 9293d361e7) (from thread 2118603) (no query) Received signal Aborted (6)
    2024.04.08 13:15:29.534638 [ 2118604 ] {} <Fatal> BaseDaemon:
    2024.04.08 13:15:29.534663 [ 2118604 ] {} <Fatal> BaseDaemon: Stack trace: 0x00007f0fe474f00b 0x00007f0fe472e859 0x000000000d24f72e 0x0000000017d15be3 0x0000000017d15818 0x0000000012fd350d 0x0000000012fdcc6e 0x000000000d25c65b 0x000000000d25e775 0x00007f0fe4906609 0x00007f0fe482b353
    2024.04.08 13:15:29.534711 [ 2118604 ] {} <Fatal> BaseDaemon: 2. ? @ 0x00007f0fe474f00b
    2024.04.08 13:15:29.534728 [ 2118604 ] {} <Fatal> BaseDaemon: 3. ? @ 0x00007f0fe472e859
    2024.04.08 13:15:29.613230 [ 2118604 ] {} <Fatal> BaseDaemon: 4.0. inlined from ./contrib/llvm-project/libcxxabi/src/cxa_exception.cpp:670: __cxa_decrement_exception_refcount
    2024.04.08 13:15:29.613283 [ 2118604 ] {} <Fatal> BaseDaemon: 4.1. inlined from ./contrib/llvm-project/libcxx/src/support/runtime/exception_pointer_cxxabi.ipp:17: ~exception_ptr
    2024.04.08 13:15:29.613311 [ 2118604 ] {} <Fatal> BaseDaemon: 4. ./build_docker/./src/Daemon/BaseDaemon.cpp:591: terminate_handler() @ 0x000000000d24f72e
    2024.04.08 13:15:29.617590 [ 2118604 ] {} <Fatal> BaseDaemon: 5. ./build_docker/./contrib/llvm-project/libcxxabi/src/cxa_handlers.cpp:61: std::__terminate(void (*)()) @ 0x0000000017d15be3
    2024.04.08 13:15:29.619575 [ 2118604 ] {} <Fatal> BaseDaemon: 6. ./build_docker/./contrib/llvm-project/libcxxabi/src/cxa_exception.cpp:0: __cxa_rethrow @ 0x0000000017d15818
    2024.04.08 13:15:30.104097 [ 2118604 ] {} <Fatal> BaseDaemon: 7.0. inlined from ./src/IO/WriteBuffer.h:0: DB::WriteBuffer::next()
    2024.04.08 13:15:30.104331 [ 2118604 ] {} <Fatal> BaseDaemon: 7.1. inlined from ./build_docker/./src/Server/TCPHandler.cpp:2225: DB::TCPHandler::sendLogData(DB::Block const&)
    2024.04.08 13:15:30.104408 [ 2118604 ] {} <Fatal> BaseDaemon: 7. ./build_docker/./src/Server/TCPHandler.cpp:2303: DB::TCPHandler::sendLogs() @ 0x0000000012fd350d
    2024.04.08 13:15:30.217481 [ 2118604 ] {} <Fatal> BaseDaemon: 8.0. inlined from ./contrib/llvm-project/libcxx/include/atomic:958: double std::__cxx_atomic_load[abi:v15000]<double>(std::__cxx_atomic_base_impl<double> const*, std::memory_order)
    2024.04.08 13:15:30.217579 [ 2118604 ] {} <Fatal> BaseDaemon: 8.1. inlined from ./contrib/llvm-project/libcxx/include/atomic:1588: std::__atomic_base<double, false>::load[abi:v15000](std::memory_order) const
    2024.04.08 13:15:30.217617 [ 2118604 ] {} <Fatal> BaseDaemon: 8.2. inlined from ./src/Common/ThreadFuzzer.cpp:407: pthread_mutex_unlock
    2024.04.08 13:15:30.217644 [ 2118604 ] {} <Fatal> BaseDaemon: 8.3. inlined from ./contrib/llvm-project/libcxx/include/__threading_support:314: std::__libcpp_mutex_unlock[abi:v15000](pthread_mutex_t*)
    2024.04.08 13:15:30.217676 [ 2118604 ] {} <Fatal> BaseDaemon: 8.4. inlined from ./contrib/llvm-project/libcxx/src/mutex.cpp:52: std::mutex::unlock()
    2024.04.08 13:15:30.217699 [ 2118604 ] {} <Fatal> BaseDaemon: 8.5. inlined from ./contrib/llvm-project/libcxx/include/__mutex_base💯 ~lock_guard
    2024.04.08 13:15:30.217747 [ 2118604 ] {} <Fatal> BaseDaemon: 8.6. inlined from ./build_docker/./src/Server/TCPHandler.cpp:392: operator()
    2024.04.08 13:15:30.217776 [ 2118604 ] {} <Fatal> BaseDaemon: 8.7. inlined from ./contrib/llvm-project/libcxx/include/__functional/invoke.h:394: ?
    2024.04.08 13:15:30.217796 [ 2118604 ] {} <Fatal> BaseDaemon: 8.8. inlined from ./contrib/llvm-project/libcxx/include/__functional/invoke.h:479: ?
    2024.04.08 13:15:30.217859 [ 2118604 ] {} <Fatal> BaseDaemon: 8.9. inlined from ./contrib/llvm-project/libcxx/include/__functional/function.h:235: ?
    2024.04.08 13:15:30.217878 [ 2118604 ] {} <Fatal> BaseDaemon: 8. ./contrib/llvm-project/libcxx/include/__functional/function.h:716: ? @ 0x0000000012fdcc6e
    2024.04.08 13:15:30.240809 [ 2118604 ] {} <Fatal> BaseDaemon: 9. ./contrib/llvm-project/libcxx/include/__functional/function.h:0: ? @ 0x000000000d25c65b
    2024.04.08 13:15:30.283617 [ 2118604 ] {} <Fatal> BaseDaemon: 10.0. inlined from ./build_docker/./src/Daemon/BaseDaemon.cpp:286: operator()
    2024.04.08 13:15:30.283686 [ 2118604 ] {} <Fatal> BaseDaemon: 10.1. inlined from ./contrib/llvm-project/libcxx/include/__functional/invoke.h:394: ?
    2024.04.08 13:15:30.283725 [ 2118604 ] {} <Fatal> BaseDaemon: 10.2. inlined from ./contrib/llvm-project/libcxx/include/thread:284: void std::__thread_execute[abi:v15000]<std::unique_ptr<std::__thread_struct, std::default_delete<std::__thread_struct>>, SignalListener::run()::'lambda'()>(std::tuple<std::unique_ptr<std::__thread_struct, std::default_delete<std::__thread_struct>>, SignalListener::run()::'lambda'()>&, std::__tuple_indices<>)
    2024.04.08 13:15:30.283755 [ 2118604 ] {} <Fatal> BaseDaemon: 10. ./contrib/llvm-project/libcxx/include/thread:295: void* std::__thread_proxy[abi:v15000]<std::tuple<std::unique_ptr<std::__thread_struct, std::default_delete<std::__thread_struct>>, SignalListener::run()::'lambda'()>>(void*) @ 0x000000000d25e775
    2024.04.08 13:15:30.283799 [ 2118604 ] {} <Fatal> BaseDaemon: 11. ? @ 0x00007f0fe4906609
    2024.04.08 13:15:30.283821 [ 2118604 ] {} <Fatal> BaseDaemon: 12. ? @ 0x00007f0fe482b353
    2024.04.08 13:15:30.574588 [ 2118604 ] {} <Fatal> BaseDaemon: Integrity check of the executable successfully passed (checksum: 3485110FABDB0C94202BD684999A9814)
    2024.04.08 13:15:30.574704 [ 2118604 ] {} <Fatal> BaseDaemon: Report this error to https://github.com/ClickHouse/ClickHouse/issues

</details>

v2: fatal logging

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-04-08 20:20:25 +02:00
.github Merge remote-tracking branch 'origin/master' into enable-analyzer 2024-03-27 11:37:32 +01:00
base Fix build with clang-19 (master) 2024-04-03 05:42:41 +02:00
benchmark Remove old file 2022-07-12 20:28:02 +02:00
cmake Update autogenerated version to 24.4.1.1 and contributors 2024-03-27 18:48:14 +01:00
contrib Update CMake 2024-04-02 11:10:09 +02:00
docker Merge pull request #62065 from azat/ci/fix-stress-tests-analyzer 2024-04-01 00:16:02 +03:00
docs Merge pull request #62290 from ClickHouse/Avogar-patch-1 2024-04-04 21:37:03 +02:00
packages Revert "Add --now option to enable and start the service" 2024-03-25 17:53:01 +01:00
programs Merge pull request #62265 from rschu1ze/static-instance 2024-04-04 14:36:03 +02:00
rust Check is Rust avaiable for build, if not, suggest a way to disable Rust support 2024-03-26 15:20:49 +01:00
src Avoid uncaught exception for onFault handler 2024-04-08 20:20:25 +02:00
tests Update README.md 2024-04-04 12:09:05 -04:00
utils Merge pull request #62109 from Blargian/document_hasXYZ 2024-04-02 10:48:20 +02:00
.clang-format Fix: incorrect brace style 2023-10-30 16:37:12 +00:00
.clang-tidy Also enable modernize-use-override 2024-04-03 20:44:02 +00:00
.clangd Enable few slow clang-tidy checks for clangd 2023-05-13 14:08:25 +02:00
.editorconfig Changed tabs to spaces in editor configs and in style guide [#CLICKHOUSE-3]. 2017-04-01 11:35:09 +03:00
.exrc Fix vim settings (wrong group for autocmd) 2022-12-03 21:23:24 +01:00
.git-blame-ignore-revs Add files with revision to ignore for git blame 2022-09-13 23:05:56 +02:00
.gitattributes Ignore core.autocrlf for tests references 2022-10-05 09:13:27 +02:00
.gitignore integration tests: persist pdb history between test runs 2024-03-26 17:55:37 +01:00
.gitmessage CI: modify CI from PR body 2024-03-21 19:35:07 +00:00
.gitmodules use upstream repo 2024-01-27 23:45:14 +01:00
.snyk Add exclusions from the Snyk scan 2022-10-31 17:47:02 +01:00
.yamllint Increase line-length limit for yamlllint 2023-06-13 19:45:51 +02:00
AUTHORS Update AUTHORS 2021-09-22 11:38:03 +03:00
CHANGELOG.md Remove reverted PR from 24.3 changelog 2024-04-03 17:07:44 +02:00
CMakeLists.txt Merge branch 'master' into generic-clickhouse-local-fuzzer 2024-03-21 03:18:05 +01:00
CODE_OF_CONDUCT.md Add minimal code of conduct #9676 2020-03-16 12:44:28 +03:00
CONTRIBUTING.md Mention ClickHouse CLA in CONTRIBUTING.md (#32697) 2021-12-14 03:47:19 +03:00
format_sources allow several <graphite> targets (#603) 2017-03-21 23:08:09 +04:00
LICENSE Update License 2024-01-01 15:54:00 +01:00
PreLoad.cmake Revert "Check what will happen if we build ClickHouse with Musl" 2023-09-04 22:01:10 +02:00
pyproject.toml Add even more python code to pylint check, fix lambdas 2024-03-05 16:02:44 +01:00
README.md Remove SonarCloud (#61880) 2024-03-25 20:36:58 +01:00
SECURITY.md Update version_date.tsv and changelogs after v24.3.1.2672-lts 2024-03-27 18:02:02 +00:00

Website Apache 2.0 License

The ClickHouse company logo.

ClickHouse® is an open-source column-oriented database management system that allows generating analytical data reports in real-time.

How To Install (Linux, macOS, FreeBSD)

curl https://clickhouse.com/ | sh
  • Official website has a quick high-level overview of ClickHouse on the main page.
  • ClickHouse Cloud ClickHouse as a service, built by the creators and maintainers.
  • Tutorial shows how to set up and query a small ClickHouse cluster.
  • Documentation provides more in-depth information.
  • YouTube channel has a lot of content about ClickHouse in video format.
  • Slack and Telegram allow chatting with ClickHouse users in real-time.
  • Blog contains various ClickHouse-related articles, as well as announcements and reports about events.
  • Code Browser (github.dev) with syntax highlighting, powered by github.dev.
  • Contacts can help to get your questions answered if there are any.

Monthly Release & Community Call

Every month we get together with the community (users, contributors, customers, those interested in learning more about ClickHouse) to discuss what is coming in the latest release. If you are interested in sharing what you've built on ClickHouse, let us know.

Upcoming Events

Keep an eye out for upcoming meetups and eventsaround the world. Somewhere else you want us to be? Please feel free to reach out to tyler <at> clickhouse <dot> com. You can also peruse ClickHouse Events for a list of all upcoming trainings, meetups, speaking engagements, etc.

Recent Recordings

  • Recent Meetup Videos: Meetup Playlist Whenever possible recordings of the ClickHouse Community Meetups are edited and presented as individual talks. Current featuring "Modern SQL in 2023", "Fast, Concurrent, and Consistent Asynchronous INSERTS in ClickHouse", and "Full-Text Indices: Design and Experiments"
  • Recording available: v24.2 Release Call All the features of 24.2, one convenient video! Watch it now!

Interested in joining ClickHouse and making it your full-time job?

We are a globally diverse and distributed team, united behind a common goal of creating industry-leading, real-time analytics. Here, you will have an opportunity to solve some of the most cutting-edge technical challenges and have direct ownership of your work and vision. If you are a contributor by nature, a thinker and a doer - well definitely click!

Check out our current openings here: https://clickhouse.com/company/careers

Can't find what you are looking for, but want to let us know you are interested in joining ClickHouse? Email careers@clickhouse.com!