From f12c1285599a1519273bfa68472c598b1fd635bf Mon Sep 17 00:00:00 2001 From: Nick Cabatoff Date: Mon, 19 Jun 2023 11:08:34 -0400 Subject: [PATCH] Don't exit just because we think there was a possible deadlock (#21342) --- changelog/21342.txt | 3 +++ command/server.go | 4 ++++ 2 files changed, 7 insertions(+) create mode 100644 changelog/21342.txt diff --git a/changelog/21342.txt b/changelog/21342.txt new file mode 100644 index 000000000000..c1d8cd018bb3 --- /dev/null +++ b/changelog/21342.txt @@ -0,0 +1,3 @@ +```release-note:bug +core: Don't exit just because we think there's a potential deadlock. +``` diff --git a/command/server.go b/command/server.go index 73b6659e906a..f5153e57d4a0 100644 --- a/command/server.go +++ b/command/server.go @@ -63,6 +63,7 @@ import ( "github.com/mitchellh/go-testing-interface" "github.com/pkg/errors" "github.com/posener/complete" + "github.com/sasha-s/go-deadlock" "go.uber.org/atomic" "golang.org/x/net/http/httpproxy" "google.golang.org/grpc/grpclog" @@ -1001,6 +1002,9 @@ func (c *ServerCommand) Run(args []string) int { return 1 } + // Don't exit just because we saw a potential deadlock. + deadlock.Opts.OnPotentialDeadlock = func() {} + c.logGate = gatedwriter.NewWriter(os.Stderr) c.logWriter = c.logGate