mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
e379b80d45
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]:
|
||
---|---|---|
.. | ||
benchmark | ||
client | ||
compressor | ||
copier | ||
extract-from-config | ||
format | ||
git-import | ||
install | ||
local | ||
obfuscator | ||
odbc-bridge | ||
server | ||
clickhouse-split-helper | ||
CMakeLists.txt | ||
config_tools.h.in | ||
main.cpp | ||
ya.make |