You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by jo...@apache.org on 2019/03/13 22:55:16 UTC
[impala] branch master updated: IMPALA-8303: Generate JUnitXML for
ASAN failures
This is an automated email from the ASF dual-hosted git repository.
joemcdonnell 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 79ce6b4 IMPALA-8303: Generate JUnitXML for ASAN failures
79ce6b4 is described below
commit 79ce6b47f7ccf725c4d55cfb2d2988b7c602d0ea
Author: Joe McDonnell <jo...@cloudera.com>
AuthorDate: Mon Mar 4 17:41:24 2019 -0800
IMPALA-8303: Generate JUnitXML for ASAN failures
This modifies bin/jenkins/finalize.sh to detect ASAN error messages.
ASAN messages appear in the ERROR logs for impalad and in
logs/be_tests/LastTest.log for backend tests. This checks both
locations for "ERROR: AddressSanitizer:" messages.
Testing:
- Ran a Jenkins job with a known backend ASAN problem
- Ran finalize.sh on logs from an impalad ASAN crash
Change-Id: I5434703a02617d62dc0ed401b8cc1bf7a198a84d
Reviewed-on: http://gerrit.cloudera.org:8080/12733
Reviewed-by: David Knupp <dk...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
bin/jenkins/finalize.sh | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/bin/jenkins/finalize.sh b/bin/jenkins/finalize.sh
index b7adfb4..cf0b63f 100755
--- a/bin/jenkins/finalize.sh
+++ b/bin/jenkins/finalize.sh
@@ -54,3 +54,30 @@ if [[ $(find $LOGS_DIR -path "*minidumps*" -name "*dmp") ]]; then
done
rm -rf $SYM_DIR
fi
+
+function check_for_asan_error {
+ ERROR_LOG=${1}
+ if grep -q "ERROR: AddressSanitizer:" ${ERROR_LOG} ; then
+ # Extract out the ASAN message from the log file into a temp file.
+ tmp_asan_output=$(mktemp)
+ sed -n '/AddressSanitizer:/,/ABORTING/p' ${ERROR_LOG} > "${tmp_asan_output}"
+ # Make each ASAN issue use its own JUnitXML file by including the log filename
+ # in the step.
+ base=$(basename ${ERROR_LOG})
+ "${IMPALA_HOME}"/bin/generate_junitxml.py --phase finalize \
+ --step "asan_error_${base}" \
+ --error "Address Sanitizer message detected in ${ERROR_LOG}" \
+ --stderr "$(cat ${tmp_asan_output})"
+ rm "${tmp_asan_output}"
+ fi
+}
+
+# Check for AddressSanitizer messages. ASAN errors can show up in ERROR logs
+# (particularly for impalad). Some backend tests generate ERROR logs.
+for error_log in $(find $LOGS_DIR -name "*ERROR*"); do
+ check_for_asan_error ${error_log}
+done
+# Backend tests can also generate output in logs/be_tests/LastTest.log
+if [[ -f ${LOGS_DIR}/be_tests/LastTest.log ]]; then
+ check_for_asan_error ${LOGS_DIR}/be_tests/LastTest.log
+fi