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

x/build/cmd/gomote: gettar with a single file generates an invalid tarball #64195

Open
cherrymui opened this issue Nov 16, 2023 · 2 comments
Open
Assignees
Labels
Builders x/build issues (builders, bots, dashboards) NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@cherrymui
Copy link
Member

cherrymui commented Nov 16, 2023

When using gomote gettar -dir=file to get a single file (not a directory), it generates an invalid tarball.

$ gomote gettar -dir=hello.go $VM
# Downloading tarball for "cherryyz-linux-amd64-0" to "cherryyz-linux-amd64-0.tar.gz"...
$ tar tf cherryyz-linux-amd64-0.tar.gz 
tar: Archive entry has empty or unreadable filename ... skipping.
tar: Error exit delayed from previous errors.

Getting a directory works fine, resulting in a valid tarball.

The racebuild command has code that uses gettar to retrieve a single file https://cs.opensource.google/go/x/build/+/master:cmd/racebuild/racebuild.go;l=526 , so I think it worked before, and regressed at some point.

If we decide that getting a single file is not supported and must be directory (for racebuild that is fine, we can arrange it to do that), it should emit an error, instead of silently producing a bad tar file.

@gopherbot gopherbot added the Builders x/build issues (builders, bots, dashboards) label Nov 16, 2023
@gopherbot gopherbot added this to the Unreleased milestone Nov 16, 2023
@gopherbot
Copy link

Change https://go.dev/cl/543035 mentions this issue: runtime/race: update race syso files to support atomic And, Or

@gopherbot
Copy link

Change https://go.dev/cl/543015 mentions this issue: cmd/racebuild: update with new builder configurations

gopherbot pushed a commit to golang/build that referenced this issue Nov 19, 2023
There have been a number of updates on the builders as well as in
the Go repo. This CL updates racebuild accordingly.

Add a Skip boolean to indicate platforms that are skipped by
default. This includes openbsd, for which the upstream TSAN
support is removed (#52090), and darwin/amd64v3, for which
currently the main Go repo doesn't use.

Specify SubArch for all AMD64 platforms. So the naming and file
path match what the main Go repo uses.

openbsd-amd64-70 builder is gone. Change to openbsd-amd64-72.

LLVM repo is very large. A git checkout takes a lot of disk space.
Some builders, however, don't have much disk space. Downloading a
zip file for the source code at the particular LLVM commit, and
extracting only compiler-rt gets all what we need, with a smaller
disk space usage.

Gomote gettar no longer works for retrieving a single file
(#64195). Work around it by putting the syso file in a directory
and getting that directory.

Also, gomote gettar no longer produces the tarball to stdout. It
writes a file instead. Change the download logic accordingly.

For golang/go#64195.

Change-Id: I49724d342a9278c977eb8d3fc1b9b32ea10e0b9a
Reviewed-on: https://go-review.googlesource.com/c/build/+/543015
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Mauri de Souza Meneguzzo <mauri870@gmail.com>
Reviewed-by: Than McIntosh <thanm@google.com>
@mknyszek mknyszek self-assigned this Nov 20, 2023
@mknyszek mknyszek added the NeedsFix The path to resolution is known, but the work has not been done. label Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Builders x/build issues (builders, bots, dashboards) NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

3 participants