hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From syuanji...@apache.org
Subject [14/22] hbase git commit: HBASE-14772 Improve zombie detector; be more discerning; ADDENDUM some cleanup in zombie script and run it in test-patch too .. just trying it
Date Tue, 10 Nov 2015 19:05:57 GMT
 HBASE-14772 Improve zombie detector; be more discerning; ADDENDUM some cleanup in zombie script
and run it in test-patch too .. just trying it


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/1cbcf117
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/1cbcf117
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/1cbcf117

Branch: refs/heads/hbase-12439
Commit: 1cbcf1175e6ce497936f12c60fb2e897833ace39
Parents: 6b9d30d
Author: stack <stack@apache.org>
Authored: Sun Nov 8 11:09:31 2015 -1000
Committer: stack <stack@apache.org>
Committed: Sun Nov 8 11:09:31 2015 -1000

----------------------------------------------------------------------
 dev-support/test-patch.sh      |  1 +
 dev-support/zombie-detector.sh | 22 +++++++++-------------
 2 files changed, 10 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/1cbcf117/dev-support/test-patch.sh
----------------------------------------------------------------------
diff --git a/dev-support/test-patch.sh b/dev-support/test-patch.sh
index 6c973a6..4ad37ab 100755
--- a/dev-support/test-patch.sh
+++ b/dev-support/test-patch.sh
@@ -875,6 +875,7 @@ runTests () {
   # NOTE!!!! The below code has been copied and pasted up into jenkins as an post-build task.
   # Make sure to update it too if you change the below (Or extract below into script to checkout
   # to run post-build)
+  $BASEDIR/dev-support/zombie-detector.sh ${BUILD_ID}
   ZOMBIE_TESTS_COUNT=`zombieCount`
   if [[ $ZOMBIE_TESTS_COUNT != 0 ]] ; then
     # It seems sometimes the tests are not dying immediately. Let's give them 30s

http://git-wip-us.apache.org/repos/asf/hbase/blob/1cbcf117/dev-support/zombie-detector.sh
----------------------------------------------------------------------
diff --git a/dev-support/zombie-detector.sh b/dev-support/zombie-detector.sh
index 57c1374..56cce48 100755
--- a/dev-support/zombie-detector.sh
+++ b/dev-support/zombie-detector.sh
@@ -23,8 +23,7 @@
 # TODO: format output to suit context -- test-patch, jenkins or dev env
 
 #set -x
-# REMOVE
-printenv
+# printenv
 
 ### Setup some variables.  
 bindir=$(dirname $0)
@@ -32,7 +31,7 @@ bindir=$(dirname $0)
 # This key is set by our surefire configuration up in the main pom.xml
 # This key needs to match the key we set up there.
 HBASE_BUILD_ID_KEY="hbase.build.id="
-JENKINS=false
+JENKINS=
 
 PS=${PS:-ps}
 AWK=${AWK:-awk}
@@ -90,12 +89,6 @@ parseArgs() {
     printUsage
     exit 1
   fi
-  if [[ $JENKINS == "true" ]] ; then
-    echo "Running in Jenkins mode"
-  else
-    echo "Running in developer mode"
-    JENKINS=false
-  fi
 }
 
 ### Return list of the processes found with passed build id.
@@ -109,8 +102,8 @@ zombies () {
   # xargs trims white space before and after the count
   ZOMBIE_TESTS_COUNT=`echo "${ZOMBIES}"|wc -l|xargs`
   if [[ $ZOMBIE_TESTS_COUNT != 0 ]] ; then
-    wait=15
-    echo "Found ${ZOMBIE_TESTS_COUNT} suspicious java process(es); waiting ${wait}s to see
if just slow to stop"
+    wait=30
+    echo "`date` Found ${ZOMBIE_TESTS_COUNT} suspicious java process(es); waiting ${wait}s
to see if just slow to stop"
     sleep ${wait}
     PIDS=`echo "${ZOMBIES}"|${AWK} '{print $1}'`
     ZOMBIE_TESTS_COUNT=0
@@ -120,7 +113,7 @@ zombies () {
       PS_OUTPUT=`ps -p $pid | tail +2 | grep -e "${HBASE_BUILD_TAG}"`
       if [[ ! -z "${PS_OUTPUT}" ]]
       then
-        echo "Zombie: $PS_OUTPUT"
+        echo "`date` Zombie: $PS_OUTPUT"
         let "ZOMBIE_TESTS_COUNT+=1"
         PS_STACK=`jstack $pid | grep -e "\.Test" | grep -e "\.java"| head -3`
         echo "${PS_STACK}"
@@ -129,11 +122,14 @@ zombies () {
     done
     if [[ $ZOMBIE_TESTS_COUNT != 0 ]]
     then
+      echo "`date` There are ${ZOMBIE_TESTS_COUNT} possible zombie test(s)."
       # If JIRA_COMMENT in environment, append our findings to it
       JIRA_COMMENT="$JIRA_COMMENT
-      {color:red}-1 core zombie tests{color}.  There are ${ZOMBIE_TESTS_COUNT} possible zombie
test(s): ${ZB_STACK}"
+        {color:red}-1 core zombie tests{color}.  There are ${ZOMBIE_TESTS_COUNT} possible
zombie test(s): ${ZB_STACK}"
       # Exit with error
       exit 1
+    else
+      echo "We're ok: there is no zombie test"
     fi
   fi
 }


Mime
View raw message