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

runtime: deadlock in cmd/dist on darwin-amd64 #13664

Closed
broady opened this issue Dec 17, 2015 · 6 comments
Closed

runtime: deadlock in cmd/dist on darwin-amd64 #13664

broady opened this issue Dec 17, 2015 · 6 comments

Comments

@broady
Copy link
Contributor

broady commented Dec 17, 2015

This error occurred while building the go1.6 beta release:
$ release -user release -version go1.6beta1 -rev d0f472e99ad31ef3aa842800eff9861dab4778de -tools master -skip_tests

fatal error: all goroutines are asleep - deadlock!

goroutine 1 [chan receive (nil chan)]:
main.install(0x7fff5fbff5ef, 0x7)
    /usr/local/go/src/cmd/dist/build.go:504 +0x205
main.cmdinstall()
    /usr/local/go/src/cmd/dist/build.go:1144 +0xe5
main.xmain()
    /usr/local/go/src/cmd/dist/main.go:42 +0x1e9
main.main()
    /usr/local/go/src/cmd/dist/util.go:502 +0x58a

goroutine 20 [select]:
main.bghelper()
    /usr/local/go/src/cmd/dist/util.go:152 +0x152
created by main.bginit
    /usr/local/go/src/cmd/dist/util.go:145 +0x5a

goroutine 21 [select]:
main.bghelper()
    /usr/local/go/src/cmd/dist/util.go:152 +0x152
created by main.bginit
    /usr/local/go/src/cmd/dist/util.go:145 +0x5a

goroutine 22 [select]:
main.bghelper()
    /usr/local/go/src/cmd/dist/util.go:152 +0x152
created by main.bginit
    /usr/local/go/src/cmd/dist/util.go:145 +0x5a

goroutine 23 [select]:
main.bghelper()
    /usr/local/go/src/cmd/dist/util.go:152 +0x152
created by main.bginit
    /usr/local/go/src/cmd/dist/util.go:145 +0x5a

cc @aclements @bradfitz

@broady
Copy link
Contributor Author

broady commented Dec 17, 2015

windows-amd64: Error: go tool dist install runtime: exit status 1
fatal error: all goroutines are asleep - deadlock!

goroutine 1 [chan receive (nil chan)]:
main.install(0xc0820022b0, 0x7)
    c:/go/src/cmd/dist/build.go:504 +0x206
main.cmdinstall()
    c:/go/src/cmd/dist/build.go:1144 +0xec
main.xmain()
    c:/go/src/cmd/dist/main.go:42 +0x1f0
main.main()
    c:/go/src/cmd/dist/util.go:502 +0x596

goroutine 5 [select]:
main.bghelper()
    c:/go/src/cmd/dist/util.go:152 +0x159
created by main.bginit
    c:/go/src/cmd/dist/util.go:145 +0x61

goroutine 6 [select]:
main.bghelper()
    c:/go/src/cmd/dist/util.go:152 +0x159
created by main.bginit
    c:/go/src/cmd/dist/util.go:145 +0x61

goroutine 7 [select]:
main.bghelper()
    c:/go/src/cmd/dist/util.go:152 +0x159
created by main.bginit
    c:/go/src/cmd/dist/util.go:145 +0x61

goroutine 8 [select]:
main.bghelper()
    c:/go/src/cmd/dist/util.go:152 +0x159
created by main.bginit
    c:/go/src/cmd/dist/util.go:145 +0x61
linux-amd64: Error: go tool dist install runtime: exit status 1
fatal error: all goroutines are asleep - deadlock!

goroutine 1 [chan receive (nil chan)]:
main.install(0x7fff663b9d59, 0x7)
    /usr/local/go/src/cmd/dist/build.go:504 +0x205
main.cmdinstall()
    /usr/local/go/src/cmd/dist/build.go:1144 +0xe5
main.xmain()
    /usr/local/go/src/cmd/dist/main.go:42 +0x1e9
main.main()
    /usr/local/go/src/cmd/dist/util.go:502 +0x58a

goroutine 6 [select]:
main.bghelper()
    /usr/local/go/src/cmd/dist/util.go:152 +0x152
created by main.bginit
    /usr/local/go/src/cmd/dist/util.go:145 +0x5a

