Skip to content

Commit

Permalink
add dump goroutines morpc fatal cherry (#12901)
Browse files Browse the repository at this point in the history
issue [#1826](matrixorigin/MO-Cloud#1826)
add dump goroutines morpc fatal cherry
  • Loading branch information
zhangxu19830126 committed Nov 22, 2023
1 parent aca6462 commit 03cb24e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/common/morpc/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"fmt"
"math"
"net"
"os"
"runtime"
"sync"
"sync/atomic"
Expand All @@ -31,6 +32,7 @@ import (
"github.com/matrixorigin/matrixone/pkg/common/stopper"
"github.com/matrixorigin/matrixone/pkg/logutil"
"github.com/matrixorigin/matrixone/pkg/util/errutil"
"github.com/matrixorigin/matrixone/pkg/util/profile"
"go.uber.org/zap"
)

Expand Down Expand Up @@ -895,6 +897,8 @@ func (rb *remoteBackend) scheduleResetConn() {
case rb.resetConnC <- struct{}{}:
rb.logger.Debug("schedule reset remote connection")
case <-time.After(time.Second * 10):
// dump all goroutines to stderr
profile.ProfileGoroutine(os.Stderr, 2)
rb.logger.Fatal("BUG: schedule reset remote connection timeout")
}
}
Expand Down

0 comments on commit 03cb24e

Please sign in to comment.