Commit Graph

22 Commits

Author SHA1 Message Date
alesapin
743600a359 Merge branch 'update_buffer_size_in_nuraft' into zookeeper_snapshots 2021-06-21 13:46:22 +03:00
alesapin
1a6abb4db4 Better 2021-06-17 19:32:50 +03:00
Maksim Kita
67e9b85951 Merge ext into common 2021-06-16 23:28:41 +03:00
Azat Khuzhin
8ec874dc33 Add writeRetry helper 2021-06-07 09:38:15 +03:00
alesapin
ffb4e1af8f Some copy-paste 2021-05-12 13:39:07 +03:00
Alexey Milovidov
6f481d7512 Add integrity checks for ClickHouse binary 2021-01-07 05:56:57 +03:00
Azat Khuzhin
e379b80d45 MADV_DONTNEED check in runtime for qemu (via patching jemalloc)
qemu does not support MADV_DONTNEED, and by not support it simply ignore
it (i.e. return 0 -- no error).

This issue has been "fixed" in #15590, however it just
terminates the process, and completely breaks clickhouse under qemu
(see also #15174).

But there is no need in such strong protection, we can stop using
madvise in jemalloc if MADV_DONTNEED does not work properly.
And this is what #18169 was tried to do (by override madvise), however
this will break sanitizers, at least TSAN and UBSAN.
The problem there is that sanitizers initialization code uses madvise
(and there is no way to turn this off with TSAN_OPTIONS) and overwritten
madvise function will have sanitizers traits (__tsan_func_entry), while
TSAN is not ready for this, and eventually it SIGSEGV.
Interesting thing is that in the recent clang-12, madvise was replaced
with direct syscall [1].

  [1]: 9f8c4039f2

But it is better to make clickhouse compatible with clang < 12 too, so
instead of override madvise completely, the runtime check was moved into
the jemalloc code [2].

  [2]: https://github.com/ClickHouse-Extras/jemalloc/pull/1
2020-12-19 15:34:12 +03:00
alexey-milovidov
674d8d44b9
Update main.cpp 2020-10-05 09:28:52 +03:00
alexey-milovidov
8ff92a16ab
Update main.cpp 2020-10-05 08:01:08 +03:00
Azat Khuzhin
9e3ff349eb Ensure that there will be no strlen() calls for SSE checks 2020-10-04 17:37:31 +03:00
Azat Khuzhin
2a6874e065 Run MADV_DONTNEED after SSE check to fix 01103_check_cpu_instructions_at_startup 2020-10-04 11:20:29 +03:00
Azat Khuzhin
caf3156fb7 Check MADV_DONTNEED (for jemalloc), maybe broken under qemu
jemalloc relies on working MADV_DONTNEED (that fact that after
madvise(MADV_DONTNEED) returns success, after subsequent access to those
pages they will be zeroed).
However qemu does not support this, yet [1], and you can get very tricky
assert if you will run clickhouse-server under qemu:

    <jemalloc>: ../contrib/jemalloc/src/extent.c:1195: Failed assertion: "p[i] == 0"

  [1]: https://patchwork.kernel.org/patch/10576637/

But after this patch you will get pretty error:

  $ qemu-x86_64-static programs/clickhouse
  MADV_DONTNEED does not zeroed page. jemalloc will be broken
2020-10-04 11:20:29 +03:00
Azat Khuzhin
9c09050e7c Cleanup server instructions startup checking code 2020-10-04 01:47:44 +03:00
Alexey Milovidov
d18e7adbc0 Add git-import as a tool 2020-09-07 06:22:47 +03:00
Alexey Milovidov
e5c3f47c92 Added start/stop/status/restart commands 2020-08-08 23:42:10 +03:00
Alexey Milovidov
d9db0a3442 Add simple "clickhouse-install" tool 2020-08-08 21:38:34 +03:00
alexey-milovidov
545c9e5bac
Merge pull request #11236 from abyss7/CLICKHOUSE-4856
Build universal ClickHouse binary with ya.make
2020-05-28 15:28:49 +03:00
Ivan Lezhankin
2432ea2c4b Build universal binary using ya make 2020-05-28 00:58:46 +03:00
Azat Khuzhin
fd64d39166 Fix style check for POPCNT check 2020-05-27 20:23:09 +03:00
Azat Khuzhin
ec894e7cb3 Check for POPCNT instruction 2020-05-27 03:01:16 +03:00
Ivan
85d783c247
Poco contrib refactoring (#10396)
* Remove config_common.h
* Refactor libcpuid contrib
* Remove support for libcpuinfo
* Define USE_CPUID in Arcadia
* Refactor Poco libraries
2020-05-08 17:11:19 +03:00
Ivan
97f2a2213e
Move all folders inside /dbms one level up (#9974)
* Move some code outside dbms/src folder
* Fix paths
2020-04-02 02:51:21 +03:00