2020-09-22 05:18:52 +00:00
|
|
|
#!/usr/bin/env bash
|
2021-12-22 07:41:30 +00:00
|
|
|
# Tags: long
|
2020-09-22 05:18:52 +00:00
|
|
|
|
|
|
|
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
2020-12-28 11:46:53 +00:00
|
|
|
# shellcheck source=../shell_config.sh
|
2020-09-22 05:18:52 +00:00
|
|
|
. "$CURDIR"/../shell_config.sh
|
|
|
|
|
2022-02-11 05:14:42 +00:00
|
|
|
# Avoid failures due to "Number of CPUs is not deterministic" error from jemalloc.
|
|
|
|
export MALLOC_CONF=abort_conf:false,abort:false
|
2021-12-18 11:21:37 +00:00
|
|
|
|
2020-09-22 05:18:52 +00:00
|
|
|
# Regression for UAF in ThreadPool.
|
|
|
|
# (Triggered under TSAN)
|
2020-12-21 21:55:54 +00:00
|
|
|
for _ in {1..10}; do
|
2020-09-22 05:18:52 +00:00
|
|
|
${CLICKHOUSE_LOCAL} -q 'select * from numbers_mt(100000000) settings max_threads=100 FORMAT Null'
|
|
|
|
# Binding to specific CPU is not required, but this makes the test more reliable.
|
2022-02-11 10:04:15 +00:00
|
|
|
taskset --cpu-list 0 ${CLICKHOUSE_LOCAL} -q 'select * from numbers_mt(100000000) settings max_threads=100 FORMAT Null' 2>&1 | {
|
|
|
|
# build with santiziers does not have jemalloc
|
|
|
|
# and for jemalloc we have separate test
|
|
|
|
# 01502_jemalloc_percpu_arena
|
|
|
|
grep -v '<jemalloc>: Number of CPUs detected is not deterministic. Per-CPU arena disabled.'
|
|
|
|
}
|
2020-09-22 05:18:52 +00:00
|
|
|
done
|
2022-02-11 10:04:15 +00:00
|
|
|
exit 0
|