Merge pull request #6060 from ls-ggg/6055/service.mu-deadlock

runtime:all APIs are hang in the service.mu
This commit is contained in:
Peng Tao
2023-01-18 10:50:00 +08:00
committed by GitHub

View File

@@ -120,10 +120,12 @@ func watchSandbox(ctx context.Context, s *service) {
if err == nil {
return
}
s.monitor = nil
s.mu.Lock()
defer s.mu.Unlock()
s.monitor = nil
// sandbox malfunctioning, cleanup as much as we can
shimLog.WithError(err).Warn("sandbox stopped unexpectedly")
err = s.sandbox.Stop(ctx, true)