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/vgo: possible deadlock during vgo install #25919

Closed
pwaller opened this issue Jun 16, 2018 · 4 comments

Comments

@pwaller
Copy link
Contributor

commented Jun 16, 2018

What version of Go are you using (go version)?

$ go version
go version go1.10 linux/amd64
$ git version
git version 2.14.1
$ vgo version
go version go1.10 linux/amd64 vgo:2018-02-20.1

vgo is at golang/vgo@22e2390, June 15th.

Does this issue reproduce with the latest release?

Not the latest version of Go, but is the latest version of vgo. I think there is likely interesting information in the stack trace below in any case.

What operating system and processor architecture are you using (go env)?

linux/amd64

What did you do?

Try to do vgo install -v . on a fresh system with https://github.com/pwaller/vgo-use-dockerclient as $PWD.

Possibly relevant, I have pressed CTRL-C and re-run the command at least once.

What did you expect to see?

Progress being made, network activity, git processes.

What did you see instead?

vgo install no longer prints log statements and makes no progress after a few minutes. No network or CPU activity, no processes being invoked, no git commands in flight waiting to complete, as monitored with execsnoop and pgrep -f git, dstat -n.

I captured the following stack trace with SIGQUIT, which at first glance appears to indicate that all goroutines are waiting on conditions, locks and signals?


Click to expand stack trace

^\SIGQUIT: quit
PC=0x459161 m=0 sigcode=128

goroutine 0 [idle]:
runtime.futex(0xbbde08, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7ffec748ebc0, 0x410a3b, ...)
	/home/pwaller/sdk/go1.10/src/runtime/sys_linux_amd64.s:526 +0x21
runtime.futexsleep(0xbbde08, 0x0, 0xffffffffffffffff)
	/home/pwaller/sdk/go1.10/src/runtime/os_linux.go:45 +0x4b
runtime.notesleep(0xbbde08)
	/home/pwaller/sdk/go1.10/src/runtime/lock_futex.go:151 +0x9b
runtime.stopm()
	/home/pwaller/sdk/go1.10/src/runtime/proc.go:1947 +0xe5
runtime.findrunnable(0xc42003af00, 0x0)
	/home/pwaller/sdk/go1.10/src/runtime/proc.go:2410 +0x50c
runtime.schedule()
	/home/pwaller/sdk/go1.10/src/runtime/proc.go:2536 +0x13b
runtime.goexit0(0xc420083080)
	/home/pwaller/sdk/go1.10/src/runtime/proc.go:2708 +0x251
runtime.mcall(0x0)
	/home/pwaller/sdk/go1.10/src/runtime/asm_amd64.s:351 +0x5b

goroutine 1 [semacquire, 2 minutes]:
sync.runtime_SemacquireMutex(0xc420302f8c, 0xc420397100)
	/home/pwaller/sdk/go1.10/src/runtime/sema.go:71 +0x3d
sync.(*Mutex).Lock(0xc420302f88)
	/home/pwaller/sdk/go1.10/src/sync/mutex.go:134 +0x108
golang.org/x/vgo/vendor/cmd/go/internal/modfetch.(*cachingRepo).Stat.func1(0x0, 0x0)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/modfetch/cache.go:61 +0x58
golang.org/x/vgo/vendor/cmd/go/internal/par.(*Cache).Do.func1()
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/par/work.go:125 +0x32
sync.(*Once).Do(0xc420401360, 0xc4201aa090)
	/home/pwaller/sdk/go1.10/src/sync/once.go:44 +0xbe
