containerd/archive
Derek McGowan db358a9fd2
Fix panic when bufio Reader called in 2 goroutines
A panic was seen related to the buffer being reset in
one goroutine while being read in another. In the case
of pigz an early cancellation will cause the reader to
close, resetting the buffer and signaling the process
to shut down, but races since the process must stop
reading before the reset otherwise the a panic may occur.
This fix guarantees that the bufio is always reset and
returned to the pool on the same goroutine that is
doing the read. If a buffer is not fully read the
buffered reader should just be discarded and not
returned back to the pool.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2018-09-26 18:11:30 -07:00
..
compression Fix panic when bufio Reader called in 2 goroutines 2018-09-26 18:11:30 -07:00
issues_test.go Move testutils to pkg 2018-05-22 17:08:38 -04:00
strconv.go build: bump to Go 1.10 2018-02-26 16:47:24 -08:00
tar_opts_unix.go Add install support for binary images 2018-08-02 17:11:29 -04:00
tar_opts_windows.go Add install support for binary images 2018-08-02 17:11:29 -04:00
tar_opts.go Add lib support as an option 2018-08-02 17:11:29 -04:00
tar_test.go bugfix: allow hardlink to softlink file 2018-07-19 15:13:50 +08:00
tar_unix.go Merge pull request #2163 from AkihiroSuda/userns-mknod 2018-03-01 11:37:34 -08:00
tar_windows.go Fixup archive/tar_windows.go type 2018-08-20 12:02:04 -07:00
tar.go Add lib support as an option 2018-08-02 17:11:29 -04:00
time_darwin.go Licence header added 2018-02-19 10:32:26 +09:00
time_unix.go Licence header added 2018-02-19 10:32:26 +09:00
time_windows.go Licence header added 2018-02-19 10:32:26 +09:00
time.go Licence header added 2018-02-19 10:32:26 +09:00