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

cmd/go: install parallelism is broken #4105

Closed
niemeyer opened this issue Sep 19, 2012 · 7 comments
Closed

cmd/go: install parallelism is broken #4105

niemeyer opened this issue Sep 19, 2012 · 7 comments
Milestone

Comments

@niemeyer
Copy link
Contributor

This script:

    #!/bin/bash 
    set -e 
    while true; do 
            date 
            rm -rf $GOPATH/pkg/linux_amd64 
            GOMAXPROCS=1 go install -x -work launchpad.net/juju-core/cmd/... 
    done

Breaks down after a couple of tries with errors like:

    pack: non-object file $WORK/launchpad.net/juju-core/cmd/_obj/_go_.6

Preserving the working directory with -work or hacking the code to disable the mkdir
cache do not fix the problem.

Running it without parallelism with -p 1 makes it work reliably.

The full log of such a broken build is attached.

Attachments:

  1. log.txt (37653 bytes)
@niemeyer
Copy link
Contributor Author

Comment 1:

Owner changed to ---.

@rsc
Copy link
Contributor

rsc commented Sep 20, 2012

Comment 2:

Does go list launchpad.net/juju-core/cmd/... have any duplicates?

@niemeyer
Copy link
Contributor Author

Comment 3:

% go list launchpad.net/juju-core/cmd/... 
launchpad.net/juju-core/cmd/
launchpad.net/juju-core/cmd/juju
launchpad.net/juju-core/cmd/jujuc
launchpad.net/juju-core/cmd/jujuc/server
launchpad.net/juju-core/cmd/jujud

@rsc
Copy link
Contributor

rsc commented Oct 6, 2012

Comment 4:

Labels changed: added priority-later, go1.1, removed priority-triage.

Status changed to Accepted.

@rsc
Copy link
Contributor

rsc commented Dec 10, 2012

Comment 5:

Labels changed: added size-m.

@rsc
Copy link
Contributor

rsc commented Jan 31, 2013

Comment 6:

Does this still happen for you? I believe the problem is that the wildcard x/... is
including x/ (instead of x) as one of its expansions. Other things depend on juju/cmd
and so the build ends up building both juju/cmd/ and juju/cmd, which end up stepping on
each other. You can see the problem in the 'go list' output you gave, where the first
line listed ends in a slash. However, I cannot reproduce this locally: go list hash/...
lists 'hash' not 'hash/'. Perhaps another cleanup fixed this.

@niemeyer
Copy link
Contributor Author

Comment 7:

I can confirm that the slash went away, and that retrying the operation doesn't break in
the same way anymore (related or not).
Thanks for pinging.

Status changed to Fixed.

@rsc rsc added this to the Go1.1 milestone Apr 14, 2015
@rsc rsc removed the go1.1 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
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

3 participants