Files
containerd/runtime
Wei Fu 449912857d fix: shimv1 leak issue
```go
// Delete the initial process and container
func (s *Service) Delete(ctx context.Context, r *ptypes.Empty) (*shimapi.DeleteResponse, error) {
        p, err := s.getInitProcess()
        if err != nil {
                return nil, err
        }
        if err := p.Delete(ctx); err != nil {
                return nil, errdefs.ToGRPC(err)
        }

	// The client might canceled the request but the shim service still
	// moved on. The `delete(s.processes, s.id)` was executed
	// successfully. So the next Delete call will return `container
	// must be created` error. The client side should ignore this
	// issue.

        s.mu.Lock()
        delete(s.processes, s.id)
        s.mu.Unlock()
        s.platform.Close()
        return &shimapi.DeleteResponse{
                ExitStatus: uint32(p.ExitStatus()),
                ExitedAt:   protobuf.ToTimestamp(p.ExitedAt()),
                Pid:        uint32(p.Pid()),
        }, nil
}
```

introduced by #9003
fixes: #9309

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-11-07 22:21:37 +08:00
..
2022-07-22 19:38:45 -07:00
2023-11-07 22:21:37 +08:00
2018-02-19 10:32:26 +09:00
2021-07-23 10:04:46 -07:00
2022-08-10 14:02:53 -07:00