Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

archive/tar: issue reading gzipped tar file #59701

Closed
jsteenb2 opened this issue Apr 18, 2023 · 2 comments
Closed

archive/tar: issue reading gzipped tar file #59701

jsteenb2 opened this issue Apr 18, 2023 · 2 comments
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@jsteenb2
Copy link

jsteenb2 commented Apr 18, 2023

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 Output
$ go env

GO111MODULE="on"
GOARCH="arm64"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/jsteenbergen/go"
GOPRIVATE="go.crwd.dev/*"
GOPROXY="https://go-proxy.crwd.dev"
GOTMPDIR=""
GOVCS=""
GOVERSION="go1.20.3"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-O2 -g"
CGO_FFLAGS="-O2 -g"
CGO_LDFLAGS="-O2 -g"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/nc/_09t16c10vl89ld5s0jkkg3h0000gn/T/go-build2783719398=/tmp/go-build -gno-record-gcc-switches -fno-common"

What 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 an unexpected 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 running tar -czvf in my shell to create a tar of a directory of the module with nothing but the vendor/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 module golang.org/x/sys from the first module I tested, is removed, the reading of the tar archive works fine though.

@seankhliao
Copy link
Member

please include code to reproduce the issue.

@seankhliao seankhliao added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Apr 18, 2023
@jsteenb2
Copy link
Author

ughhh found the issue. There was a global limit on the amount of bytes read. Once that was removed, able to read the tarchive again. The golang.org/x/sys kept getting tripped up on b/c of its size, it was 10x larger than anything else in the modules dependencies.

@jsteenb2 jsteenb2 closed this as not planned Won't fix, can't repro, duplicate, stale Apr 18, 2023
@golang golang locked and limited conversation to collaborators Apr 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

3 participants