Race: clientStream.Send and Close both reach ttrpc's unsynchronized
localClosed flag. readByteStream.window is written by
the window goroutine and by Read, so make it atomic.
Deadlock: Read the window by bytes copied instead of bytes
received, so a short read leaves the window above windowSize.
Signed-off-by: Jing Chen <milantracy@gmail.com>
Some proxy stream setup and receive paths still returned raw RPC
status errors while neighboring proxy methods normalized them with
errgrpc.ToNative. This made errdefs checks depend on which proxy API
surfaced the same remote failure.
Normalize event subscription setup and receive errors, and streaming
stream creation errors, while preserving io.EOF for completed receive
streams.
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Uses the new github.com/containerd/errdefs/pkg module which is intended
to hold less stable utility functions separately from the stable
github.com/containerd/errdefs error types.
Includes temporary update to hcsshim until a release is cut there
Signed-off-by: Derek McGowan <derek@mcg.dev>