Skip to content

Commit

Permalink
[FLINK-16973][tests] Add tooling for collecting jvm crash files
Browse files Browse the repository at this point in the history
  • Loading branch information
rmetzger committed Apr 5, 2020
1 parent fc1df95 commit 3bd9092
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tools/ci/maven-utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,13 @@ function setup_maven {

echo "Installed Maven ${MAVEN_VERSION} to ${M2_HOME}"
}

function collect_coredumps {
local SEARCHDIR=$1
local TARGET_DIR=$2
echo "Searching for .dump, .dumpstream and related files in '$SEARCHDIR'"
for file in `find $SEARCHDIR -type f -regextype posix-extended -iregex '.*\.dump|.*\.dumpstream|.*hs.*\.log|.*/core(.[0-9]+)?$'`; do
echo "Moving '$file' to target directory ('$TARGET_DIR')"
mv $file $TARGET_DIR/
done
}
6 changes: 6 additions & 0 deletions tools/travis_watchdog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ if [ ! -z "$TF_BUILD" ] ; then
ARTIFACTS_FILE=${BUILD_BUILDNUMBER}.tar.gz
fi

# enable coredumps
ulimit -c unlimited
export JAVA_TOOL_OPTIONS="-XX:+HeapDumpOnOutOfMemoryError"

if [ $TEST == $STAGE_PYTHON ]; then
CMD=$PYTHON_TEST
CMD_PID=$PYTHON_PID
Expand Down Expand Up @@ -276,6 +280,8 @@ case $TEST in
;;
esac

collect_coredumps `pwd` $ARTIFACTS_DIR

upload_artifacts_s3

# since we are in flink/tools/artifacts
Expand Down

0 comments on commit 3bd9092

Please sign in to comment.