Skip to content

Commit

Permalink
split stacktrace on multiple log lines, xfer core to bucket
Browse files Browse the repository at this point in the history
  • Loading branch information
jredbeard committed Jul 31, 2017
1 parent 88d9098 commit 8e40c65
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion contrib/paas-sv-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ if [[ ! $? -eq 0 ]]; then
if [[ -e /tmp/core.$SAVED_PID ]]; then
gdb --batch --quiet -ex "thread apply all bt full" -ex "quit" /usr/local/steemd-full/bin/steemd /tmp/core.$SAVED_PID >> /tmp/stacktrace
STACKTRACE=`cat /tmp/stacktrace`
echo NOTIFYALERT! steemdsync stacktrace from coredump: $STACKTRACE
echo NOTIFYALERT! steemdsync stacktrace from coredump:
for ((i=0;i<${#STACKTRACE};i+=120)); do
echo "${STACKTRACE:i:120}"
done
CORE_FILE_NAME=coredump-`date '+%Y%m%d-%H%M%S'`.$SAVED_PID
aws s3 cp /tmp/core.$SAVED_PID s3://$S3_BUCKET/$CORE_FILE_NAME
fi
RUN_SV_PID=`pgrep -f /etc/service/steemd`
kill -9 $RUN_SV_PID
Expand Down
7 changes: 6 additions & 1 deletion contrib/sync-sv-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ if [[ ! $? -eq 0 ]]; then
if [[ -e /tmp/core.$SAVED_PID ]]; then
gdb --batch --quiet -ex "thread apply all bt full" -ex "quit" /usr/local/steemd-full/bin/steemd /tmp/core.$SAVED_PID >> /tmp/stacktrace
STACKTRACE=`cat /tmp/stacktrace`
echo NOTIFYALERT! steemdsync stacktrace from coredump: $STACKTRACE
echo NOTIFYALERT! steemdsync stacktrace from coredump:
for ((i=0;i<${#STACKTRACE};i+=120)); do
echo "${STACKTRACE:i:120}"
done
CORE_FILE_NAME=coredump-`date '+%Y%m%d-%H%M%S'`.$SAVED_PID
aws s3 cp /tmp/core.$SAVED_PID s3://$S3_BUCKET/$CORE_FILE_NAME
fi
RUN_SV_PID=`pgrep -f /etc/service/steemd`
kill -9 $RUN_SV_PID
Expand Down

0 comments on commit 8e40c65

Please sign in to comment.