log stack trace on consensus failure

This commit is contained in:
Ethan Buchman
2017-10-02 23:34:06 -04:00
parent ed5511dc08
commit 8c6bd44929
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -6,6 +6,7 @@ import (
"fmt"
"path/filepath"
"reflect"
"runtime/debug"
"sync"
"time"
@@ -609,7 +610,7 @@ func (cs *ConsensusState) newStep() {
func (cs *ConsensusState) receiveRoutine(maxSteps int) {
defer func() {
if r := recover(); r != nil {
cs.Logger.Error("CONSENSUS FAILURE!!!", "err", r)
cs.Logger.Error("CONSENSUS FAILURE!!!", "err", r, "stack", string(debug.Stack()))
}
}()