archive/tar: issue reading gzipped tar file #59701
Labels
FrozenDueToAge
WaitingForInfo
Issue is not actionable because of missing required information, which needs to be provided.
What version of Go are you using (
go version
)?go version go1.20.3 darwin/arm64
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I was initially attempting to tar and gzip compress a module. I had run
go mod vendor
in this module to have all the module deps available in the tar. I quickly ran into errors in the tar reader (no issues with the tar writer). I get anunexpected EOF
error.I spent time bisecting this. I narrowed it down to a single dependency, the
golang.org/x/sys
(from go.mod file:golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab
) module. I then remove the go code that was creating the compresssed tarchive and replaced it with with runningtar -czvf
in my shell to create a tar of a directory of the module with nothing but thevendor/golang.org/x/sys
directory. The issue reproduces.example here: testtar.tar.gz
What did you expect to see?
I expected reading the tar would work without a hitch.
What did you see instead?
I see an
unexpected EOF
error. When the modulegolang.org/x/sys
from the first module I tested, is removed, the reading of the tar archive works fine though.The text was updated successfully, but these errors were encountered: