Skip to content

Commit

Permalink
Fixed thread rebounce condition
Browse files Browse the repository at this point in the history
Condition should be; thread not moving > 1 minute AND thread state = blocked (instead of OR)
  • Loading branch information
aionJoey authored Jul 11, 2018
1 parent 3bba51c commit a6d0ddf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ while $noInterrupt; do
for ((i=0; i<${#threads[@]}; ++i)); do
tTime=$(top -n1 -p $kPID -H | egrep -o "[0-9]{2}\.[0-9]{2} ${threads[i]}" | cut -d" " -f1)
tState=$(jstack -l $kPID | egrep -A1 "${threads[i]}" | egrep -o "State.*" | cut -d" " -f2)
if [[ $tTime == ${tPrev[i]} ]] || [[ $tState == "BLOCKED" ]]; then
if [[ $tTime == ${tPrev[i]} ]] && [[ $tState == "BLOCKED" ]]; then
echo "## ${threads[i]} THREAD DEAD ##"
(jstack -l $kPID | egrep -A1 "${threads[i]}") > threadDump_$countRebounce.txt
watching=false
Expand Down

0 comments on commit a6d0ddf

Please sign in to comment.