golang.org/x/vgo/vendor/cmd/go/internal/par.(*Cache).Do(0xc420302f60, 0x87e8c0, 0xc4204284f0, 0xc4201aa110, 0x28, 0xc4204c63f0)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/par/work.go:124 +0xa3
golang.org/x/vgo/vendor/cmd/go/internal/modfetch.(*cachingRepo).Stat(0xc420302f50, 0xc420412870, 0x28, 0xc420302f50, 0x0, 0x0)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/modfetch/cache.go:60 +0xff
golang.org/x/vgo/vendor/cmd/go/internal/modfetch.ConvertLegacyConfig(0xc4201aa5b0, 0x92bc93, 0x12, 0xc4202bc000, 0x702e, 0x7e00, 0xc4202bc000, 0x702e)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/modfetch/convert.go:59 +0x453
golang.org/x/vgo/vendor/cmd/go/internal/modfetch.(*codeRepo).legacyGoMod(0xc4201a2e00, 0xc420270f50, 0x6, 0x0, 0x0, 0x1000000, 0x0, 0x0)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/modfetch/coderepo.go:285 +0x25d
golang.org/x/vgo/vendor/cmd/go/internal/modfetch.(*codeRepo).GoMod(0xc4201a2e00, 0xc420270f50, 0x6, 0xc4201aa700, 0x411a59, 0xc420364fe0, 0xc42018c128, 0xc420000180)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/modfetch/coderepo.go:253 +0x212
golang.org/x/vgo/vendor/cmd/go/internal/modfetch.(*cachingRepo).GoMod.func1(0x0, 0x0)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/modfetch/cache.go:101 +0xbe
golang.org/x/vgo/vendor/cmd/go/internal/par.(*Cache).Do.func1()
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/par/work.go:125 +0x32
sync.(*Once).Do(0xc420364fe0, 0xc4201aa828)
	/home/pwaller/sdk/go1.10/src/sync/once.go:44 +0xbe
golang.org/x/vgo/vendor/cmd/go/internal/par.(*Cache).Do(0xc42020daa0, 0x87e8c0, 0xc42005a130, 0xc4201aa8c0, 0x6, 0xc42017aae0)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/par/work.go:124 +0xa3
golang.org/x/vgo/vendor/cmd/go/internal/modfetch.(*cachingRepo).GoMod(0xc42020da90, 0xc420270f50, 0x6, 0xc420186730, 0x0, 0x0, 0x2, 0x2d)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/modfetch/cache.go:98 +0x113
golang.org/x/vgo/vendor/cmd/go/internal/vgo.(*mvsReqs).required(0xc420291100, 0xc42027ab60, 0x18, 0xc420270f50, 0x6, 0x6, 0x7cf4fa43beaddc60, 0xc4201aad40, 0x5a6ae1, 0xc4202d3230)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/vgo/load.go:543 +0xe45
golang.org/x/vgo/vendor/cmd/go/internal/vgo.(*mvsReqs).Required.func1(0xc4201aaf10, 0x10)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/vgo/load.go:422 +0x83
golang.org/x/vgo/vendor/cmd/go/internal/par.(*Cache).Do.func1()
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/par/work.go:125 +0x32
sync.(*Once).Do(0xc4202d3240, 0xc4201aaf80)
	/home/pwaller/sdk/go1.10/src/sync/once.go:44 +0xbe
