Skip to content

Commit

Permalink
CI: thread dump on benchmark timeout (see #462, #457)
Browse files Browse the repository at this point in the history
Each benchmark is now run like this:

    timeout --signal=SIGQUIT 5m java ...

Thus threads are dumped on timeout which should help debugging.
  • Loading branch information
vhotspur authored Nov 20, 2024
2 parents 8c8f07b + 702454d commit 967ea9c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tools/ci/bench-base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ java -jar "$RENAISSANCE_JAR" --raw-list > list.txt

for BENCH in $(cat list.txt); do
echo "====> $BENCH"
java -Xms2500M -Xmx2500M -jar "$RENAISSANCE_JAR" -c test -r 1 --csv output.csv --json output.json "$BENCH" || exit 1
timeout_with_thread_dump 5m java -Xms2500M -Xmx2500M -jar "$RENAISSANCE_JAR" -c test -r 1 --csv output.csv --json output.json "$BENCH" || exit 1
done
2 changes: 1 addition & 1 deletion tools/ci/bench-standalone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ unzip "$RENAISSANCE_JAR" -d "extracted-renaissance"

for BENCH in $(cat list.txt); do
echo "====> $BENCH"
java -Xms2500M -Xmx2500M -jar "./extracted-renaissance/single/$BENCH.jar" -c test -r 1 --csv output.csv --json output.json "$BENCH" || exit 1
timeout_with_thread_dump 5m java -Xms2500M -Xmx2500M -jar "./extracted-renaissance/single/$BENCH.jar" -c test -r 1 --csv output.csv --json output.json "$BENCH" || exit 1
done
17 changes: 17 additions & 0 deletions tools/ci/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,23 @@ get_jvm_workaround_args() {
esac
}

if command -v timeout >/dev/null; then
TIMEOUT_IMPL=timeout_with_thread_dump_real
else
TIMEOUT_IMPL=timeout_with_thread_dump_fake
fi

timeout_with_thread_dump_real() {
timeout --signal=3 --kill-after=5s "$@"
}
timeout_with_thread_dump_fake() {
shift
"$@"
}
timeout_with_thread_dump() {
"$TIMEOUT_IMPL" "$@"
}


# Make sure we are in the top-level directory so that we can use
# relative paths when referring to files within the project.
Expand Down

0 comments on commit 967ea9c

Please sign in to comment.