mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Try fix attaching gdb in tests (#32448)
* attach gdb with sudo * fix * Update run.sh
This commit is contained in:
parent
be084a0a1b
commit
85e53b1b1f
@ -165,7 +165,7 @@ thread apply all backtrace
|
||||
continue
|
||||
" > script.gdb
|
||||
|
||||
gdb -batch -command script.gdb -p $server_pid &
|
||||
sudo gdb -batch -command script.gdb -p $server_pid &
|
||||
|
||||
# Check connectivity after we attach gdb, because it might cause the server
|
||||
# to freeze and the fuzzer will fail.
|
||||
|
@ -291,7 +291,7 @@ function get_profiles_watchdog
|
||||
|
||||
for pid in $(pgrep -f clickhouse)
|
||||
do
|
||||
gdb -p "$pid" --batch --ex "info proc all" --ex "thread apply all bt" --ex quit &> "$pid.gdb.log" &
|
||||
sudo gdb -p "$pid" --batch --ex "info proc all" --ex "thread apply all bt" --ex quit &> "$pid.gdb.log" &
|
||||
done
|
||||
wait
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
#!/bin/bash
|
||||
# shellcheck disable=SC2094
|
||||
# shellcheck disable=SC2086
|
||||
# shellcheck disable=SC2024
|
||||
|
||||
set -x
|
||||
|
||||
@ -142,7 +143,7 @@ quit
|
||||
# FIXME Hung check may work incorrectly because of attached gdb
|
||||
# 1. False positives are possible
|
||||
# 2. We cannot attach another gdb to get stacktraces if some queries hung
|
||||
gdb -batch -command script.gdb -p "$(cat /var/run/clickhouse-server/clickhouse-server.pid)" >> /test_output/gdb.log &
|
||||
sudo gdb -batch -command script.gdb -p "$(cat /var/run/clickhouse-server/clickhouse-server.pid)" >> /test_output/gdb.log &
|
||||
}
|
||||
|
||||
configure
|
||||
|
@ -21,7 +21,7 @@ IMAGE_NAME = 'clickhouse/fuzzer'
|
||||
|
||||
def get_run_command(pr_number, sha, download_url, workspace_path, image):
|
||||
return f'docker run --network=host --volume={workspace_path}:/workspace ' \
|
||||
'--cap-add syslog --cap-add sys_admin ' \
|
||||
'--cap-add syslog --cap-add sys_admin --cap-add=SYS_PTRACE ' \
|
||||
f'-e PR_TO_TEST={pr_number} -e SHA_TO_TEST={sha} -e BINARY_URL_TO_DOWNLOAD="{download_url}" '\
|
||||
f'{image}'
|
||||
|
||||
|
@ -22,7 +22,7 @@ from tee_popen import TeePopen
|
||||
|
||||
|
||||
def get_run_command(build_path, result_folder, server_log_folder, image):
|
||||
cmd = "docker run -e S3_URL='https://clickhouse-datasets.s3.amazonaws.com' " + \
|
||||
cmd = "docker run --cap-add=SYS_PTRACE -e S3_URL='https://clickhouse-datasets.s3.amazonaws.com' " + \
|
||||
f"--volume={build_path}:/package_folder " \
|
||||
f"--volume={result_folder}:/test_output " \
|
||||
f"--volume={server_log_folder}:/var/log/clickhouse-server {image}"
|
||||
|
Loading…
Reference in New Issue
Block a user