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: list -e -json crashes on import cycles #27454

Closed
dominikh opened this issue Sep 2, 2018 · 5 comments

Comments

Projects
None yet
5 participants
@dominikh
Copy link
Member

commented Sep 2, 2018

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

go version go1.10.4 linux/amd64

Does this issue reproduce with the latest release?

No

What did you do?

go list -e -json -- sandbox/bar where sandbox/bar imports itself.

What did you expect to see?

An error reporting the import cycle.

What did you see instead?

Stack trace:

runtime: goroutine stack exceeds 1000000000-byte limit fatal error: stack overflow

runtime stack:
runtime.throw(0x8af03b, 0xe)
/home/dominikh/go/src/runtime/panic.go:616 +0x81
runtime.newstack()
/home/dominikh/go/src/runtime/stack.go:1054 +0x71f
runtime.morestack()
/home/dominikh/go/src/runtime/asm_amd64.s:480 +0x89

goroutine 1 [running]:
fmt.(*fmt).pad(0xc420690040, 0xc4206900a5, 0x7, 0x7)
/home/dominikh/go/src/fmt/format.go:90 +0x3a9 fp=0xc440858350 sp=0xc440858348 pc=0x4c0089
fmt.(*fmt).fmt_integer(0xc420690040, 0x1642c1, 0xa, 0x1, 0x8b00b1, 0x11)
/home/dominikh/go/src/fmt/format.go:307 +0x1db fp=0xc4408583a0 sp=0xc440858350 pc=0x4c0a4b
fmt.(*pp).fmtInteger(0xc420690000, 0x1642c1, 0x6400000001)
/home/dominikh/go/src/fmt/print.go:369 +0x1e5 fp=0xc4408583e0 sp=0xc4408583a0 pc=0x4c4255
fmt.(*pp).printArg(0xc420690000, 0x80f6e0, 0xc46120c840, 0x64)
/home/dominikh/go/src/fmt/print.go:649 +0x837 fp=0xc440858458 sp=0xc4408583e0 pc=0x4c6867
fmt.(*pp).doPrintf(0xc420690000, 0x8aa496, 0x5, 0xc4408585d0, 0x1, 0x1)
/home/dominikh/go/src/fmt/print.go:1099 +0x3fa fp=0xc440858540 sp=0xc440858458 pc=0x4c9c2a
fmt.Sprintf(0x8aa496, 0x5, 0xc4408585d0, 0x1, 0x1, 0x20, 0x0)
/home/dominikh/go/src/fmt/print.go:203 +0x66 fp=0xc440858598 sp=0xc440858540 pc=0x4c2d76
cmd/go/internal/work.(*Builder).NewObjdir(0xc420268280, 0x20, 0xc4408586b8)
/home/dominikh/go/src/cmd/go/internal/work/action.go:257 +0x94 fp=0xc440858610 sp=0xc440858598 pc=0x5ea464
cmd/go/internal/work.(*Builder).CompileAction.func1(0x830b20)
/home/dominikh/go/src/cmd/go/internal/work/action.go:335 +0x53 fp=0xc4408586b8 sp=0xc440858610 pc=0x6211c3
cmd/go/internal/work.(*Builder).cacheAction(0xc420268280, 0x8aa4b4, 0x5, 0xc42022c800, 0xc440858750, 0x412288)
/home/dominikh/go/src/cmd/go/internal/work/action.go:300 +0x9f fp=0xc440858720 sp=0xc4408586b8 pc=0x5ead3f
cmd/go/internal/work.(*Builder).CompileAction(0xc420268280, 0x1, 0x1, 0xc42022c800, 0xc461214d1f)
/home/dominikh/go/src/cmd/go/internal/work/action.go:330 +0xc0 fp=0xc440858780 sp=0xc440858720 pc=0x5eaf60
cmd/go/internal/work.(*Builder).CompileAction.func1(0x830b20)
/home/dominikh/go/src/cmd/go/internal/work/action.go:339 +0x16e fp=0xc440858828 sp=0xc440858780 pc=0x6212de
cmd/go/internal/work.(*Builder).cacheAction(0xc420268280, 0x8aa4b4, 0x5, 0xc42022c800, 0xc4408588c0, 0x412288)
/home/dominikh/go/src/cmd/go/internal/work/action.go:300 +0x9f fp=0xc440858890 sp=0xc440858828 pc=0x5ead3f
cmd/go/internal/work.(*Builder).CompileAction(0xc420268280, 0x1, 0x1, 0xc42022c800, 0xc461214cdf)
/home/dominikh/go/src/cmd/go/internal/work/action.go:330 +0xc0 fp=0xc4408588f0 sp=0xc440858890 pc=0x5eaf60
cmd/go/internal/work.(*Builder).CompileAction.func1(0x830b20)
/home/dominikh/go/src/cmd/go/internal/work/action.go:339 +0x16e fp=0xc440858998 sp=0xc4408588f0 pc=0x6212de
cmd/go/internal/work.(*Builder).cacheAction(0xc420268280, 0x8aa4b4, 0x5, 0xc42022c800, 0xc440858a30, 0x412288)
/home/dominikh/go/src/cmd/go/internal/work/action.go:300 +0x9f fp=0xc440858a00 sp=0xc440858998 pc=0x5ead3f
cmd/go/internal/work.(*Builder).CompileAction(0xc420268280, 0x1, 0x1, 0xc42022c800, 0xc461214c9f)
/home/dominikh/go/src/cmd/go/internal/work/action.go:330 +0xc0 fp=0xc440858a60 sp=0xc440858a00 pc=0x5eaf60
cmd/go/internal/work.(*Builder).CompileAction.func1(0x830b20)
/home/dominikh/go/src/cmd/go/internal/work/action.go:339 +0x16e fp=0xc440858b08 sp=0xc440858a60 pc=0x6212de
cmd/go/internal/work.(*Builder).cacheAction(0xc420268280, 0x8aa4b4, 0x5, 0xc42022c800, 0xc440858ba0, 0x412288)
/home/dominikh/go/src/cmd/go/internal/work/action.go:300 +0x9f fp=0xc440858b70 sp=0xc440858b08 pc=0x5ead3f
cmd/go/internal/work.(*Builder).CompileAction(0xc420268280, 0x1, 0x1, 0xc42022c800, 0xc461214c5f)
/home/dominikh/go/src/cmd/go/internal/work/action.go:330 +0xc0 fp=0xc440858bd0 sp=0xc440858b70 pc=0x5eaf60
cmd/go/internal/work.(*Builder).CompileAction.func1(0x830b20)
/home/dominikh/go/src/cmd/go/internal/work/action.go:339 +0x16e fp=0xc440858c78 sp=0xc440858bd0 pc=0x6212de
cmd/go/internal/work.(*Builder).cacheAction(0xc420268280, 0x8aa4b4, 0x5, 0xc42022c800, 0xc440858d10, 0x412288)
/home/dominikh/go/src/cmd/go/internal/work/action.go:300 +0x9f fp=0xc440858ce0 sp=0xc440858c78 pc=0x5ead3f
cmd/go/internal/work.(*Builder).CompileAction(0xc420268280, 0x1, 0x1, 0xc42022c800, 0xc461214c1f)
/home/dominikh/go/src/cmd/go/internal/work/action.go:330 +0xc0 fp=0xc440858d40 sp=0xc440858ce0 pc=0x5eaf60
cmd/go/internal/work.(*Builder).CompileAction.func1(0x830b20)
/home/dominikh/go/src/cmd/go/internal/work/action.go:339 +0x16e fp=0xc440858de8 sp=0xc440858d40 pc=0x6212de
cmd/go/internal/work.(*Builder).cacheAction(0xc420268280, 0x8aa4b4, 0x5, 0xc42022c800, 0xc440858e80, 0x412288)
/home/dominikh/go/src/cmd/go/internal/work/action.go:300 +0x9f fp=0xc440858e50 sp=0xc440858de8 pc=0x5ead3f
cmd/go/internal/work.(*Builder).CompileAction(0xc420268280, 0x1, 0x1, 0xc42022c800, 0xc461214bdf)
/home/dominikh/go/src/cmd/go/internal/work/action.go:330 +0xc0 fp=0xc440858eb0 sp=0xc440858e50 pc=0x5eaf60
cmd/go/internal/work.(*Builder).CompileAction.func1(0x830b20)
/home/dominikh/go/src/cmd/go/internal/work/action.go:339 +0x16e fp=0xc440858f58 sp=0xc440858eb0 pc=0x6212de
cmd/go/internal/work.(*Builder).cacheAction(0xc420268280, 0x8aa4b4, 0x5, 0xc42022c800, 0xc440858ff0, 0x412288)
/home/dominikh/go/src/cmd/go/internal/work/action.go:300 +0x9f fp=0xc440858fc0 sp=0xc440858f58 pc=0x5ead3f
cmd/go/internal/work.(*Builder).CompileAction(0xc420268280, 0x1, 0x1, 0xc42022c800, 0xc461214b9f)
/home/dominikh/go/src/cmd/go/internal/work/action.go:330 +0xc0 fp=0xc440859020 sp=0xc440858fc0 pc=0x5eaf60
cmd/go/internal/work.(*Builder).CompileAction.func1(0x830b20)
/home/dominikh/go/src/cmd/go/internal/work/action.go:339 +0x16e fp=0xc4408590c8 sp=0xc440859020 pc=0x6212de
cmd/go/internal/work.(*Builder).cacheAction(0xc420268280, 0x8aa4b4, 0x5, 0xc42022c800, 0xc440859160, 0x412288)
/home/dominikh/go/src/cmd/go/internal/work/action.go:300 +0x9f fp=0xc440859130 sp=0xc4408590c8 pc=0x5ead3f
cmd/go/internal/work.(*Builder).CompileAction(0xc420268280, 0x1, 0x1, 0xc42022c800, 0xc461214b5f)
/home/dominikh/go/src/cmd/go/internal/work/action.go:330 +0xc0 fp=0xc440859190 sp=0xc440859130 pc=0x5eaf60
cmd/go/internal/work.(*Builder).CompileAction.func1(0x830b20)
/home/dominikh/go/src/cmd/go/internal/work/action.go:339 +0x16e fp=0xc440859238 sp=0xc440859190 pc=0x6212de
cmd/go/internal/work.(*Builder).cacheAction(0xc420268280, 0x8aa4b4, 0x5, 0xc42022c800, 0xc4408592d0, 0x412288)
/home/dominikh/go/src/cmd/go/internal/work/action.go:300 +0x9f fp=0xc4408592a0 sp=0xc440859238 pc=0x5ead3f
cmd/go/internal/work.(*Builder).CompileAction(0xc420268280, 0x1, 0x1, 0xc42022c800, 0xc461214b1f)
/home/dominikh/go/src/cmd/go/internal/work/action.go:330 +0xc0 fp=0xc440859300 sp=0xc4408592a0 pc=0x5eaf60
cmd/go/internal/work.(*Builder).CompileAction.func1(0x830b20)
/home/dominikh/go/src/cmd/go/internal/work/action.go:339 +0x16e fp=0xc4408593a8 sp=0xc440859300 pc=0x6212de
cmd/go/internal/work.(*Builder).cacheAction(0xc420268280, 0x8aa4b4, 0x5, 0xc42022c800, 0xc440859440, 0x412288)
/home/dominikh/go/src/cmd/go/internal/work/action.go:300 +0x9f fp=0xc440859410 sp=0xc4408593a8 pc=0x5ead3f
cmd/go/internal/work.(*Builder).CompileAction(0xc420268280, 0x1, 0x1, 0xc42022c800, 0xc461214adf)
/home/dominikh/go/src/cmd/go/internal/work/action.go:330 +0xc0 fp=0xc440859470 sp=0xc440859410 pc=0x5eaf60
cmd/go/internal/work.(*Builder).CompileAction.func1(0x830b20)
/home/dominikh/go/src/cmd/go/internal/work/action.go:339 +0x16e fp=0xc440859518 sp=0xc440859470 pc=0x6212de
cmd/go/internal/work.(*Builder).cacheAction(0xc420268280, 0x8aa4b4, 0x5, 0xc42022c800, 0xc4408595b0, 0x412288)
/home/dominikh/go/src/cmd/go/internal/work/action.go:300 +0x9f fp=0xc440859580 sp=0xc440859518 pc=0x5ead3f
cmd/go/internal/work.(*Builder).CompileAction(0xc420268280, 0x1, 0x1, 0xc42022c800, 0xc461214a9f)
/home/dominikh/go/src/cmd/go/internal/work/action.go:330 +0xc0 fp=0xc4408595e0 sp=0xc440859580 pc=0x5eaf60
cmd/go/internal/work.(*Builder).CompileAction.func1(0x830b20)
/home/dominikh/go/src/cmd/go/internal/work/action.go:339 +0x16e fp=0xc440859688 sp=0xc4408595e0 pc=0x6212de
cmd/go/internal/work.(*Builder).cacheAction(0xc420268280, 0x8aa4b4, 0x5, 0xc42022c800, 0xc440859720, 0x412288)
/home/dominikh/go/src/cmd/go/internal/work/action.go:300 +0x9f fp=0xc4408596f0 sp=0xc440859688 pc=0x5ead3f
cmd/go/internal/work.(*Builder).CompileAction(0xc420268280, 0x1, 0x1, 0xc42022c800, 0xc461214a5f)
/home/dominikh/go/src/cmd/go/internal/work/action.go:330 +0xc0 fp=0xc440859750 sp=0xc4408596f0 pc=0x5eaf60
cmd/go/internal/work.(*Builder).CompileAction.func1(0x830b20)
/home/dominikh/go/src/cmd/go/internal/work/action.go:339 +0x16e fp=0xc4408597f8 sp=0xc440859750 pc=0x6212de
cmd/go/internal/work.(*Builder).cacheAction(0xc420268280, 0x8aa4b4, 0x5, 0xc42022c800, 0xc440859890, 0x412288)
/home/dominikh/go/src/cmd/go/internal/work/action.go:300 +0x9f fp=0xc440859860 sp=0xc4408597f8 pc=0x5ead3f
cmd/go/internal/work.(*Builder).CompileAction(0xc420268280, 0x1, 0x1, 0xc42022c800, 0xc461214a1f)
/home/dominikh/go/src/cmd/go/internal/work/action.go:330 +0xc0 fp=0xc4408598c0 sp=0xc440859860 pc=0x5eaf60
cmd/go/internal/work.(*Builder).CompileAction.func1(0x830b20)
/home/dominikh/go/src/cmd/go/internal/work/action.go:339 +0x16e fp=0xc440859968 sp=0xc4408598c0 pc=0x6212de
cmd/go/internal/work.(*Builder).cacheAction(0xc420268280, 0x8aa4b4, 0x5, 0xc42022c800, 0xc440859a00, 0x412288)
/home/dominikh/go/src/cmd/go/internal/work/action.go:300 +0x9f fp=0xc4408599d0 sp=0xc440859968 pc=0x5ead3f
cmd/go/internal/work.(*Builder).CompileAction(0xc420268280, 0x1, 0x1, 0xc42022c800, 0x19)
/home/dominikh/go/src/cmd/go/internal/work/action.go:330 +0xc0 fp=0xc440859a30 sp=0xc4408599d0 pc=0x5eaf60
cmd/go/internal/work.(*Builder).CompileAction.func1(0x830b20)
/home/dominikh/go/src/cmd/go/internal/work/action.go:339 +0x16e fp=0xc440859ad8 sp=0xc440859a30 pc=0x6212de
cmd/go/internal/work.(*Builder).cacheAction(0xc420268280, 0x8aa4b4, 0x5, 0xc42022c800, 0xc440859b70, 0x412288)
/home/dominikh/go/src/cmd/go/internal/work/action.go:300 +0x9f fp=0xc440859b40 sp=0xc440859ad8 pc=0x5ead3f
cmd/go/internal/work.(*Builder).CompileAction(0xc420268280, 0x1, 0x1, 0xc42022c800, 0xc46121499f)
/home/dominikh/go/src/cmd/go/internal/work/action.go:330 +0xc0 fp=0xc440859ba0 sp=0xc440859b40 pc=0x5eaf60
cmd/go/internal/work.(*Builder).CompileAction.func1(0x830b20)
/home/dominikh/go/src/cmd/go/internal/work/action.go:339 +0x16e fp=0xc440859c48 sp=0xc440859ba0 pc=0x6212de
cmd/go/internal/work.(*Builder).cacheAction(0xc420268280, 0x8aa4b4, 0x5, 0xc42022c800, 0xc440859ce0, 0x412288)
/home/dominikh/go/src/cmd/go/internal/work/action.go:300 +0x9f fp=0xc440859cb0 sp=0xc440859c48 pc=0x5ead3f
cmd/go/internal/work.(*Builder).CompileAction(0xc420268280, 0x1, 0x1, 0xc42022c800, 0xc46121495f)
/home/dominikh/go/src/cmd/go/internal/work/action.go:330 +0xc0 fp=0xc440859d10 sp=0xc440859cb0 pc=0x5eaf60
cmd/go/internal/work.(*Builder).CompileAction.func1(0x830b20)
/home/dominikh/go/src/cmd/go/internal/work/action.go:339 +0x16e fp=0xc440859db8 sp=0xc440859d10 pc=0x6212de
cmd/go/internal/work.(*Builder).cacheAction(0xc420268280, 0x8aa4b4, 0x5, 0xc42022c800, 0xc440859e50, 0x412288)
/home/dominikh/go/src/cmd/go/internal/work/action.go:300 +0x9f fp=0xc440859e20 sp=0xc440859db8 pc=0x5ead3f
cmd/go/internal/work.(*Builder).CompileAction(0xc420268280, 0x1, 0x1, 0xc42022c800, 0xc46121491f)
/home/dominikh/go/src/cmd/go/internal/work/action.go:330 +0xc0 fp=0xc440859e80 sp=0xc440859e20 pc=0x5eaf60
cmd/go/internal/work.(*Builder).CompileAction.func1(0x830b20)
/home/dominikh/go/src/cmd/go/internal/work/action.go:339 +0x16e fp=0xc440859f28 sp=0xc440859e80 pc=0x6212de
cmd/go/internal/work.(*Builder).cacheAction(0xc420268280, 0x8aa4b4, 0x5, 0xc42022c800, 0xc440859fc0, 0x412288)
/home/dominikh/go/src/cmd/go/internal/work/action.go:300 +0x9f fp=0xc440859f90 sp=0xc440859f28 pc=0x5ead3f
cmd/go/internal/work.(*Builder).CompileAction(0xc420268280, 0x1, 0x1, 0xc42022c800, 0xc4612148df)
/home/dominikh/go/src/cmd/go/internal/work/action.go:330 +0xc0 fp=0xc440859ff0 sp=0xc440859f90 pc=0x5eaf60
cmd/go/internal/work.(*Builder).CompileAction.func1(0x830b20)
/home/dominikh/go/src/cmd/go/internal/work/action.go:339 +0x16e fp=0xc44085a098 sp=0xc440859ff0 pc=0x6212de
cmd/go/internal/work.(*Builder).cacheAction(0xc420268280, 0x8aa4b4, 0x5, 0xc42022c800, 0xc44085a130, 0x412288)
/home/dominikh/go/src/cmd/go/internal/work/action.go:300 +0x9f fp=0xc44085a100 sp=0xc44085a098 pc=0x5ead3f
cmd/go/internal/work.(*Builder).CompileAction(0xc420268280, 0x1, 0x1, 0xc42022c800, 0xc46121489f)
/home/dominikh/go/src/cmd/go/internal/work/action.go:330 +0xc0 fp=0xc44085a160 sp=0xc44085a100 pc=0x5eaf60
cmd/go/internal/work.(*Builder).CompileAction.func1(0x830b20)
/home/dominikh/go/src/cmd/go/internal/work/action.go:339 +0x16e fp=0xc44085a208 sp=0xc44085a160 pc=0x6212de
cmd/go/internal/work.(*Builder).cacheAction(0xc420268280, 0x8aa4b4, 0x5, 0xc42022c800, 0xc44085a2a0, 0x412288)
/home/dominikh/go/src/cmd/go/internal/work/action.go:300 +0x9f fp=0xc44085a270 sp=0xc44085a208 pc=0x5ead3f
cmd/go/internal/work.(*Builder).CompileAction(0xc420268280, 0x1, 0x1, 0xc42022c800, 0xc46121485f)
/home/dominikh/go/src/cmd/go/internal/work/action.go:330 +0xc0 fp=0xc44085a2d0 sp=0xc44085a270 pc=0x5eaf60
cmd/go/internal/work.(*Builder).CompileAction.func1(0x830b20)
/home/dominikh/go/src/cmd/go/internal/work/action.go:339 +0x16e fp=0xc44085a378 sp=0xc44085a2d0 pc=0x6212de
cmd/go/internal/work.(*Builder).cacheAction(0xc420268280, 0x8aa4b4, 0x5, 0xc42022c800, 0xc44085a410, 0x412288)
/home/dominikh/go/src/cmd/go/internal/work/action.go:300 +0x9f fp=0xc44085a3e0 sp=0xc44085a378 pc=0x5ead3f
cmd/go/internal/work.(*Builder).CompileAction(0xc420268280, 0x1, 0x1, 0xc42022c800, 0xc46121481f)
/home/dominikh/go/src/cmd/go/internal/work/action.go:330 +0xc0 fp=0xc44085a440 sp=0xc44085a3e0 pc=0x5eaf60
cmd/go/internal/work.(*Builder).CompileAction.func1(0x830b20)
/home/dominikh/go/src/cmd/go/internal/work/action.go:339 +0x16e fp=0xc44085a4e8 sp=0xc44085a440 pc=0x6212de
cmd/go/internal/work.(*Builder).cacheAction(0xc420268280, 0x8aa4b4, 0x5, 0xc42022c800, 0xc44085a580, 0x412288)
/home/dominikh/go/src/cmd/go/internal/work/action.go:300 +0x9f fp=0xc44085a550 sp=0xc44085a4e8 pc=0x5ead3f
cmd/go/internal/work.(*Builder).CompileAction(0xc420268280, 0x1, 0x1, 0xc42022c800, 0xc4612147df)
/home/dominikh/go/src/cmd/go/internal/work/action.go:330 +0xc0 fp=0xc44085a5b0 sp=0xc44085a550 pc=0x5eaf60
cmd/go/internal/work.(*Builder).CompileAction.func1(0x830b20)
/home/dominikh/go/src/cmd/go/internal/work/action.go:339 +0x16e fp=0xc44085a658 sp=0xc44085a5b0 pc=0x6212de
cmd/go/internal/work.(*Builder).cacheAction(0xc420268280, 0x8aa4b4, 0x5, 0xc42022c800, 0xc44085a6f0, 0x412288)
/home/dominikh/go/src/cmd/go/internal/work/action.go:300 +0x9f fp=0xc44085a6c0 sp=0xc44085a658 pc=0x5ead3f
cmd/go/internal/work.(*Builder).CompileAction(0xc420268280, 0x1, 0x1, 0xc42022c800, 0xc46121479f)
/home/dominikh/go/src/cmd/go/internal/work/action.go:330 +0xc0 fp=0xc44085a720 sp=0xc44085a6c0 pc=0x5eaf60
cmd/go/internal/work.(*Builder).CompileAction.func1(0x830b20)
/home/dominikh/go/src/cmd/go/internal/work/action.go:339 +0x16e fp=0xc44085a7c8 sp=0xc44085a720 pc=0x6212de
cmd/go/internal/work.(*Builder).cacheAction(0xc420268280, 0x8aa4b4, 0x5, 0xc42022c800, 0xc44085a860, 0x412288)
/home/dominikh/go/src/cmd/go/internal/work/action.go:300 +0x9f fp=0xc44085a830 sp=0xc44085a7c8 pc=0x5ead3f
cmd/go/internal/work.(*Builder).CompileAction(0xc420268280, 0x1, 0x1, 0xc42022c800, 0xc46121475f)
/home/dominikh/go/src/cmd/go/internal/work/action.go:330 +0xc0 fp=0xc44085a890 sp=0xc44085a830 pc=0x5eaf60
cmd/go/internal/work.(*Builder).CompileAction.func1(0x830b20)
/home/dominikh/go/src/cmd/go/internal/work/action.go:339 +0x16e fp=0xc44085a938 sp=0xc44085a890 pc=0x6212de
cmd/go/internal/work.(*Builder).cacheAction(0xc420268280, 0x8aa4b4, 0x5, 0xc42022c800, 0xc44085a9d0, 0x412288)
/home/dominikh/go/src/cmd/go/internal/work/action.go:300 +0x9f fp=0xc44085a9a0 sp=0xc44085a938 pc=0x5ead3f
cmd/go/internal/work.(*Builder).CompileAction(0xc420268280, 0x1, 0x1, 0xc42022c800, 0xc46121471f)
/home/dominikh/go/src/cmd/go/internal/work/action.go:330 +0xc0 fp=0xc44085aa00 sp=0xc44085a9a0 pc=0x5eaf60
cmd/go/internal/work.(*Builder).CompileAction.func1(0x830b20)
/home/dominikh/go/src/cmd/go/internal/work/action.go:339 +0x16e fp=0xc44085aaa8 sp=0xc44085aa00 pc=0x6212de
cmd/go/internal/work.(*Builder).cacheAction(0xc420268280, 0x8aa4b4, 0x5, 0xc42022c800, 0xc44085ab40, 0x412288)
/home/dominikh/go/src/cmd/go/internal/work/action.go:300 +0x9f fp=0xc44085ab10 sp=0xc44085aaa8 pc=0x5ead3f
cmd/go/internal/work.(*Builder).CompileAction(0xc420268280, 0x1, 0x1, 0xc42022c800, 0xc4612146df)
/home/dominikh/go/src/cmd/go/internal/work/action.go:330 +0xc0 fp=0xc44085ab70 sp=0xc44085ab10 pc=0x5eaf60
cmd/go/internal/work.(*Builder).CompileAction.func1(0x830b20)
/home/dominikh/go/src/cmd/go/internal/work/action.go:339 +0x16e fp=0xc44085ac18 sp=0xc44085ab70 pc=0x6212de
cmd/go/internal/work.(*Builder).cacheAction(0xc420268280, 0x8aa4b4, 0x5, 0xc42022c800, 0xc44085acb0, 0x412288)
/home/dominikh/go/src/cmd/go/internal/work/action.go:300 +0x9f fp=0xc44085ac80 sp=0xc44085ac18 pc=0x5ead3f
cmd/go/internal/work.(*Builder).CompileAction(0xc420268280, 0x1, 0x1, 0xc42022c800, 0xc46121469f)
/home/dominikh/go/src/cmd/go/internal/work/action.go:330 +0xc0 fp=0xc44085ace0 sp=0xc44085ac80 pc=0x5eaf60
cmd/go/internal/work.(*Builder).CompileAction.func1(0x830b20)
/home/dominikh/go/src/cmd/go/internal/work/action.go:339 +0x16e fp=0xc44085ad88 sp=0xc44085ace0 pc=0x6212de
cmd/go/internal/work.(*Builder).cacheAction(0xc420268280, 0x8aa4b4, 0x5, 0xc42022c800, 0xc44085ae20, 0x412288)
/home/dominikh/go/src/cmd/go/internal/work/action.go:300 +0x9f fp=0xc44085adf0 sp=0xc44085ad88 pc=0x5ead3f
cmd/go/internal/work.(*Builder).CompileAction(0xc420268280, 0x1, 0x1, 0xc42022c800, 0xc46121465f)
/home/dominikh/go/src/cmd/go/internal/work/action.go:330 +0xc0 fp=0xc44085ae50 sp=0xc44085adf0 pc=0x5eaf60
cmd/go/internal/work.(*Builder).CompileAction.func1(0x830b20)
/home/dominikh/go/src/cmd/go/internal/work/action.go:339 +0x16e fp=0xc44085aef8 sp=0xc44085ae50 pc=0x6212de
cmd/go/internal/work.(*Builder).cacheAction(0xc420268280, 0x8aa4b4, 0x5, 0xc42022c800, 0xc44085af90, 0x412288)
/home/dominikh/go/src/cmd/go/internal/work/action.go:300 +0x9f fp=0xc44085af60 sp=0xc44085aef8 pc=0x5ead3f
cmd/go/internal/work.(*Builder).CompileAction(0xc420268280, 0x1, 0x1, 0xc42022c800, 0xc46121461f)
/home/dominikh/go/src/cmd/go/internal/work/action.go:330 +0xc0 fp=0xc44085afc0 sp=0xc44085af60 pc=0x5eaf60
cmd/go/internal/work.(*Builder).CompileAction.func1(0x830b20)
/home/dominikh/go/src/cmd/go/internal/work/action.go:339 +0x16e fp=0xc44085b068 sp=0xc44085afc0 pc=0x6212de
cmd/go/internal/work.(*Builder).cacheAction(0xc420268280, 0x8aa4b4, 0x5, 0xc42022c800, 0xc44085b100, 0x412288)
/home/dominikh/go/src/cmd/go/internal/work/action.go:300 +0x9f fp=0xc44085b0d0 sp=0xc44085b068 pc=0x5ead3f
cmd/go/internal/work.(*Builder).CompileAction(0xc420268280, 0x1, 0x1, 0xc42022c800, 0xc4612145df)
/home/dominikh/go/src/cmd/go/internal/work/action.go:330 +0xc0 fp=0xc44085b130 sp=0xc44085b0d0 pc=0x5eaf60
cmd/go/internal/work.(*Builder).CompileAction.func1(0x830b20)
/home/dominikh/go/src/cmd/go/internal/work/action.go:339 +0x16e fp=0xc44085b1d8 sp=0xc44085b130 pc=0x6212de
cmd/go/internal/work.(*Builder).cacheAction(0xc420268280, 0x8aa4b4, 0x5, 0xc42022c800, 0xc44085b270, 0x412288)
/home/dominikh/go/src/cmd/go/internal/work/action.go:300 +0x9f fp=0xc44085b240 sp=0xc44085b1d8 pc=0x5ead3f
cmd/go/internal/work.(*Builder).CompileAction(0xc420268280, 0x1, 0x1, 0xc42022c800, 0xc46121459f)
/home/dominikh/go/src/cmd/go/internal/work/action.go:330 +0xc0 fp=0xc44085b2a0 sp=0xc44085b240 pc=0x5eaf60
...additional frames elided...

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

