Skip to content

cmd/link: "corrupt input" fatal error with no further detail #15012

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

Closed
pwaller opened this issue Mar 29, 2016 · 3 comments
Closed

cmd/link: "corrupt input" fatal error with no further detail #15012

pwaller opened this issue Mar 29, 2016 · 3 comments

Comments

@pwaller
Copy link
Contributor

pwaller commented Mar 29, 2016

Version, Architecture: go1.6, linux/amd64

What did you do?

Interrupt a go build (possibly with SIGKILL), and then attempt to build again.

What did you expect to see?

A successful build, or an error message telling me where the problem is and what to do.

What did you see instead?

# go build -v my/package/name
my/package/name
# my/package/name
2016/03/29 09:56:49 corrupt input

Or, with -x:

# go build -x -v my/package/name
WORK=/tmp/go-build146923544
my/package/name
mkdir -p $WORK/my/package/name/_obj/
mkdir -p $WORK/my/package/name/_obj/exe/
cd /go/src/my/package/name
/usr/local/go/pkg/tool/linux_amd64/compile -o $WORK/my/package/name.a -trimpath $WORK -p main -complete -buildid 7ffdb0cebeafa80bed1d95717d6a97c933f6e933 -D _/go/src/my/package/name -I $WORK -I /go/pkg/linux_amd64 -pack ./main.go
cd .
/usr/local/go/pkg/tool/linux_amd64/link -o $WORK/my/package/name/_obj/exe/a.out -L $WORK -L /go/pkg/linux_amd64 -extld=gcc -buildmode=exe -buildid=7ffdb0cebeafa80bed1d95717d6a97c933f6e933 $WORK/my/package/name.a
# my/package/name
2016/03/29 10:02:35 corrupt input

In our build system that just showed up as "corrupt input", with no further context. I had to hunt for the message, it's coming from here. It was easy for me as an experienced developer to know that I should probably delete my $GOPATH/pkg directory, but others might not easily find where the error message is coming from and determine what to do.

Unfortunately I cannot provide the corrupted input, I cannot trivially determine which file is causing the problem and it is in private code. I will keep my corrupted pkg directory around for a few days in case anyone wants me to check anything, but otherwise I presume it is not useful.

@pwaller
Copy link
Contributor Author

pwaller commented Mar 29, 2016

By the way, because of the origin of the error message I guess it could be that SIGKILL is not the root cause, I could genuinely be experiencing bit rot, or some other bug. I see that very few others have ever hit this message and reported it publicly.

I also note that the code is littered with Fatal and panic calls with no other context, so it may be that the fixing "this problem" (corruption causing error messages with no further context) would require substantial work.

@ianlancetaylor ianlancetaylor added this to the Unplanned milestone Mar 29, 2016
@wab301
Copy link

wab301 commented May 3, 2017

I've trigging this errors, It may be your develop environment has changed so you should delete your $GOPATH/pkg and build again. I guess.

@bradfitz
Copy link
Contributor

bradfitz commented May 3, 2017

So much has changed since Go 1.6 that I'm going to close this bug. We never got reports of this from others and never saw it ourselves on our builders either.

@bradfitz bradfitz closed this as completed May 3, 2017
@golang golang locked and limited conversation to collaborators May 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants