From ef2740052eee4361fb9c039eb34bc36ddbdea96f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Mar=C3=ADn?= Date: Wed, 25 Oct 2023 10:15:35 +0000 Subject: [PATCH] Attempt to wait until server is responsive after gdb detach --- tests/ci/stress.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tests/ci/stress.py b/tests/ci/stress.py index 446350863aa..bd9f5c7e945 100755 --- a/tests/ci/stress.py +++ b/tests/ci/stress.py @@ -131,20 +131,17 @@ def prepare_for_hung_check(drop_databases: bool) -> bool: # We attach gdb to clickhouse-server before running tests # to print stacktraces of all crashes even if clickhouse cannot print it for some reason. - # However, it obstruct checking for hung queries. + # However, it obstructs checking for hung queries. logging.info("Will terminate gdb (if any)") call_with_retry("kill -TERM $(pidof gdb)") call_with_retry("tail --pid=$(pidof gdb) -f /dev/null") # Sometimes there is a message `Child process was stopped by signal 19` in logs after stopping gdb call_with_retry( - "kill -CONT $(cat /var/run/clickhouse-server/clickhouse-server.pid)" + "kill -CONT $(cat /var/run/clickhouse-server/clickhouse-server.pid) && clickhouse client -q 'SELECT 1 FORMAT Null'" ) # ThreadFuzzer significantly slows down server and causes false-positive hung check failures - call_with_retry("clickhouse client -q 'SYSTEM STOP THREAD FUZZER'") - - call_with_retry(make_query_command("SELECT 1 FORMAT Null")) - + call_with_retry(make_query_command("SYSTEM STOP THREAD FUZZER")) # Some tests execute SYSTEM STOP MERGES or similar queries. # It may cause some ALTERs to hang. # Possibly we should fix tests and forbid to use such queries without specifying table.