You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found this when playing around with the reproducer for #38. It seems as though if you do an io.Copy of a stream (which uses z.WriteTo), followed by ReadAll (which uses z.Read) you end up with a goroutine deadlock. https://play.golang.org/p/x6u6JSoKd2t
io.Copy at start of stream: n=6, err=<nil>
fatal error: all goroutines are asleep - deadlock!
goroutine 1 [chan send]:
github.com/klauspost/pgzip.(*Reader).Read(0xc00006ea80, 0xc000120000, 0x200, 0x200, 0xc000120000, 0x0, 0x0)
/tmp/gopath805285542/pkg/mod/github.com/klauspost/[email protected]/gunzip.go:473 +0xfe
bytes.(*Buffer).ReadFrom(0xc000043e80, 0x5055a0, 0xc00006ea80, 0xc000062a90, 0xc00011e000, 0x29)
/usr/local/go-faketime/src/bytes/buffer.go:204 +0xb1
io/ioutil.readAll(0x5055a0, 0xc00006ea80, 0x200, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/go-faketime/src/io/ioutil/ioutil.go:36 +0xe5
io/ioutil.ReadAll(...)
/usr/local/go-faketime/src/io/ioutil/ioutil.go:45
main.main()
/tmp/sandbox128643491/prog.go:30 +0x1fc
Program exited: status 2.
The text was updated successfully, but these errors were encountered:
cyphar
changed the title
goroutine deadlock if Read is called after WriteTo end of stream
goroutine deadlock if WriteTo is called after end of stream
Feb 19, 2021
cyphar
changed the title
goroutine deadlock if WriteTo is called after end of stream
goroutine deadlock if Read or WriteTo is called after WriteTo end of stream
Feb 19, 2021
I found this when playing around with the reproducer for #38. It seems as though if you do an
io.Copy
of a stream (which usesz.WriteTo
), followed byReadAll
(which usesz.Read
) you end up with a goroutine deadlock. https://play.golang.org/p/x6u6JSoKd2tThe text was updated successfully, but these errors were encountered: