You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ozone.apache.org by ad...@apache.org on 2022/03/06 21:42:22 UTC

[ozone] branch master updated: HDDS-6360. Create stack dump on acceptance test failure (#3154)

This is an automated email from the ASF dual-hosted git repository.

adoroszlai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git


The following commit(s) were added to refs/heads/master by this push:
     new 5217134  HDDS-6360. Create stack dump on acceptance test failure (#3154)
5217134 is described below

commit 5217134f9a17ac7643800ba99b02f5309d718b82
Author: Doroszlai, Attila <64...@users.noreply.github.com>
AuthorDate: Sun Mar 6 22:41:58 2022 +0100

    HDDS-6360. Create stack dump on acceptance test failure (#3154)
---
 hadoop-ozone/dist/pom.xml                     |  2 +-
 hadoop-ozone/dist/src/main/compose/testlib.sh | 15 +++++++++++++++
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/hadoop-ozone/dist/pom.xml b/hadoop-ozone/dist/pom.xml
index 46277f9..82e8f69 100644
--- a/hadoop-ozone/dist/pom.xml
+++ b/hadoop-ozone/dist/pom.xml
@@ -28,7 +28,7 @@
   <properties>
     <file.encoding>UTF-8</file.encoding>
     <downloadSources>true</downloadSources>
-    <docker.ozone-runner.version>20220212-1</docker.ozone-runner.version>
+    <docker.ozone-runner.version>20220228-1</docker.ozone-runner.version>
     <docker.ozone-testkr5b.image>apache/ozone-testkrb5:20210419-1</docker.ozone-testkr5b.image>
   </properties>
 
diff --git a/hadoop-ozone/dist/src/main/compose/testlib.sh b/hadoop-ozone/dist/src/main/compose/testlib.sh
index f652d40..559f189 100755
--- a/hadoop-ozone/dist/src/main/compose/testlib.sh
+++ b/hadoop-ozone/dist/src/main/compose/testlib.sh
@@ -201,6 +201,10 @@ execute_robot_test(){
 
   copy_daemon_logs
 
+  if [[ ${rc} -gt 0 ]] && [[ ${rc} -le 250 ]]; then
+    create_stack_dumps
+  fi
+
   set -e
 
   if [[ ${rc} -gt 0 ]]; then
@@ -210,6 +214,17 @@ execute_robot_test(){
   return ${rc}
 }
 
+## @description Create stack dump of each java process in each container
+create_stack_dumps() {
+  local c pid procname
+  for c in $(docker-compose ps | cut -f1 -d' ' | grep -e datanode -e om -e recon -e s3g -e scm); do
+    while read -r pid procname; do
+      echo "jstack $pid > ${RESULT_DIR}/${c}_${procname}.stack"
+      docker exec "${c}" bash -c "jstack $pid" > "${RESULT_DIR}/${c}_${procname}.stack"
+    done < <(docker exec "${c}" bash -c "jps | grep -v Jps")
+  done
+}
+
 ## @description Copy any 'out' files for daemon processes to the result dir
 copy_daemon_logs() {
   local c f

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ozone.apache.org
For additional commands, e-mail: commits-help@ozone.apache.org