diff --git a/runtime/v1/shim/service.go b/runtime/v1/shim/service.go index 2f5a8c2f2..50ac869d4 100644 --- a/runtime/v1/shim/service.go +++ b/runtime/v1/shim/service.go @@ -397,6 +397,9 @@ func (s *Service) ListPids(ctx context.Context, r *shimapi.ListPidsRequest) (*sh return nil, errdefs.ToGRPC(err) } var processes []*task.ProcessInfo + + s.mu.Lock() + defer s.mu.Unlock() for _, pid := range pids { pInfo := task.ProcessInfo{ Pid: pid,