Don't exit just because we think there was a possible deadlock (#21342)

This commit is contained in:
Nick Cabatoff 2023-06-19 11:08:34 -04:00 committed by GitHub
parent 8af6780325
commit f12c128559
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

3
changelog/21342.txt Normal file
View file

@ -0,0 +1,3 @@
```release-note:bug
core: Don't exit just because we think there's a potential deadlock.
```

View file

@ -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