-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Race condition when doing various ALTERs in a system under a heavy load #24134
Copy link
Copy link
Closed
Labels
fuzzProblem found by one of the fuzzersProblem found by one of the fuzzers
Description
Describe the bug
New stress 01900_alter_race_condition_stress that can be found in #24132 fails when server is run with thread fuzzer enabled. This test was created based on the fails seen in RBAC TestFlows module (https://github.com/ClickHouse/ClickHouse/blob/master/tests/testflows/rbac/tests/privileges/alter/alter_column.py).
Does it reproduce on recent release?
Yes.
How to reproduce
Enable thread fuzzer in current environment
export THREAD_FUZZER_CPU_TIME_PERIOD_US=1000
export THREAD_FUZZER_SLEEP_PROBABILITY=0.1
export THREAD_FUZZER_SLEEP_TIME_US=100000
export THREAD_FUZZER_pthread_mutex_lock_BEFORE_MIGRATE_PROBABILITY=1
export THREAD_FUZZER_pthread_mutex_lock_AFTER_MIGRATE_PROBABILITY=1
export THREAD_FUZZER_pthread_mutex_unlock_BEFORE_MIGRATE_PROBABILITY=1
export THREAD_FUZZER_pthread_mutex_unlock_AFTER_MIGRATE_PROBABILITY=1
export THREAD_FUZZER_pthread_mutex_lock_BEFORE_SLEEP_PROBABILITY=0.001
export THREAD_FUZZER_pthread_mutex_lock_AFTER_SLEEP_PROBABILITY=0.001
export THREAD_FUZZER_pthread_mutex_unlock_BEFORE_SLEEP_PROBABILITY=0.001
export THREAD_FUZZER_pthread_mutex_unlock_AFTER_SLEEP_PROBABILITY=0.001
export THREAD_FUZZER_pthread_mutex_lock_BEFORE_SLEEP_TIME_US=10000
export THREAD_FUZZER_pthread_mutex_lock_AFTER_SLEEP_TIME_US=10000
export THREAD_FUZZER_pthread_mutex_unlock_BEFORE_SLEEP_TIME_US=10000
export THREAD_FUZZER_pthread_mutex_unlock_AFTER_SLEEP_TIME_US=10000
start server so that it gets all the environment variables
sudo -E -u clickhouse ./build/programs/clickhouse-server --config-file=/etc/clickhouse-server/config.xml
repeatedly run new tests until fail
tests/clickhouse-test -b build/programs/clickhouse -c build/programs/clickhouse-client --queries tests/queries/ 01900_alter_race_condition
Expected behavior
Test should not fail with thread fuzzer enabled.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
fuzzProblem found by one of the fuzzersProblem found by one of the fuzzers