ClickHouse/programs
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
..
benchmark More forward declaration for generic headers 2020-12-12 17:43:10 +03:00
client fix boost 2020-12-16 15:57:42 +03:00
compressor added sub-tables in report, replaced some USE_ -> ENABLE_ for 2020-09-18 16:09:22 +03:00
copier More forward declaration for generic headers 2020-12-12 17:43:10 +03:00
extract-from-config Refactor CMake build files (#11390) 2020-06-09 13:54:49 +03:00
format remove other stringstreams 2020-11-09 22:12:44 +03:00
git-import Fix error (CC @akuzm) 2020-12-19 01:07:52 +03:00
install Merge pull request #17421 from ClickHouse/clickhouse-install-improvements 2020-11-26 23:12:57 +03:00
local Added queries-file parameter. Fixed code review issues 2020-12-07 19:29:17 +03:00
obfuscator Add missing modification 2020-10-29 08:18:42 +03:00
odbc-bridge Fixing build. 2020-12-16 20:11:32 +03:00
server Add connection thread metrics 2020-12-18 15:22:55 +08:00
clickhouse-split-helper Move all folders inside /dbms one level up (#9974) 2020-04-02 02:51:21 +03:00
CMakeLists.txt Return clickhouse-git-import 2020-12-19 00:19:11 +03:00
config_tools.h.in Add git-import as a tool 2020-09-07 06:22:47 +03:00
main.cpp MADV_DONTNEED check in runtime for qemu (via patching jemalloc) 2020-12-19 15:34:12 +03:00
ya.make Follow Arcadia ya.make rules 2020-11-16 21:24:58 +03:00