cmd/go: install parallelism is broken #4105

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

Comments

Projects
None yet
3 participants
Contributor

niemeyer commented Sep 19, 2012

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)
Contributor

niemeyer commented Sep 19, 2012

Comment 1:

Owner changed to ---.

Contributor

rsc commented Sep 20, 2012

Comment 2:

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

niemeyer commented Sep 26, 2012

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
Contributor

rsc commented Oct 6, 2012

Comment 4:

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

Status changed to Accepted.

Contributor

rsc commented Dec 10, 2012

Comment 5:

Labels changed: added size-m.

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.
Contributor

niemeyer commented Jan 31, 2013

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.

@niemeyer niemeyer added fixed labels Jan 31, 2013

@rsc rsc added this to the Go1.1 milestone Apr 14, 2015

@rsc rsc removed the go1.1 label Apr 14, 2015

@gopherbot gopherbot 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.