goroutine 7 [select]:
main.bghelper()
    /usr/local/go/src/cmd/dist/util.go:152 +0x152
created by main.bginit
    /usr/local/go/src/cmd/dist/util.go:145 +0x5a

goroutine 8 [select]:
main.bghelper()
    /usr/local/go/src/cmd/dist/util.go:152 +0x152
created by main.bginit
    /usr/local/go/src/cmd/dist/util.go:145 +0x5a

goroutine 9 [select]:
main.bghelper()
    /usr/local/go/src/cmd/dist/util.go:152 +0x152
created by main.bginit
    /usr/local/go/src/cmd/dist/util.go:145 +0x5a
reebsd-amd64: Error: go tool dist install runtime: exit status 1
fatal error: all goroutines are asleep - deadlock!

goroutine 1 [chan receive (nil chan)]:
main.install(0x7fffffffed44, 0x7)
    /usr/local/go/src/cmd/dist/build.go:504 +0x205
main.cmdinstall()
    /usr/local/go/src/cmd/dist/build.go:1144 +0xe5
main.xmain()
    /usr/local/go/src/cmd/dist/main.go:42 +0x1e9
main.main()
    /usr/local/go/src/cmd/dist/util.go:502 +0x58a

goroutine 6 [select]:
main.bghelper()
    /usr/local/go/src/cmd/dist/util.go:152 +0x152
created by main.bginit
    /usr/local/go/src/cmd/dist/util.go:145 +0x5a

goroutine 7 [select]:
main.bghelper()
    /usr/local/go/src/cmd/dist/util.go:152 +0x152
created by main.bginit
    /usr/local/go/src/cmd/dist/util.go:145 +0x5a

goroutine 8 [select]:
main.bghelper()
    /usr/local/go/src/cmd/dist/util.go:152 +0x152
created by main.bginit
    /usr/local/go/src/cmd/dist/util.go:145 +0x5a

goroutine 9 [select]:
main.bghelper()
    /usr/local/go/src/cmd/dist/util.go:152 +0x152
created by main.bginit
    /usr/local/go/src/cmd/dist/util.go:145 +0x5a

@broady
Copy link
Contributor Author

broady commented Dec 17, 2015

cc @rsc

@broady
Copy link
Contributor Author

broady commented Dec 17, 2015

@bradfitz
Copy link
Contributor

I suspect this is something about an old dist building a new runtime with dependencies (@michaelmatloob's stuff). Oddly some of the release builds succeeded, making me think it's a builder configuration/environment problem. Yet the main builders using the same configs succeed.

@broady
Copy link
Contributor Author

broady commented Dec 17, 2015

It happens when building the race detector:

2015/12/17 14:50:30 linux-amd64: Start.
2015/12/17 14:50:30 linux-amd64: Creating buildlet.
2015/12/17 14:51:17 linux-amd64: Pushing source to VM.
2015/12/17 14:52:03 linux-amd64: Writing VERSION file.
2015/12/17 14:52:04 linux-amd64: Cleaning goroot (pre-build).
2015/12/17 14:52:04 linux-amd64: Building.
2015/12/17 14:53:20 linux-amd64: Building race detector.
2015/12/17 14:53:20 linux-amd64: Error: go tool dist install runtime: exit status 1

@bradfitz
Copy link
Contributor

Hah, this is due to a old workaround in x/build/cmd/release for old go install -a bugs:

                b.logf("Building race detector.")

                // Because on release branches, go install -a std is a NOP,                                                                                                  
                // we have to resort to delete pkg/$GOOS_$GOARCH, install -race,                                                                                             
                // and then reinstall std so that we're not left with a slower,                                                                                              
                // race-enabled cmd/go, etc.                                                                                                                                 
                if err := client.RemoveAll(path.Join(goDir, "pkg", b.OS+"_"+b.Arch)); err != nil {
                        return err
                }
                if err := runGo("tool", "dist", "install", "runtime"); err != nil {
                    return err
                }
                if err := runGo("install", "-race", "std"); err != nil {
                        return err
                }
                if err := runGo("install", "std"); err != nil {
                        return err
                }

@golang golang locked and limited conversation to collaborators Dec 29, 2016
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