golang.org/x/vgo/vendor/cmd/go/internal/par.(*Cache).Do(0xc420291118, 0x8c4100, 0xc4202d3220, 0xc4201ab048, 0x8c4240, 0xc4202a5f20)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/par/work.go:124 +0xa3
golang.org/x/vgo/vendor/cmd/go/internal/vgo.(*mvsReqs).Required(0xc420291100, 0xc42027ab60, 0x18, 0xc420270f50, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/vgo/load.go:421 +0x10f
golang.org/x/vgo/vendor/cmd/go/internal/mvs.buildList.func1(0x8c4100, 0xc420239a00)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/mvs/mvs.go:80 +0xe8
golang.org/x/vgo/vendor/cmd/go/internal/par.(*Work).runner(0xc4201a2980)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/par/work.go:100 +0x135
golang.org/x/vgo/vendor/cmd/go/internal/par.(*Work).Do(0xc4201a2980, 0xa, 0xc420291140)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/par/work.go:68 +0xc8
golang.org/x/vgo/vendor/cmd/go/internal/mvs.buildList(0xc4201ac630, 0x27, 0x0, 0x0, 0x99da40, 0xc420291100, 0x0, 0x0, 0xc420291100, 0xc4201ab568, ...)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/mvs/mvs.go:78 +0x216
golang.org/x/vgo/vendor/cmd/go/internal/mvs.BuildList(0xc4201ac630, 0x27, 0x0, 0x0, 0x99da40, 0xc420291100, 0x0, 0x7ffa2d7b4d90, 0xc42017dc70, 0xc4201ba320, ...)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/mvs/mvs.go:66 +0x78
golang.org/x/vgo/vendor/cmd/go/internal/vgo.iterate(0xc4201ab668)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/vgo/load.go:177 +0xae
golang.org/x/vgo/vendor/cmd/go/internal/vgo.importPaths(0xc42009a080, 0x0, 0x0, 0x775d87, 0xc42017dc60, 0x1)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/vgo/load.go:133 +0x139
golang.org/x/vgo/vendor/cmd/go/internal/vgo.ImportPaths(0xc42009a080, 0x0, 0x0, 0xc42017dc60, 0x1, 0x1)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/vgo/load.go:120 +0x5a
golang.org/x/vgo/vendor/cmd/go/internal/load.ImportPaths(0xc42009a080, 0x0, 0x0, 0x516808, 0xc4201ab7af, 0xc4201ab7f8)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/load/pkg.go:1697 +0x4f
golang.org/x/vgo/vendor/cmd/go/internal/load.PackagesAndErrors(0xc42009a080, 0x0, 0x0, 0x20, 0x0, 0xc420000100)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/load/pkg.go:1669 +0xac
golang.org/x/vgo/vendor/cmd/go/internal/load.PackagesForBuild(0xc42009a080, 0x0, 0x0, 0x7ffec74902f7, 0x7ffec74902f8, 0x7ffa2d728300)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/load/pkg.go:1711 +0x5d
golang.org/x/vgo/vendor/cmd/go/internal/work.InstallPackages(0xc42009a080, 0x0, 0x0, 0x0)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/work/build.go:444 +0x84
golang.org/x/vgo/vendor/cmd/go/internal/work.runInstall(0xbb3a00, 0xc42009a080, 0x0, 0x0)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/work/build.go:436 +0x49
golang.org/x/vgo/vendor/cmd/go.Main()
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/main.go:169 +0x853
main.main()
	/home/pwaller/.local/src/golang.org/x/vgo/main.go:31 +0x20

goroutine 19 [syscall, 2 minutes]:
os/signal.signal_recv(0x0)
	/home/pwaller/sdk/go1.10/src/runtime/sigqueue.go:139 +0xa6
os/signal.loop()
	/home/pwaller/sdk/go1.10/src/os/signal/signal_unix.go:22 +0x22
created by os/signal.init.0
	/home/pwaller/sdk/go1.10/src/os/signal/signal_unix.go:28 +0x41

goroutine 34 [semacquire, 2 minutes]:
sync.runtime_SemacquireMutex(0xc420302f8c, 0xc420397100)
	/home/pwaller/sdk/go1.10/src/runtime/sema.go:71 +0x3d
sync.(*Mutex).Lock(0xc420302f88)
	/home/pwaller/sdk/go1.10/src/sync/mutex.go:134 +0x108
golang.org/x/vgo/vendor/cmd/go/internal/modfetch.(*cachingRepo).Stat.func1(0x0, 0x0)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/modfetch/cache.go:61 +0x58
golang.org/x/vgo/vendor/cmd/go/internal/par.(*Cache).Do.func1()
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/par/work.go:125 +0x32
sync.(*Once).Do(0xc42042de20, 0xc42033f620)
	/home/pwaller/sdk/go1.10/src/sync/once.go:44 +0xbe
golang.org/x/vgo/vendor/cmd/go/internal/par.(*Cache).Do(0xc420302f60, 0x87e8c0, 0xc420428a40, 0xc42033f6a0, 0x22, 0xc420460ab0)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/par/work.go:124 +0xa3
golang.org/x/vgo/vendor/cmd/go/internal/modfetch.(*cachingRepo).Stat(0xc420302f50, 0xc4204602a0, 0x22, 0xc420302f50, 0x0, 0x0)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/modfetch/cache.go:60 +0xff
golang.org/x/vgo/vendor/cmd/go/internal/vgo.(*mvsReqs).required(0xc420291100, 0xc42046a040, 0x18, 0xc4204602a0, 0x22, 0x22, 0x782738506a86c100, 0xc42033fad0, 0x5a6ae1, 0xc42042ddf0)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/vgo/load.go:538 +0xca8
golang.org/x/vgo/vendor/cmd/go/internal/vgo.(*mvsReqs).Required.func1(0xc42033fca0, 0x10)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/vgo/load.go:422 +0x83
golang.org/x/vgo/vendor/cmd/go/internal/par.(*Cache).Do.func1()
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/par/work.go:125 +0x32
sync.(*Once).Do(0xc42042de00, 0xc42033fd10)
	/home/pwaller/sdk/go1.10/src/sync/once.go:44 +0xbe
golang.org/x/vgo/vendor/cmd/go/internal/par.(*Cache).Do(0xc420291118, 0x8c4100, 0xc42042dde0, 0xc42033fdd8, 0x8c4240, 0xc420419dd0)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/par/work.go:124 +0xa3
golang.org/x/vgo/vendor/cmd/go/internal/vgo.(*mvsReqs).Required(0xc420291100, 0xc42046a040, 0x18, 0xc4204602a0, 0x22, 0x0, 0x0, 0x0, 0x0, 0x0)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/vgo/load.go:421 +0x10f
golang.org/x/vgo/vendor/cmd/go/internal/mvs.buildList.func1(0x8c4100, 0xc42042d540)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/mvs/mvs.go:80 +0xe8
golang.org/x/vgo/vendor/cmd/go/internal/par.(*Work).runner(0xc4201a2980)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/par/work.go:100 +0x135
created by golang.org/x/vgo/vendor/cmd/go/internal/par.(*Work).Do
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/par/work.go:66 +0xa4

goroutine 35 [semacquire]:
sync.runtime_SemacquireMutex(0xc4201872ac, 0xc4202a9c00)
	/home/pwaller/sdk/go1.10/src/runtime/sema.go:71 +0x3d
sync.(*Mutex).Lock(0xc4201872a8)
	/home/pwaller/sdk/go1.10/src/sync/mutex.go:134 +0x108
golang.org/x/vgo/vendor/cmd/go/internal/modfetch.(*cachingRepo).Stat.func1(0x0, 0x0)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/modfetch/cache.go:61 +0x58
golang.org/x/vgo/vendor/cmd/go/internal/par.(*Cache).Do.func1()
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/par/work.go:125 +0x32
sync.(*Once).Do(0xc420317d40, 0xc4201a6e20)
	/home/pwaller/sdk/go1.10/src/sync/once.go:44 +0xbe
golang.org/x/vgo/vendor/cmd/go/internal/par.(*Cache).Do(0xc420187280, 0x87e8c0, 0xc420b567b0, 0xc4201a6ea0, 0x23, 0xc420028540)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/par/work.go:124 +0xa3
golang.org/x/vgo/vendor/cmd/go/internal/modfetch.(*cachingRepo).Stat(0xc420187270, 0xc4203e4c75, 0x23, 0xc420187270, 0x0, 0x0)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/modfetch/cache.go:60 +0xff
golang.org/x/vgo/vendor/cmd/go/internal/modfetch.ConvertLegacyConfig(0xc4201a7340, 0x9287f2, 0xb, 0xc4203e2000, 0x1bab, 0x1e00, 0xc4203e2000, 0x1bab)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/modfetch/convert.go:59 +0x453
golang.org/x/vgo/vendor/cmd/go/internal/modfetch.(*codeRepo).legacyGoMod(0xc420346280, 0xc42039fae6, 0xc, 0x0, 0x0, 0x1000000, 0x0, 0x0)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/modfetch/coderepo.go:285 +0x25d
golang.org/x/vgo/vendor/cmd/go/internal/modfetch.(*codeRepo).GoMod(0xc420346280, 0xc42039fad0, 0x22, 0xc4201a7500, 0x411a59, 0x100c4203bb900, 0xc420194160, 0xc4202b2000)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/modfetch/coderepo.go:253 +0x212
golang.org/x/vgo/vendor/cmd/go/internal/modfetch.(*cachingRepo).GoMod.func1(0x0, 0x0)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/modfetch/cache.go:101 +0xbe
golang.org/x/vgo/vendor/cmd/go/internal/par.(*Cache).Do.func1()
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/par/work.go:125 +0x32
sync.(*Once).Do(0xc4203bb900, 0xc4201a75b8)
	/home/pwaller/sdk/go1.10/src/sync/once.go:44 +0xbe
golang.org/x/vgo/vendor/cmd/go/internal/par.(*Cache).Do(0xc420302f60, 0x87e8c0, 0xc420098d60, 0xc4201a7650, 0x22, 0xc42039fb60)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/par/work.go:124 +0xa3
golang.org/x/vgo/vendor/cmd/go/internal/modfetch.(*cachingRepo).GoMod(0xc420302f50, 0xc42039fad0, 0x22, 0xc4203027d0, 0x0, 0x0, 0x2, 0x49)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/modfetch/cache.go:98 +0x113
golang.org/x/vgo/vendor/cmd/go/internal/vgo.(*mvsReqs).required(0xc420291100, 0xc42019a7c0, 0x18, 0xc4202f2f30, 0x22, 0x22, 0xf54e7949053ac901, 0xc42033fad0, 0x5a6ae1, 0xc420354d70)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/vgo/load.go:543 +0xe45
golang.org/x/vgo/vendor/cmd/go/internal/vgo.(*mvsReqs).Required.func1(0xc42033fca0, 0x10)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/vgo/load.go:422 +0x83
golang.org/x/vgo/vendor/cmd/go/internal/par.(*Cache).Do.func1()
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/par/work.go:125 +0x32
sync.(*Once).Do(0xc420354d80, 0xc42033fd10)
	/home/pwaller/sdk/go1.10/src/sync/once.go:44 +0xbe
golang.org/x/vgo/vendor/cmd/go/internal/par.(*Cache).Do(0xc420291118, 0x8c4100, 0xc420354d60, 0xc42033fdd8, 0x8c4240, 0xc42001fd40)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/par/work.go:124 +0xa3
golang.org/x/vgo/vendor/cmd/go/internal/vgo.(*mvsReqs).Required(0xc420291100, 0xc42019a7c0, 0x18, 0xc4202f2f30, 0x22, 0x0, 0x0, 0x0, 0x0, 0x0)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/vgo/load.go:421 +0x10f
golang.org/x/vgo/vendor/cmd/go/internal/mvs.buildList.func1(0x8c4100, 0xc42019dea0)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/mvs/mvs.go:80 +0xe8
golang.org/x/vgo/vendor/cmd/go/internal/par.(*Work).runner(0xc4201a2980)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/par/work.go:100 +0x135
created by golang.org/x/vgo/vendor/cmd/go/internal/par.(*Work).Do
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/par/work.go:66 +0xa4

goroutine 36 [semacquire, 2 minutes]:
sync.runtime_SemacquireMutex(0xc420302f8c, 0xc420397101)
	/home/pwaller/sdk/go1.10/src/runtime/sema.go:71 +0x3d
sync.(*Mutex).Lock(0xc420302f88)
	/home/pwaller/sdk/go1.10/src/sync/mutex.go:134 +0x108
golang.org/x/vgo/vendor/cmd/go/internal/modfetch.(*cachingRepo).Stat.func1(0x0, 0x0)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/modfetch/cache.go:61 +0x58
golang.org/x/vgo/vendor/cmd/go/internal/par.(*Cache).Do.func1()
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/par/work.go:125 +0x32
sync.(*Once).Do(0xc4203dc120, 0xc420341620)
	/home/pwaller/sdk/go1.10/src/sync/once.go:44 +0xbe
golang.org/x/vgo/vendor/cmd/go/internal/par.(*Cache).Do(0xc420302f60, 0x87e8c0, 0xc4203d2150, 0xc4203416a0, 0x22, 0xc42038d2f0)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/par/work.go:124 +0xa3
golang.org/x/vgo/vendor/cmd/go/internal/modfetch.(*cachingRepo).Stat(0xc420302f50, 0xc42038c9c0, 0x22, 0xc420302f50, 0x0, 0x0)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/modfetch/cache.go:60 +0xff
golang.org/x/vgo/vendor/cmd/go/internal/vgo.(*mvsReqs).required(0xc420291100, 0xc420025760, 0x18, 0xc42038c9c0, 0x22, 0x22, 0xa7774e47753584c2, 0xc420341ad0, 0x5a6ae1, 0xc4203dc0f0)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/vgo/load.go:538 +0xca8
golang.org/x/vgo/vendor/cmd/go/internal/vgo.(*mvsReqs).Required.func1(0xc420341ca0, 0x10)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/vgo/load.go:422 +0x83
golang.org/x/vgo/vendor/cmd/go/internal/par.(*Cache).Do.func1()
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/par/work.go:125 +0x32
sync.(*Once).Do(0xc4203dc100, 0xc420341d10)
	/home/pwaller/sdk/go1.10/src/sync/once.go:44 +0xbe
golang.org/x/vgo/vendor/cmd/go/internal/par.(*Cache).Do(0xc420291118, 0x8c4100, 0xc4203dc0e0, 0xc420341dd8, 0x8c4240, 0xc4203da090)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/par/work.go:124 +0xa3
golang.org/x/vgo/vendor/cmd/go/internal/vgo.(*mvsReqs).Required(0xc420291100, 0xc420025760, 0x18, 0xc42038c9c0, 0x22, 0x0, 0x0, 0x0, 0x0, 0x0)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/vgo/load.go:421 +0x10f
golang.org/x/vgo/vendor/cmd/go/internal/mvs.buildList.func1(0x8c4100, 0xc420393900)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/mvs/mvs.go:80 +0xe8
golang.org/x/vgo/vendor/cmd/go/internal/par.(*Work).runner(0xc4201a2980)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/par/work.go:100 +0x135
created by golang.org/x/vgo/vendor/cmd/go/internal/par.(*Work).Do
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/par/work.go:66 +0xa4

goroutine 37 [semacquire, 2 minutes]:
sync.runtime_notifyListWait(0xc4201a29c8, 0x3)
	/home/pwaller/sdk/go1.10/src/runtime/sema.go:510 +0x10b
sync.(*Cond).Wait(0xc4201a29b8)
	/home/pwaller/sdk/go1.10/src/sync/cond.go:56 +0x80
golang.org/x/vgo/vendor/cmd/go/internal/par.(*Work).runner(0xc4201a2980)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/par/work.go:86 +0x33
created by golang.org/x/vgo/vendor/cmd/go/internal/par.(*Work).Do
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/par/work.go:66 +0xa4

goroutine 38 [semacquire, 2 minutes]:
sync.runtime_notifyListWait(0xc4201a29c8, 0xc400000002)
	/home/pwaller/sdk/go1.10/src/runtime/sema.go:510 +0x10b
sync.(*Cond).Wait(0xc4201a29b8)
	/home/pwaller/sdk/go1.10/src/sync/cond.go:56 +0x80
golang.org/x/vgo/vendor/cmd/go/internal/par.(*Work).runner(0xc4201a2980)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/par/work.go:86 +0x33
created by golang.org/x/vgo/vendor/cmd/go/internal/par.(*Work).Do
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/par/work.go:66 +0xa4

goroutine 39 [semacquire, 2 minutes]:
sync.runtime_SemacquireMutex(0xc420302f8c, 0xc420397100)
	/home/pwaller/sdk/go1.10/src/runtime/sema.go:71 +0x3d
sync.(*Mutex).Lock(0xc420302f88)
	/home/pwaller/sdk/go1.10/src/sync/mutex.go:134 +0x108
golang.org/x/vgo/vendor/cmd/go/internal/modfetch.(*cachingRepo).Stat.func1(0x0, 0x0)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/modfetch/cache.go:61 +0x58
golang.org/x/vgo/vendor/cmd/go/internal/par.(*Cache).Do.func1()
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/par/work.go:125 +0x32
sync.(*Once).Do(0xc420197b60, 0xc4203eee20)
	/home/pwaller/sdk/go1.10/src/sync/once.go:44 +0xbe
golang.org/x/vgo/vendor/cmd/go/internal/par.(*Cache).Do(0xc420302f60, 0x87e8c0, 0xc42005a230, 0xc4203eeea0, 0x28, 0xc4201adc80)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/par/work.go:124 +0xa3
golang.org/x/vgo/vendor/cmd/go/internal/modfetch.(*cachingRepo).Stat(0xc420302f50, 0xc420028de0, 0x28, 0xc420302f50, 0x0, 0x0)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/modfetch/cache.go:60 +0xff
golang.org/x/vgo/vendor/cmd/go/internal/modfetch.ConvertLegacyConfig(0xc4203ef340, 0x92bc93, 0x12, 0xc42054c000, 0x7cd, 0xe00, 0xc42054c000, 0x7cd)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/modfetch/convert.go:59 +0x453
golang.org/x/vgo/vendor/cmd/go/internal/modfetch.(*codeRepo).legacyGoMod(0xc42019eb00, 0xc42039c226, 0xc, 0x0, 0x0, 0x1000000, 0x0, 0x0)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/modfetch/coderepo.go:285 +0x25d
golang.org/x/vgo/vendor/cmd/go/internal/modfetch.(*codeRepo).GoMod(0xc42019eb00, 0xc42039c210, 0x22, 0xc4203ef500, 0x411a59, 0x100c4203926e0, 0xc42018c6c0, 0xc4202b2600)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/modfetch/coderepo.go:253 +0x212
golang.org/x/vgo/vendor/cmd/go/internal/modfetch.(*cachingRepo).GoMod.func1(0x0, 0x0)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/modfetch/cache.go:101 +0xbe
golang.org/x/vgo/vendor/cmd/go/internal/par.(*Cache).Do.func1()
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/par/work.go:125 +0x32
sync.(*Once).Do(0xc4203926e0, 0xc4203ef5b8)
	/home/pwaller/sdk/go1.10/src/sync/once.go:44 +0xbe
golang.org/x/vgo/vendor/cmd/go/internal/par.(*Cache).Do(0xc420187280, 0x87e8c0, 0xc42005a930, 0xc4203ef650, 0x22, 0xc42039c240)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/par/work.go:124 +0xa3
golang.org/x/vgo/vendor/cmd/go/internal/modfetch.(*cachingRepo).GoMod(0xc420187270, 0xc42039c210, 0x22, 0xc420302320, 0x0, 0x0, 0x2, 0x4f)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/modfetch/cache.go:98 +0x113
golang.org/x/vgo/vendor/cmd/go/internal/vgo.(*mvsReqs).required(0xc420291100, 0xc4200258e0, 0x1e, 0xc42038cdb0, 0x22, 0x22, 0x5fd14fca67d81282, 0xc420065ad0, 0x5a6ae1, 0xc4203ba930)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/vgo/load.go:543 +0xe45
golang.org/x/vgo/vendor/cmd/go/internal/vgo.(*mvsReqs).Required.func1(0xc420065ca0, 0x10)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/vgo/load.go:422 +0x83
golang.org/x/vgo/vendor/cmd/go/internal/par.(*Cache).Do.func1()
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/par/work.go:125 +0x32
sync.(*Once).Do(0xc4203ba940, 0xc420065d10)
	/home/pwaller/sdk/go1.10/src/sync/once.go:44 +0xbe
golang.org/x/vgo/vendor/cmd/go/internal/par.(*Cache).Do(0xc420291118, 0x8c4100, 0xc4203ba920, 0xc420065dd8, 0x8c4240, 0xc420363920)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/par/work.go:124 +0xa3
golang.org/x/vgo/vendor/cmd/go/internal/vgo.(*mvsReqs).Required(0xc420291100, 0xc4200258e0, 0x1e, 0xc42038cdb0, 0x22, 0xc420065eb0, 0x42d3a2, 0x90d020, 0x42cffa, 0x9594f8)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/vgo/load.go:421 +0x10f
golang.org/x/vgo/vendor/cmd/go/internal/mvs.buildList.func1(0x8c4100, 0xc420393b20)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/mvs/mvs.go:80 +0xe8
golang.org/x/vgo/vendor/cmd/go/internal/par.(*Work).runner(0xc4201a2980)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/par/work.go:100 +0x135
created by golang.org/x/vgo/vendor/cmd/go/internal/par.(*Work).Do
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/par/work.go:66 +0xa4

goroutine 40 [semacquire, 2 minutes]:
sync.runtime_SemacquireMutex(0xc4201872ac, 0x427201)
	/home/pwaller/sdk/go1.10/src/runtime/sema.go:71 +0x3d
sync.(*Mutex).Lock(0xc4201872a8)
	/home/pwaller/sdk/go1.10/src/sync/mutex.go:134 +0x108
golang.org/x/vgo/vendor/cmd/go/internal/modfetch.(*cachingRepo).Stat.func1(0x0, 0x0)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/modfetch/cache.go:61 +0x58
golang.org/x/vgo/vendor/cmd/go/internal/par.(*Cache).Do.func1()
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/par/work.go:125 +0x32
sync.(*Once).Do(0xc4202d3460, 0xc42006b620)
	/home/pwaller/sdk/go1.10/src/sync/once.go:44 +0xbe
golang.org/x/vgo/vendor/cmd/go/internal/par.(*Cache).Do(0xc420187280, 0x87e8c0, 0xc4202c6bd0, 0xc42006b6a0, 0x22, 0xc4202e8300)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/par/work.go:124 +0xa3
golang.org/x/vgo/vendor/cmd/go/internal/modfetch.(*cachingRepo).Stat(0xc420187270, 0xc4202f3290, 0x22, 0xc420187270, 0x0, 0x0)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/modfetch/cache.go:60 +0xff
golang.org/x/vgo/vendor/cmd/go/internal/vgo.(*mvsReqs).required(0xc420291100, 0xc42019a9c0, 0x1e, 0xc4202f3290, 0x22, 0x0, 0x0, 0xc42006bad0, 0x5a6ae1, 0xc4202d3430)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/vgo/load.go:538 +0xca8
golang.org/x/vgo/vendor/cmd/go/internal/vgo.(*mvsReqs).Required.func1(0xc42006bca0, 0x10)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/vgo/load.go:422 +0x83
golang.org/x/vgo/vendor/cmd/go/internal/par.(*Cache).Do.func1()
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/par/work.go:125 +0x32
sync.(*Once).Do(0xc4202d3440, 0xc42006bd10)
	/home/pwaller/sdk/go1.10/src/sync/once.go:44 +0xbe
golang.org/x/vgo/vendor/cmd/go/internal/par.(*Cache).Do(0xc420291118, 0x8c4100, 0xc4202d3420, 0xc42006bdd8, 0xc4202b2780, 0xc420458c40)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/par/work.go:124 +0xa3
golang.org/x/vgo/vendor/cmd/go/internal/vgo.(*mvsReqs).Required(0xc420291100, 0xc42019a9c0, 0x1e, 0xc4202f3290, 0x22, 0x0, 0x0, 0x0, 0x0, 0x0)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/vgo/load.go:421 +0x10f
golang.org/x/vgo/vendor/cmd/go/internal/mvs.buildList.func1(0x8c4100, 0xc4203640c0)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/mvs/mvs.go:80 +0xe8
golang.org/x/vgo/vendor/cmd/go/internal/par.(*Work).runner(0xc4201a2980)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/par/work.go:100 +0x135
created by golang.org/x/vgo/vendor/cmd/go/internal/par.(*Work).Do
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/par/work.go:66 +0xa4

goroutine 41 [semacquire, 2 minutes]:
sync.runtime_notifyListWait(0xc4201a29c8, 0x1)
	/home/pwaller/sdk/go1.10/src/runtime/sema.go:510 +0x10b
sync.(*Cond).Wait(0xc4201a29b8)
	/home/pwaller/sdk/go1.10/src/sync/cond.go:56 +0x80
golang.org/x/vgo/vendor/cmd/go/internal/par.(*Work).runner(0xc4201a2980)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/par/work.go:86 +0x33
created by golang.org/x/vgo/vendor/cmd/go/internal/par.(*Work).Do
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/par/work.go:66 +0xa4

goroutine 42 [semacquire, 2 minutes]:
sync.runtime_notifyListWait(0xc4201a29c8, 0x0)
	/home/pwaller/sdk/go1.10/src/runtime/sema.go:510 +0x10b
sync.(*Cond).Wait(0xc4201a29b8)
	/home/pwaller/sdk/go1.10/src/sync/cond.go:56 +0x80
golang.org/x/vgo/vendor/cmd/go/internal/par.(*Work).runner(0xc4201a2980)
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/par/work.go:86 +0x33
created by golang.org/x/vgo/vendor/cmd/go/internal/par.(*Work).Do
	/home/pwaller/.local/src/golang.org/x/vgo/vendor/cmd/go/internal/par/work.go:66 +0xa4

rax    0xca
rbx    0xbbdcc0
rcx    0x459163
rdx    0x0
rdi    0xbbde08
rsi    0x0
rbp    0x7ffec748eb88
rsp    0x7ffec748eb40
r8     0x0
r9     0x0
r10    0x0
r11    0x286
r12    0xffffffffffffffff
r13    0xa
r14    0x9
r15    0x10
rip    0x459161
rflags 0x286
cs     0x33
fs     0x0
gs     0x0

/cc @bcmills in case the recent commit golang/vgo@0a6cdd7 to add parallelism is relevant.

@gopherbot gopherbot added this to the vgo milestone Jun 16, 2018

@pwaller pwaller changed the title x/vgo: possible deadlock during go install x/vgo: possible deadlock during vgo install Jun 16, 2018

@myitcv

This comment has been minimized.

Copy link
Member

commented Jun 16, 2018

Thanks for raising this @pwaller - I suspect what I saw in #25917 (comment) is related.

@bcmills

This comment has been minimized.

Copy link
Member

commented Jun 16, 2018

Those goroutine traces sure do look like a deadlock. I'll take a look first thing Monday—thanks for the detailed report!

@bcmills

This comment has been minimized.

Copy link
Member

commented Jun 18, 2018

Yep, this is a classic reentrant-locking bug, mediated though modfetch.Lookup:

(*cachingRepo).GoMod r locks r.mu and calls r.r.GoMod.
r.r.GoMod calls r.r.legacyGoMod calls ConvertLegacyConfig.
ConvertLegacyConfig calls Lookup, which returns r again.
ConvertLegacyConfig calls r.Stat, which locks r.mu again; deadlock.

I'm investigating a couple of possible avenues for a fix.

@gopherbot

This comment has been minimized.

Copy link

commented Jun 18, 2018

Change https://golang.org/cl/119475 mentions this issue: cmd/go/internal/modfetch: cache info and gomod on disk

@golang golang locked and limited conversation to collaborators Jun 18, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
4 participants
You can’t perform that action at this time.