01502_jemalloc_percpu_arena: add a test with MALLOC_CONF=abort_conf:true

This commit is contained in:
Azat Khuzhin 2021-12-17 21:29:01 +03:00
parent 6c7ec9c762
commit b28e0dd689
2 changed files with 15 additions and 0 deletions

View File

@ -1 +1,2 @@
1
<jemalloc>: Number of CPUs is not deterministic

View File

@ -1,4 +1,7 @@
#!/usr/bin/env bash
# Tags: no-tsan, no-asan, no-msan, no-ubsan
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# NOTE: jemalloc is disabled under sanitizers
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
@ -6,6 +9,9 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
ncpus="$(getconf _NPROCESSORS_ONLN)"
# In debug build abort_conf:true is set by default, disable it explicitly
export MALLOC_CONF=abort_conf:false
# Regression for:
#
# $ taskset --cpu-list 8 ./clickhouse local -q 'select 1'
@ -14,3 +20,11 @@ ncpus="$(getconf _NPROCESSORS_ONLN)"
taskset --cpu-list $((ncpus-1)) ${CLICKHOUSE_LOCAL} -q 'select 1'
# just in case something more complicated
taskset --cpu-list $((ncpus-1)) ${CLICKHOUSE_LOCAL} -q 'select * from numbers_mt(100000000) settings max_threads=100 FORMAT Null'
# this command should fail because percpu arena will be disabled,
# and with abort_conf:true it is not allowed
(
# subshell is required to suppress "Aborted" message from the shell.
MALLOC_CONF=abort_conf:true
taskset --cpu-list $((ncpus-1)) ${CLICKHOUSE_LOCAL} -q 'select 1'
) |& grep -F 'Number of CPUs is not deterministic'