This works correctly in Go 1.11, but go/packages is supposed to support 1.10 and 1.11, and this fails horribly in 1.10.

@mvdan

This comment has been minimized.

Copy link
Member

commented Sep 3, 2018

@bcmills bcmills added this to the Go1.10.5 milestone Sep 6, 2018

@bcmills

This comment has been minimized.

Copy link
Member

commented Sep 6, 2018

go/packages is supposed to support 1.10 and 1.11, and this fails horribly in 1.10.

Is there a workaround? (For example, can go/packages check the go version and probe for import cycles explicitly?)

Even if we backport a fix to 1.10.5, it's not obvious that users will actually upgrade to it within a reasonable timeframe, so I'm not sure how much value a fix at this point would be able to deliver.

@dominikh

This comment has been minimized.

Copy link
Member Author

commented Sep 6, 2018

@ianthehat

This comment has been minimized.

Copy link

commented Sep 7, 2018

I think if it is easy to fix we should probably add it to a point release if we do one, but I think it's a rare enough case that its not worth much more than that, especially as you don't get incorrect results, you just get the wrong error a bit slower, and building the same code will tell you what is wrong anyway.

I don't think a workaround is feasible, without invoking go list go/packages cannot even expand the patterns it is passed to find the root packages, let alone walk the import graph. We would have to basically duplicate the go list code into go/packages to do it right.

@dmitshur dmitshur modified the milestones: Go1.10.5, Go1.10.6 Nov 1, 2018

@bcmills

This comment has been minimized.

Copy link
Member

commented Dec 6, 2018

Given the lack of traffic on this issue since September and the fact that it only affects code with cyclic imports (which is hopefully rare even in not-quite-valid code), I don't think it's worth the effort to diagnose and backport.

@bcmills bcmills closed this Dec 6, 2018

@dmitshur dmitshur modified the milestones: Go1.10.6, Go1.10.7 Dec 13, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.