This is an automated email from the ASF dual-hosted git repository.
michaelsmith pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git
The following commit(s) were added to refs/heads/master by this push:
new 2f9abc4e8 IMPALA-14000: Dump jstacks first in dump-stacktraces.sh
2f9abc4e8 is described below
commit 2f9abc4e80b5c7dd71d42ad839820b556ba071cd
Author: stiga-huang <[email protected]>
AuthorDate: Mon Apr 28 17:59:12 2025 +0800
IMPALA-14000: Dump jstacks first in dump-stacktraces.sh
bin/dump-stacktraces.sh collects pstack and jstack of the cluster. It's
used when some tests time out. Collecting pstacks might take long and
fail in the middle, causing jstacks not being collected. This changes
the script to collect jstacks first.
Also adds -c to the "thread apply all bt" gdb command to continue past
an error.
Change-Id: I8f610ee4d4934fe950a9f56cf74a7e76e5d63651
Reviewed-on: http://gerrit.cloudera.org:8080/22826
Reviewed-by: Daniel Becker <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>
---
bin/dump-stacktraces.sh | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/bin/dump-stacktraces.sh b/bin/dump-stacktraces.sh
index 7a9dee98d..c73318513 100755
--- a/bin/dump-stacktraces.sh
+++ b/bin/dump-stacktraces.sh
@@ -27,7 +27,7 @@ function collect_gdb_backtraces() {
pid=$2
result="${IMPALA_TIMEOUT_LOGS_DIR}/${name}_${pid}_$(date +%Y%m%d-%H%M%S).txt"
echo "**** Generating backtrace of $name with process id: $pid to $result
****"
- gdb -ex "thread apply all bt" --batch -p $pid >"$result"
+ gdb -ex "thread apply all -c bt" --batch -p $pid >"$result"
}
function collect_jstacks() {
@@ -43,15 +43,15 @@ WORKER_PIDS=()
mkdir -p "$IMPALA_TIMEOUT_LOGS_DIR"
for pid in $(pgrep impalad); do
- collect_gdb_backtraces impalad $pid && collect_jstacks impalad $pid &
+ collect_jstacks impalad $pid && collect_gdb_backtraces impalad $pid &
WORKER_PIDS+=($!)
done
# Catalogd's process name may change. Use 'ps' directly to search the binary
name.
CATALOGD_PID=$(ps aux | grep [c]atalogd | awk '{print $2}')
if [[ ! -z $CATALOGD_PID ]]; then
- collect_gdb_backtraces catalogd $CATALOGD_PID && \
- collect_jstacks catalogd $CATALOGD_PID &
+ collect_jstacks catalogd $CATALOGD_PID && \
+ collect_gdb_backtraces catalogd $CATALOGD_PID &
WORKER_PIDS+=($!)
fi