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/compile: using a fmt.Stringer type with closure funcs causes stack overflow on tip but works on 1.22.3 #67325

Closed
mvdan opened this issue May 11, 2024 · 2 comments
Labels
compiler/runtime Issues related to the Go compiler and/or runtime.

Comments

@mvdan
Copy link
Member

mvdan commented May 11, 2024

In a project we have an error type which does a lot of work upfront when the value is created. I am trying to delay most of that work until the Error function is called, as many errors are created but never stringified, so fairly often that work can be avoided entirely.

The smallest change I tried was cue-lang/cue@e63c77c - for format verbs like %s, rather than constructing a string and passing it directly as a formatting argument, I instead use a fmt.Stringer.

This works as expected on the latest stable release:

$ git log -1 --oneline
e63c77c5 (HEAD -> error-stringer, github/error-stringer) delay stringifying in errors via fmt.Stringer
$ go version
go version go1.22.3 linux/amd64
$ go install ./cmd/cue
$ cue vet -c=false ./internal/ci/...
[succeeds after about 2s]

However, we fail spectacularly on Go tip, even though tip works fine on the parent commit, before the fmt.Stringer change:

$ git log -1 --oneline
e63c77c5 (HEAD -> error-stringer, github/error-stringer) delay stringifying in errors via fmt.Stringer
$ go version
go version devel go1.23-7f9edb4225 2024-05-11 20:38:24 +0000 linux/amd64
$ go install ./cmd/cue
$ cue vet -c=false ./...
runtime: goroutine stack exceeds 1000000000-byte limit
runtime: sp=0xc0368c0348 stack=[0xc0368c0000, 0xc0568c0000]
fatal error: stack overflow

runtime stack:
runtime.throw({0xdcf538?, 0x72cea4dffd40?})
	/home/mvdan/tip/src/runtime/panic.go:1027 +0x48 fp=0x72cea4dffd00 sp=0x72cea4dffcd0 pc=0x43ed08
runtime.newstack()
	/home/mvdan/tip/src/runtime/stack.go:1117 +0x5bd fp=0x72cea4dffe40 sp=0x72cea4dffd00 pc=0x45b5bd
runtime.morestack()
	/home/mvdan/tip/src/runtime/asm_amd64.s:621 +0x7a fp=0x72cea4dffe48 sp=0x72cea4dffe40 pc=0x477e3a

goroutine 1 gp=0xc0000041c0 m=9 mp=0xc000600008 [running]:
cuelang.org/go/internal/core/adt.appendPath({0x0?, 0x0?, 0x0?}, 0xc002436dc0?)
	/home/mvdan/src/c/cue/internal/core/adt/composite.go:1298 +0x7e fp=0xc0368c0358 sp=0xc0368c0350 pc=0x6d969e
cuelang.org/go/internal/core/adt.appendPath({0x0?, 0x0?, 0x0?}, 0xc006713860)
	/home/mvdan/src/c/cue/internal/core/adt/composite.go:1302 +0x28 fp=0xc0368c03b0 sp=0xc0368c0358 pc=0x6d9648
cuelang.org/go/internal/core/adt.appendPath({0x0?, 0x41b345?, 0x0?}, 0xc0074c94a0)
	/home/mvdan/src/c/cue/internal/core/adt/composite.go:1302 +0x28 fp=0xc0368c0408 sp=0xc0368c03b0 pc=0x6d9648
cuelang.org/go/internal/core/adt.appendPath({0x0?, 0x0?, 0x0?}, 0xc0153bc960)
	/home/mvdan/src/c/cue/internal/core/adt/composite.go:1302 +0x28 fp=0xc0368c0460 sp=0xc0368c0408 pc=0x6d9648
cuelang.org/go/internal/core/adt.(*ValueError).Path(0xc0168d7d50)
	/home/mvdan/src/c/cue/internal/core/adt/errors.go:418 +0x39 fp=0xc0368c04f8 sp=0xc0368c0460 pc=0x6fb0b9
cuelang.org/go/cue/errors.writeErr({0xf2aa00, 0xc01deb68a0}, {0xf36000, 0xc0168d7d50})
	/home/mvdan/src/c/cue/cue/errors/errors.go:544 +0x38 fp=0xc0368c0570 sp=0xc0368c04f8 pc=0x603ed8
cuelang.org/go/cue/errors.String(...)
	/home/mvdan/src/c/cue/cue/errors/errors.go:539
cuelang.org/go/internal/core/adt.(*ValueError).Error(0xc0168d7d50)
	/home/mvdan/src/c/cue/internal/core/adt/errors.go:403 +0x47 fp=0xc0368c05a8 sp=0xc0368c0570 pc=0x6fafe7
cuelang.org/go/internal/core/debug.(*compactPrinter).node(0xc0368c0ce0, {0xf2db30?, 0xc0168e7c40})
	/home/mvdan/src/c/cue/internal/core/debug/compact.go:161 +0xb66 fp=0xc0368c0938 sp=0xc0368c05a8 pc=0x72c846
cuelang.org/go/internal/core/debug.(*compactPrinter).node(0xc0368c0ce0, {0xf2db08?, 0xc0153bc960})
	/home/mvdan/src/c/cue/internal/core/debug/compact.go:95 +0x3377 fp=0xc0368c0cc8 sp=0xc0368c0938 pc=0x72f057
cuelang.org/go/internal/core/debug.AppendNode({0xc01deb5400?, 0x0?, 0x0?}, {0xf30f00?, 0xc0002b3700?}, {0xf2db08?, 0xc0153bc960?}, 0x0?)
	/home/mvdan/src/c/cue/internal/core/debug/debug.go:51 +0x206 fp=0xc0368c0db0 sp=0xc0368c0cc8 pc=0x7318e6
cuelang.org/go/internal/core/debug.NodeString(...)
	/home/mvdan/src/c/cue/internal/core/debug/debug.go:64
cuelang.org/go/internal/core/eval.nodeFormat({0xf39480?, 0xc0002b3700}, {0xf2db08, 0xc0153bc960})
	/home/mvdan/src/c/cue/internal/core/eval/eval.go:63 +0x85 fp=0xc0368c0e10 sp=0xc0368c0db0 pc=0x736525
cuelang.org/go/internal/core/adt.(*OpContext).Str(0x0?, {0xf2db08?, 0xc0153bc960?})
	/home/mvdan/src/c/cue/internal/core/adt/context.go:1395 +0x77 fp=0xc0368c0e58 sp=0xc0368c0e10 pc=0x6ebeb7
cuelang.org/go/internal/core/adt.(*OpContext).NewPosf.(*OpContext).Stringer.func1()
	/home/mvdan/src/c/cue/internal/core/adt/context.go:1400 +0x1f fp=0xc0368c0e80 sp=0xc0368c0e58 pc=0x6faf7f
cuelang.org/go/internal/core/adt.stringerFunc.String(0x0?)
	/home/mvdan/src/c/cue/internal/core/adt/context.go:1388 +0x12 fp=0xc0368c0e90 sp=0xc0368c0e80 pc=0x6ebe12
fmt.(*pp).handleMethods(0xc01deba270, 0x0?)
	/home/mvdan/tip/src/fmt/print.go:673 +0x31f fp=0xc0368c1050 sp=0xc0368c0e90 pc=0x5184df
fmt.(*pp).printArg(0xc01deba270, {0xce7520, 0xc0168ea500}, 0x76)
	/home/mvdan/tip/src/fmt/print.go:756 +0x446 fp=0xc0368c10e8 sp=0xc0368c1050 pc=0x518de6
fmt.(*pp).doPrintf(0xc01deba270, {0xde5359, 0x22}, {0xc0168ea4c0, 0x2, 0x2})
	/home/mvdan/tip/src/fmt/print.go:1074 +0x37e fp=0xc0368c11d0 sp=0xc0368c10e8 pc=0x51b8fe
fmt.Fprintf({0xf2aa00, 0xc01deb6860}, {0xde5359, 0x22}, {0xc0168ea4c0, 0x2, 0x2})
	/home/mvdan/tip/src/fmt/print.go:224 +0x71 fp=0xc0368c1230 sp=0xc0368c11d0 pc=0x5157f1
cuelang.org/go/cue/errors.writeErr({0xf2aa00, 0xc01deb6860}, {0xf36000, 0xc0168d7d50})
	/home/mvdan/src/c/cue/cue/errors/errors.go:553 +0x13a fp=0xc0368c12a8 sp=0xc0368c1230 pc=0x603fda
cuelang.org/go/cue/errors.String(...)
	/home/mvdan/src/c/cue/cue/errors/errors.go:539
cuelang.org/go/internal/core/adt.(*ValueError).Error(0xc0168d7d50)
	/home/mvdan/src/c/cue/internal/core/adt/errors.go:403 +0x47 fp=0xc0368c12e0 sp=0xc0368c12a8 pc=0x6fafe7
cuelang.org/go/internal/core/debug.(*compactPrinter).node(0xc0368c1a18, {0xf2db30?, 0xc0168e7c40})
	/home/mvdan/src/c/cue/internal/core/debug/compact.go:161 +0xb66 fp=0xc0368c1670 sp=0xc0368c12e0 pc=0x72c846
cuelang.org/go/internal/core/debug.(*compactPrinter).node(0xc0368c1a18, {0xf2db08?, 0xc0153bc960})
	/home/mvdan/src/c/cue/internal/core/debug/compact.go:95 +0x3377 fp=0xc0368c1a00 sp=0xc0368c1670 pc=0x72f057
cuelang.org/go/internal/core/debug.AppendNode({0xc01deb5380?, 0x0?, 0x0?}, {0xf30f00?, 0xc0002b3700?}, {0xf2db08?, 0xc0153bc960?}, 0x0?)
	/home/mvdan/src/c/cue/internal/core/debug/debug.go:51 +0x206 fp=0xc0368c1ae8 sp=0xc0368c1a00 pc=0x7318e6
cuelang.org/go/internal/core/debug.NodeString(...)
	/home/mvdan/src/c/cue/internal/core/debug/debug.go:64
cuelang.org/go/internal/core/eval.nodeFormat({0xf39480?, 0xc0002b3700}, {0xf2db08, 0xc0153bc960})
	/home/mvdan/src/c/cue/internal/core/eval/eval.go:63 +0x85 fp=0xc0368c1b48 sp=0xc0368c1ae8 pc=0x736525
cuelang.org/go/internal/core/adt.(*OpContext).Str(0x0?, {0xf2db08?, 0xc0153bc960?})
	/home/mvdan/src/c/cue/internal/core/adt/context.go:1395 +0x77 fp=0xc0368c1b90 sp=0xc0368c1b48 pc=0x6ebeb7
cuelang.org/go/internal/core/adt.(*OpContext).NewPosf.(*OpContext).Stringer.func1()
	/home/mvdan/src/c/cue/internal/core/adt/context.go:1400 +0x1f fp=0xc0368c1bb8 sp=0xc0368c1b90 pc=0x6faf7f
cuelang.org/go/internal/core/adt.stringerFunc.String(0x0?)
	/home/mvdan/src/c/cue/internal/core/adt/context.go:1388 +0x12 fp=0xc0368c1bc8 sp=0xc0368c1bb8 pc=0x6ebe12
fmt.(*pp).handleMethods(0xc01deba1a0, 0x0?)
	/home/mvdan/tip/src/fmt/print.go:673 +0x31f fp=0xc0368c1d88 sp=0xc0368c1bc8 pc=0x5184df
fmt.(*pp).printArg(0xc01deba1a0, {0xce7520, 0xc0168ea500}, 0x76)
	/home/mvdan/tip/src/fmt/print.go:756 +0x446 fp=0xc0368c1e20 sp=0xc0368c1d88 pc=0x518de6
fmt.(*pp).doPrintf(0xc01deba1a0, {0xde5359, 0x22}, {0xc0168ea4c0, 0x2, 0x2})
	/home/mvdan/tip/src/fmt/print.go:1074 +0x37e fp=0xc0368c1f08 sp=0xc0368c1e20 pc=0x51b8fe
fmt.Fprintf({0xf2aa00, 0xc01deb6820}, {0xde5359, 0x22}, {0xc0168ea4c0, 0x2, 0x2})
	/home/mvdan/tip/src/fmt/print.go:224 +0x71 fp=0xc0368c1f68 sp=0xc0368c1f08 pc=0x5157f1
cuelang.org/go/cue/errors.writeErr({0xf2aa00, 0xc01deb6820}, {0xf36000, 0xc0168d7d50})
	/home/mvdan/src/c/cue/cue/errors/errors.go:553 +0x13a fp=0xc0368c1fe0 sp=0xc0368c1f68 pc=0x603fda
cuelang.org/go/cue/errors.String(...)
	/home/mvdan/src/c/cue/cue/errors/errors.go:539
cuelang.org/go/internal/core/adt.(*ValueError).Error(0xc0168d7d50)
	/home/mvdan/src/c/cue/internal/core/adt/errors.go:403 +0x47 fp=0xc0368c2018 sp=0xc0368c1fe0 pc=0x6fafe7
cuelang.org/go/internal/core/debug.(*compactPrinter).node(0xc0368c2750, {0xf2db30?, 0xc0168e7c40})
	/home/mvdan/src/c/cue/internal/core/debug/compact.go:161 +0xb66 fp=0xc0368c23a8 sp=0xc0368c2018 pc=0x72c846
cuelang.org/go/internal/core/debug.(*compactPrinter).node(0xc0368c2750, {0xf2db08?, 0xc0153bc960})
	/home/mvdan/src/c/cue/internal/core/debug/compact.go:95 +0x3377 fp=0xc0368c2738 sp=0xc0368c23a8 pc=0x72f057
cuelang.org/go/internal/core/debug.AppendNode({0xc01deb5300?, 0x0?, 0x0?}, {0xf30f00?, 0xc0002b3700?}, {0xf2db08?, 0xc0153bc960?}, 0x0?)
	/home/mvdan/src/c/cue/internal/core/debug/debug.go:51 +0x206 fp=0xc0368c2820 sp=0xc0368c2738 pc=0x7318e6
cuelang.org/go/internal/core/debug.NodeString(...)
	/home/mvdan/src/c/cue/internal/core/debug/debug.go:64
cuelang.org/go/internal/core/eval.nodeFormat({0xf39480?, 0xc0002b3700}, {0xf2db08, 0xc0153bc960})
	/home/mvdan/src/c/cue/internal/core/eval/eval.go:63 +0x85 fp=0xc0368c2880 sp=0xc0368c2820 pc=0x736525
cuelang.org/go/internal/core/adt.(*OpContext).Str(0x0?, {0xf2db08?, 0xc0153bc960?})
	/home/mvdan/src/c/cue/internal/core/adt/context.go:1395 +0x77 fp=0xc0368c28c8 sp=0xc0368c2880 pc=0x6ebeb7
cuelang.org/go/internal/core/adt.(*OpContext).NewPosf.(*OpContext).Stringer.func1()
	/home/mvdan/src/c/cue/internal/core/adt/context.go:1400 +0x1f fp=0xc0368c28f0 sp=0xc0368c28c8 pc=0x6faf7f
cuelang.org/go/internal/core/adt.stringerFunc.String(0x0?)
	/home/mvdan/src/c/cue/internal/core/adt/context.go:1388 +0x12 fp=0xc0368c2900 sp=0xc0368c28f0 pc=0x6ebe12
fmt.(*pp).handleMethods(0xc01deba0d0, 0x0?)
	/home/mvdan/tip/src/fmt/print.go:673 +0x31f fp=0xc0368c2ac0 sp=0xc0368c2900 pc=0x5184df
fmt.(*pp).printArg(0xc01deba0d0, {0xce7520, 0xc0168ea500}, 0x76)
	/home/mvdan/tip/src/fmt/print.go:756 +0x446 fp=0xc0368c2b58 sp=0xc0368c2ac0 pc=0x518de6
fmt.(*pp).doPrintf(0xc01deba0d0, {0xde5359, 0x22}, {0xc0168ea4c0, 0x2, 0x2})
	/home/mvdan/tip/src/fmt/print.go:1074 +0x37e fp=0xc0368c2c40 sp=0xc0368c2b58 pc=0x51b8fe
fmt.Fprintf({0xf2aa00, 0xc01deb67e0}, {0xde5359, 0x22}, {0xc0168ea4c0, 0x2, 0x2})
	/home/mvdan/tip/src/fmt/print.go:224 +0x71 fp=0xc0368c2ca0 sp=0xc0368c2c40 pc=0x5157f1
...2379570 frames elided...
cuelang.org/go/cue/errors.writeErr({0xf2aa00, 0xc0168ea6e0}, {0xf36000, 0xc0168d7d50})
	/home/mvdan/src/c/cue/cue/errors/errors.go:553 +0x13a fp=0xc0568b9128 sp=0xc0568b90b0 pc=0x603fda
cuelang.org/go/cue/errors.String(...)
	/home/mvdan/src/c/cue/cue/errors/errors.go:539
cuelang.org/go/internal/core/adt.(*ValueError).Error(0xc0168d7d50)
	/home/mvdan/src/c/cue/internal/core/adt/errors.go:403 +0x47 fp=0xc0568b9160 sp=0xc0568b9128 pc=0x6fafe7
cuelang.org/go/cue/errors.approximateEqual({0xf36000, 0xc0168d7c70}, {0xf36000, 0xc0168d7d50})
	/home/mvdan/src/c/cue/cue/errors/errors.go:444 +0xc9 fp=0xc0568b91d8 sp=0xc0568b9160 pc=0x603829
cuelang.org/go/cue/errors.(*list).RemoveMultiples(0xc0568b9268)
	/home/mvdan/src/c/cue/cue/errors/errors.go:431 +0x9e fp=0xc0568b9240 sp=0xc0568b91d8 pc=0x60367e
cuelang.org/go/cue/errors.list.sanitize(...)
	/home/mvdan/src/c/cue/cue/errors/errors.go:402
cuelang.org/go/cue/errors.Sanitize({0xf36200?, 0xc00c2f92d8?})
	/home/mvdan/src/c/cue/cue/errors/errors.go:387 +0x7d fp=0xc0568b9290 sp=0xc0568b9240 pc=0x6034dd
cuelang.org/go/internal/core/adt.(*nodeContext).disjunctError(0x6f4860?)
	/home/mvdan/src/c/cue/internal/core/adt/disjunct.go:586 +0x4a fp=0xc0568b92f8 sp=0xc0568b9290 pc=0x6f4f0a
cuelang.org/go/internal/core/adt.(*nodeContext).makeError(0xc015fe4c08)
	/home/mvdan/src/c/cue/internal/core/adt/disjunct.go:469 +0x45 fp=0xc0568b9330 sp=0xc0568b92f8 pc=0x6f48e5
cuelang.org/go/internal/core/adt.(*nodeContext).expandDisjuncts(0xc015fe4c08, 0x5, 0xc014d4e608, 0x0, 0x1, 0x1)
	/home/mvdan/src/c/cue/internal/core/adt/disjunct.go:295 +0x1268 fp=0xc0568b9c60 sp=0xc0568b9330 pc=0x6f37c8
cuelang.org/go/internal/core/adt.(*nodeContext).expandDisjuncts(0xc014d4e608, 0x5, 0xc014d4e608, 0x0, 0x0, 0x1)
	/home/mvdan/src/c/cue/internal/core/adt/disjunct.go:254 +0x1fa5 fp=0xc0568ba590 sp=0xc0568b9c60 pc=0x6f4505
cuelang.org/go/internal/core/adt.(*OpContext).unify(0xc002462000, 0xc0153bc960, 0x7fff0105)
	/home/mvdan/src/c/cue/internal/core/adt/eval.go:302 +0x57c fp=0xc0568ba7e0 sp=0xc0568ba590 pc=0x6fbf9c
cuelang.org/go/internal/core/adt.(*nodeContext).completeArcs(0xc00e824608, 0x5)
	/home/mvdan/src/c/cue/internal/core/adt/eval.go:811 +0x1b2 fp=0xc0568ba958 sp=0xc0568ba7e0 pc=0x6fe0d2
cuelang.org/go/internal/core/adt.(*nodeContext).postDisjunct(0xc00e824608, 0x5)
	/home/mvdan/src/c/cue/internal/core/adt/eval.go:595 +0x22e fp=0xc0568baa20 sp=0xc0568ba958 pc=0x6fd36e
cuelang.org/go/internal/core/adt.(*nodeContext).expandDisjuncts(0xc00e824608, 0x5, 0xc005fa2c08, 0x0, 0x1, 0x1)
	/home/mvdan/src/c/cue/internal/core/adt/disjunct.go:176 +0x3c5 fp=0xc0568bb350 sp=0xc0568baa20 pc=0x6f2925
cuelang.org/go/internal/core/adt.(*nodeContext).expandDisjuncts(0xc005fa2c08, 0x5, 0xc005fa2c08, 0x0, 0x0, 0x1)
	/home/mvdan/src/c/cue/internal/core/adt/disjunct.go:254 +0x1fa5 fp=0xc0568bbc80 sp=0xc0568bb350 pc=0x6f4505
cuelang.org/go/internal/core/adt.(*OpContext).unify(0xc002462000, 0xc0074c94a0, 0x7fff0105)
	/home/mvdan/src/c/cue/internal/core/adt/eval.go:302 +0x57c fp=0xc0568bbed0 sp=0xc0568bbc80 pc=0x6fbf9c
cuelang.org/go/internal/core/adt.(*nodeContext).completeArcs(0xc0063bc008, 0x5)
	/home/mvdan/src/c/cue/internal/core/adt/eval.go:811 +0x1b2 fp=0xc0568bc048 sp=0xc0568bbed0 pc=0x6fe0d2
cuelang.org/go/internal/core/adt.(*nodeContext).postDisjunct(0xc0063bc008, 0x5)
	/home/mvdan/src/c/cue/internal/core/adt/eval.go:595 +0x22e fp=0xc0568bc110 sp=0xc0568bc048 pc=0x6fd36e
cuelang.org/go/internal/core/adt.(*nodeContext).expandDisjuncts(0xc0063bc008, 0x5, 0xc0063bc008, 0x0, 0x0, 0x1)
	/home/mvdan/src/c/cue/internal/core/adt/disjunct.go:176 +0x3c5 fp=0xc0568bca40 sp=0xc0568bc110 pc=0x6f2925
cuelang.org/go/internal/core/adt.(*OpContext).unify(0xc002462000, 0xc006713860, 0x7fff0105)
	/home/mvdan/src/c/cue/internal/core/adt/eval.go:302 +0x57c fp=0xc0568bcc90 sp=0xc0568bca40 pc=0x6fbf9c
cuelang.org/go/internal/core/adt.(*nodeContext).completeArcs(0xc002465808, 0x5)
	/home/mvdan/src/c/cue/internal/core/adt/eval.go:811 +0x1b2 fp=0xc0568bce08 sp=0xc0568bcc90 pc=0x6fe0d2
cuelang.org/go/internal/core/adt.(*nodeContext).postDisjunct(0xc002465808, 0x5)
	/home/mvdan/src/c/cue/internal/core/adt/eval.go:595 +0x22e fp=0xc0568bced0 sp=0xc0568bce08 pc=0x6fd36e
cuelang.org/go/internal/core/adt.(*nodeContext).expandDisjuncts(0xc002465808, 0x5, 0xc002465808, 0x0, 0x0, 0x1)
	/home/mvdan/src/c/cue/internal/core/adt/disjunct.go:176 +0x3c5 fp=0xc0568bd800 sp=0xc0568bced0 pc=0x6f2925
cuelang.org/go/internal/core/adt.(*OpContext).unify(0xc002462000, 0xc002436dc0, 0x7fff0105)
	/home/mvdan/src/c/cue/internal/core/adt/eval.go:302 +0x57c fp=0xc0568bda50 sp=0xc0568bd800 pc=0x6fbf9c
cuelang.org/go/internal/core/adt.(*nodeContext).completeArcs(0xc002464008, 0x5)
	/home/mvdan/src/c/cue/internal/core/adt/eval.go:811 +0x1b2 fp=0xc0568bdbc8 sp=0xc0568bda50 pc=0x6fe0d2
cuelang.org/go/internal/core/adt.(*nodeContext).postDisjunct(0xc002464008, 0x5)
	/home/mvdan/src/c/cue/internal/core/adt/eval.go:595 +0x22e fp=0xc0568bdc90 sp=0xc0568bdbc8 pc=0x6fd36e
cuelang.org/go/internal/core/adt.(*nodeContext).expandDisjuncts(0xc002464008, 0x5, 0xc002464008, 0x0, 0x0, 0x1)
	/home/mvdan/src/c/cue/internal/core/adt/disjunct.go:176 +0x3c5 fp=0xc0568be5c0 sp=0xc0568bdc90 pc=0x6f2925
cuelang.org/go/internal/core/adt.(*OpContext).unify(0xc002462000, 0xc002436a00, 0x7fff0105)
	/home/mvdan/src/c/cue/internal/core/adt/eval.go:302 +0x57c fp=0xc0568be810 sp=0xc0568be5c0 pc=0x6fbf9c
cuelang.org/go/internal/core/adt.(*nodeContext).completeArcs(0xc00243f808, 0x5)
	/home/mvdan/src/c/cue/internal/core/adt/eval.go:811 +0x1b2 fp=0xc0568be988 sp=0xc0568be810 pc=0x6fe0d2
cuelang.org/go/internal/core/adt.(*nodeContext).postDisjunct(0xc00243f808, 0x5)
	/home/mvdan/src/c/cue/internal/core/adt/eval.go:595 +0x22e fp=0xc0568bea50 sp=0xc0568be988 pc=0x6fd36e
cuelang.org/go/internal/core/adt.(*nodeContext).expandDisjuncts(0xc00243f808, 0x5, 0xc00243f808, 0x0, 0x0, 0x1)
	/home/mvdan/src/c/cue/internal/core/adt/disjunct.go:176 +0x3c5 fp=0xc0568bf380 sp=0xc0568bea50 pc=0x6f2925
cuelang.org/go/internal/core/adt.(*OpContext).unify(0xc002462000, 0xc002436820, 0x7fff0405)
	/home/mvdan/src/c/cue/internal/core/adt/eval.go:302 +0x57c fp=0xc0568bf5d0 sp=0xc0568bf380 pc=0x6fbf9c
cuelang.org/go/internal/core/adt.(*Vertex).Finalize(0xc0002bfb30?, 0xc002462000)
	/home/mvdan/src/c/cue/internal/core/adt/composite.go:816 +0x59 fp=0xc0568bf600 sp=0xc0568bf5d0 pc=0x6d6d59
cuelang.org/go/cue.newVertexRoot(0xc0002b3700, 0xf2db58?, 0xc002436820)
	/home/mvdan/src/c/cue/cue/types.go:602 +0x25 fp=0xc0568bf628 sp=0xc0568bf600 pc=0x7b3185
cuelang.org/go/cue.newValueRoot(0x0?, 0xc0008bd740?, {0xf35ac0?, 0xc002436820?})
	/home/mvdan/src/c/cue/cue/types.go:611 +0x3e fp=0xc0568bf700 sp=0xc0568bf628 pc=0x7b321e
cuelang.org/go/cue.(*Context).make(0xc0002b3700, 0xc002436820)
	/home/mvdan/src/c/cue/cue/context.go:257 +0x79 fp=0xc0568bf768 sp=0xc0568bf700 pc=0x7a2419
cuelang.org/go/cue.(*Context).BuildInstances(0xc0002b3700, {0xc000629d80, 0xd, 0xc000255820?})
	/home/mvdan/src/c/cue/cue/context.go:152 +0x1e5 fp=0xc0568bf818 sp=0xc0568bf768 pc=0x7a1765
cuelang.org/go/cmd/cue/cmd.buildInstances(0xc0002bfb90, {0xc000629d80, 0xd, 0x0?}, 0x0)
	/home/mvdan/src/c/cue/cmd/cue/cmd/common.go:736 +0x46 fp=0xc0568bf8b8 sp=0xc0568bf818 pc=0xbfa426
cuelang.org/go/cmd/cue/cmd.(*buildPlan).instances(0xc00032c0d0)
	/home/mvdan/src/c/cue/cmd/cue/cmd/common.go:173 +0x48 fp=0xc0568bf920 sp=0xc0568bf8b8 pc=0xbf6308
cuelang.org/go/cmd/cue/cmd.doVet(0xc0002bfb90, {0xc0002ab8c0, 0x1, 0x2})
	/home/mvdan/src/c/cue/cmd/cue/cmd/vet.go:106 +0xaf fp=0xc0568bfa20 sp=0xc0568bf920 pc=0xc25fef
cuelang.org/go/cmd/cue/cmd.newVetCmd.mkRunE.func1(0xc0001b9800?, {0xc0002ab8c0, 0x1, 0x2})
	/home/mvdan/src/c/cue/cmd/cue/cmd/root.go:123 +0x29d fp=0xc0568bfc08 sp=0xc0568bfa20 pc=0xc2595d
github.com/spf13/cobra.(*Command).execute(0xc000320908, {0xc0002ab8a0, 0x2, 0x2})
	/home/mvdan/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:983 +0xaaa fp=0xc0568bfd90 sp=0xc0568bfc08 pc=0x5f196a
github.com/spf13/cobra.(*Command).ExecuteC(0xc0002ca608)
	/home/mvdan/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1115 +0x3ff fp=0xc0568bfe68 sp=0xc0568bfd90 pc=0x5f223f
github.com/spf13/cobra.(*Command).Execute(...)
	/home/mvdan/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1039
cuelang.org/go/cmd/cue/cmd.(*Command).Run(0xc0002bfb90, {0x14f7b20?, 0xce7e80?})
	/home/mvdan/src/c/cue/cmd/cue/cmd/root.go:344 +0x5a fp=0xc0568bfeb0 sp=0xc0568bfe68 pc=0xc23a7a
cuelang.org/go/cmd/cue/cmd.Main()
	/home/mvdan/src/c/cue/cmd/cue/cmd/root.go:272 +0xa5 fp=0xc0568bff38 sp=0xc0568bfeb0 pc=0xc23785
main.main()
	/home/mvdan/src/c/cue/cmd/cue/main.go:24 +0x13 fp=0xc0568bff50 sp=0xc0568bff38 pc=0xc44593
runtime.main()
	/home/mvdan/tip/src/runtime/proc.go:270 +0x28b fp=0xc0568bffe0 sp=0xc0568bff50 pc=0x4423eb
runtime.goexit({})
	/home/mvdan/tip/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc0568bffe8 sp=0xc0568bffe0 pc=0x479ce1

goroutine 2 gp=0xc000004c40 m=nil [force gc (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
	/home/mvdan/tip/src/runtime/proc.go:401 +0xce fp=0xc000084fa8 sp=0xc000084f88 pc=0x44282e
runtime.goparkunlock(...)
	/home/mvdan/tip/src/runtime/proc.go:407
runtime.forcegchelper()
	/home/mvdan/tip/src/runtime/proc.go:325 +0xb3 fp=0xc000084fe0 sp=0xc000084fa8 pc=0x4426b3
runtime.goexit({})
	/home/mvdan/tip/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc000084fe8 sp=0xc000084fe0 pc=0x479ce1
created by runtime.init.6 in goroutine 1
	/home/mvdan/tip/src/runtime/proc.go:313 +0x1a

goroutine 3 gp=0xc000005180 m=nil [GC sweep wait]:
runtime.gopark(0x1?, 0x0?, 0x0?, 0x0?, 0x0?)
	/home/mvdan/tip/src/runtime/proc.go:401 +0xce fp=0xc000085780 sp=0xc000085760 pc=0x44282e
runtime.goparkunlock(...)
	/home/mvdan/tip/src/runtime/proc.go:407
runtime.bgsweep(0xc000040080)
	/home/mvdan/tip/src/runtime/mgcsweep.go:317 +0xdf fp=0xc0000857c8 sp=0xc000085780 pc=0x42c29f
runtime.gcenable.gowrap1()
	/home/mvdan/tip/src/runtime/mgc.go:203 +0x25 fp=0xc0000857e0 sp=0xc0000857c8 pc=0x420a05
runtime.goexit({})
	/home/mvdan/tip/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc0000857e8 sp=0xc0000857e0 pc=0x479ce1
created by runtime.gcenable in goroutine 1
	/home/mvdan/tip/src/runtime/mgc.go:203 +0x66

goroutine 4 gp=0xc000005340 m=nil [GC scavenge wait]:
runtime.gopark(0x1fdd86?, 0x3b9aca00?, 0x0?, 0x0?, 0x0?)
	/home/mvdan/tip/src/runtime/proc.go:401 +0xce fp=0xc000085f78 sp=0xc000085f58 pc=0x44282e
runtime.goparkunlock(...)
	/home/mvdan/tip/src/runtime/proc.go:407
runtime.(*scavengerState).park(0x14d3960)
	/home/mvdan/tip/src/runtime/mgcscavenge.go:425 +0x49 fp=0xc000085fa8 sp=0xc000085f78 pc=0x429ce9
runtime.bgscavenge(0xc000040080)
	/home/mvdan/tip/src/runtime/mgcscavenge.go:658 +0x59 fp=0xc000085fc8 sp=0xc000085fa8 pc=0x42a279
runtime.gcenable.gowrap2()
	/home/mvdan/tip/src/runtime/mgc.go:204 +0x25 fp=0xc000085fe0 sp=0xc000085fc8 pc=0x4209a5
runtime.goexit({})
	/home/mvdan/tip/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc000085fe8 sp=0xc000085fe0 pc=0x479ce1
created by runtime.gcenable in goroutine 1
	/home/mvdan/tip/src/runtime/mgc.go:204 +0xa5

goroutine 18 gp=0xc000104700 m=nil [finalizer wait]:
runtime.gopark(0xc000084648?, 0x4138a5?, 0xb0?, 0x1?, 0xc0000041c0?)
	/home/mvdan/tip/src/runtime/proc.go:401 +0xce fp=0xc000084620 sp=0xc000084600 pc=0x44282e
runtime.runfinq()
	/home/mvdan/tip/src/runtime/mfinal.go:193 +0x107 fp=0xc0000847e0 sp=0xc000084620 pc=0x41fa87
runtime.goexit({})
	/home/mvdan/tip/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc0000847e8 sp=0xc0000847e0 pc=0x479ce1
created by runtime.createfing in goroutine 1
	/home/mvdan/tip/src/runtime/mfinal.go:163 +0x3d

goroutine 19 gp=0xc000104a80 m=nil [chan receive]:
runtime.gopark(0xc000080760?, 0x58ab85?, 0xc0?, 0xe9?, 0xf45c80?)
	/home/mvdan/tip/src/runtime/proc.go:401 +0xce fp=0xc000080718 sp=0xc0000806f8 pc=0x44282e
runtime.chanrecv(0xc00022c310, 0x0, 0x1)
	/home/mvdan/tip/src/runtime/chan.go:629 +0x41c fp=0xc000080790 sp=0xc000080718 pc=0x40bdfc
runtime.chanrecv1(0x0?, 0x0?)
	/home/mvdan/tip/src/runtime/chan.go:479 +0x12 fp=0xc0000807b8 sp=0xc000080790 pc=0x40b9b2
runtime.unique_runtime_registerUniqueMapCleanup.func1(...)
	/home/mvdan/tip/src/runtime/mgc.go:1712
runtime.unique_runtime_registerUniqueMapCleanup.gowrap1()
	/home/mvdan/tip/src/runtime/mgc.go:1715 +0x2f fp=0xc0000807e0 sp=0xc0000807b8 pc=0x423a0f
runtime.goexit({})
	/home/mvdan/tip/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc0000807e8 sp=0xc0000807e0 pc=0x479ce1
created by unique.runtime_registerUniqueMapCleanup in goroutine 1
	/home/mvdan/tip/src/runtime/mgc.go:1710 +0x96

goroutine 20 gp=0xc000105340 m=nil [GC worker (idle)]:
runtime.gopark(0x14f93a0?, 0x1?, 0x62?, 0xf1?, 0x0?)
	/home/mvdan/tip/src/runtime/proc.go:401 +0xce fp=0xc000080f38 sp=0xc000080f18 pc=0x44282e
runtime.gcBgMarkWorker(0xc00022c4d0)
	/home/mvdan/tip/src/runtime/mgc.go:1352 +0xe9 fp=0xc000080fc8 sp=0xc000080f38 pc=0x422d29
runtime.gcBgMarkStartWorkers.gowrap1()
	/home/mvdan/tip/src/runtime/mgc.go:1268 +0x25 fp=0xc000080fe0 sp=0xc000080fc8 pc=0x422c05
runtime.goexit({})
	/home/mvdan/tip/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc000080fe8 sp=0xc000080fe0 pc=0x479ce1
created by runtime.gcBgMarkStartWorkers in goroutine 1
	/home/mvdan/tip/src/runtime/mgc.go:1268 +0x105

goroutine 21 gp=0xc000105500 m=nil [GC worker (idle)]:
runtime.gopark(0x316e47360f8?, 0x3?, 0xb0?, 0x36?, 0x0?)
	/home/mvdan/tip/src/runtime/proc.go:401 +0xce fp=0xc000081738 sp=0xc000081718 pc=0x44282e
runtime.gcBgMarkWorker(0xc00022c4d0)
	/home/mvdan/tip/src/runtime/mgc.go:1352 +0xe9 fp=0xc0000817c8 sp=0xc000081738 pc=0x422d29
runtime.gcBgMarkStartWorkers.gowrap1()
	/home/mvdan/tip/src/runtime/mgc.go:1268 +0x25 fp=0xc0000817e0 sp=0xc0000817c8 pc=0x422c05
runtime.goexit({})
	/home/mvdan/tip/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc0000817e8 sp=0xc0000817e0 pc=0x479ce1
created by runtime.gcBgMarkStartWorkers in goroutine 1
	/home/mvdan/tip/src/runtime/mgc.go:1268 +0x105

goroutine 22 gp=0xc0001056c0 m=nil [GC worker (idle)]:
runtime.gopark(0x316e4737a86?, 0x3?, 0x6?, 0x51?, 0x0?)
	/home/mvdan/tip/src/runtime/proc.go:401 +0xce fp=0xc000081f38 sp=0xc000081f18 pc=0x44282e
runtime.gcBgMarkWorker(0xc00022c4d0)
	/home/mvdan/tip/src/runtime/mgc.go:1352 +0xe9 fp=0xc000081fc8 sp=0xc000081f38 pc=0x422d29
runtime.gcBgMarkStartWorkers.gowrap1()
	/home/mvdan/tip/src/runtime/mgc.go:1268 +0x25 fp=0xc000081fe0 sp=0xc000081fc8 pc=0x422c05
runtime.goexit({})
	/home/mvdan/tip/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc000081fe8 sp=0xc000081fe0 pc=0x479ce1
created by runtime.gcBgMarkStartWorkers in goroutine 1
	/home/mvdan/tip/src/runtime/mgc.go:1268 +0x105

goroutine 23 gp=0xc000105880 m=nil [GC worker (idle)]:
runtime.gopark(0x316e4736fc3?, 0x3?, 0xf3?, 0x5?, 0x0?)
	/home/mvdan/tip/src/runtime/proc.go:401 +0xce fp=0xc000082738 sp=0xc000082718 pc=0x44282e
runtime.gcBgMarkWorker(0xc00022c4d0)
	/home/mvdan/tip/src/runtime/mgc.go:1352 +0xe9 fp=0xc0000827c8 sp=0xc000082738 pc=0x422d29
runtime.gcBgMarkStartWorkers.gowrap1()
	/home/mvdan/tip/src/runtime/mgc.go:1268 +0x25 fp=0xc0000827e0 sp=0xc0000827c8 pc=0x422c05
runtime.goexit({})
	/home/mvdan/tip/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc0000827e8 sp=0xc0000827e0 pc=0x479ce1
created by runtime.gcBgMarkStartWorkers in goroutine 1
	/home/mvdan/tip/src/runtime/mgc.go:1268 +0x105

goroutine 24 gp=0xc000105a40 m=nil [GC worker (idle)]:
runtime.gopark(0x316e4736d06?, 0x1?, 0x8f?, 0x6e?, 0x0?)
	/home/mvdan/tip/src/runtime/proc.go:401 +0xce fp=0xc000082f38 sp=0xc000082f18 pc=0x44282e
runtime.gcBgMarkWorker(0xc00022c4d0)
	/home/mvdan/tip/src/runtime/mgc.go:1352 +0xe9 fp=0xc000082fc8 sp=0xc000082f38 pc=0x422d29
runtime.gcBgMarkStartWorkers.gowrap1()
	/home/mvdan/tip/src/runtime/mgc.go:1268 +0x25 fp=0xc000082fe0 sp=0xc000082fc8 pc=0x422c05
runtime.goexit({})
	/home/mvdan/tip/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc000082fe8 sp=0xc000082fe0 pc=0x479ce1
created by runtime.gcBgMarkStartWorkers in goroutine 1
	/home/mvdan/tip/src/runtime/mgc.go:1268 +0x105

goroutine 25 gp=0xc000105c00 m=nil [GC worker (idle)]:
runtime.gopark(0x316e4736b1b?, 0x3?, 0x83?, 0xbe?, 0x0?)
	/home/mvdan/tip/src/runtime/proc.go:401 +0xce fp=0xc000083738 sp=0xc000083718 pc=0x44282e
runtime.gcBgMarkWorker(0xc00022c4d0)
	/home/mvdan/tip/src/runtime/mgc.go:1352 +0xe9 fp=0xc0000837c8 sp=0xc000083738 pc=0x422d29
runtime.gcBgMarkStartWorkers.gowrap1()
	/home/mvdan/tip/src/runtime/mgc.go:1268 +0x25 fp=0xc0000837e0 sp=0xc0000837c8 pc=0x422c05
runtime.goexit({})
	/home/mvdan/tip/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc0000837e8 sp=0xc0000837e0 pc=0x479ce1
created by runtime.gcBgMarkStartWorkers in goroutine 1
	/home/mvdan/tip/src/runtime/mgc.go:1268 +0x105

goroutine 26 gp=0xc000105dc0 m=nil [GC worker (idle)]:
runtime.gopark(0x316e473714a?, 0x3?, 0x38?, 0x6b?, 0x0?)
	/home/mvdan/tip/src/runtime/proc.go:401 +0xce fp=0xc000083f38 sp=0xc000083f18 pc=0x44282e
runtime.gcBgMarkWorker(0xc00022c4d0)
	/home/mvdan/tip/src/runtime/mgc.go:1352 +0xe9 fp=0xc000083fc8 sp=0xc000083f38 pc=0x422d29
runtime.gcBgMarkStartWorkers.gowrap1()
	/home/mvdan/tip/src/runtime/mgc.go:1268 +0x25 fp=0xc000083fe0 sp=0xc000083fc8 pc=0x422c05
runtime.goexit({})
	/home/mvdan/tip/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc000083fe8 sp=0xc000083fe0 pc=0x479ce1
created by runtime.gcBgMarkStartWorkers in goroutine 1
	/home/mvdan/tip/src/runtime/mgc.go:1268 +0x105

goroutine 27 gp=0xc000482000 m=nil [GC worker (idle)]:
runtime.gopark(0x316e47361fc?, 0x3?, 0x6f?, 0xc2?, 0x0?)
	/home/mvdan/tip/src/runtime/proc.go:401 +0xce fp=0xc000488738 sp=0xc000488718 pc=0x44282e
runtime.gcBgMarkWorker(0xc00022c4d0)
	/home/mvdan/tip/src/runtime/mgc.go:1352 +0xe9 fp=0xc0004887c8 sp=0xc000488738 pc=0x422d29
runtime.gcBgMarkStartWorkers.gowrap1()
	/home/mvdan/tip/src/runtime/mgc.go:1268 +0x25 fp=0xc0004887e0 sp=0xc0004887c8 pc=0x422c05
runtime.goexit({})
	/home/mvdan/tip/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc0004887e8 sp=0xc0004887e0 pc=0x479ce1
created by runtime.gcBgMarkStartWorkers in goroutine 1
	/home/mvdan/tip/src/runtime/mgc.go:1268 +0x105

goroutine 28 gp=0xc0004821c0 m=nil [GC worker (idle)]:
runtime.gopark(0x316e4736419?, 0x1?, 0x91?, 0x6a?, 0x0?)
	/home/mvdan/tip/src/runtime/proc.go:401 +0xce fp=0xc000488f38 sp=0xc000488f18 pc=0x44282e
runtime.gcBgMarkWorker(0xc00022c4d0)
	/home/mvdan/tip/src/runtime/mgc.go:1352 +0xe9 fp=0xc000488fc8 sp=0xc000488f38 pc=0x422d29
runtime.gcBgMarkStartWorkers.gowrap1()
	/home/mvdan/tip/src/runtime/mgc.go:1268 +0x25 fp=0xc000488fe0 sp=0xc000488fc8 pc=0x422c05
runtime.goexit({})
	/home/mvdan/tip/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc000488fe8 sp=0xc000488fe0 pc=0x479ce1
created by runtime.gcBgMarkStartWorkers in goroutine 1
	/home/mvdan/tip/src/runtime/mgc.go:1268 +0x105

goroutine 29 gp=0xc000482380 m=nil [GC worker (idle)]:
runtime.gopark(0x316e473655a?, 0x3?, 0xc2?, 0x17?, 0x0?)
	/home/mvdan/tip/src/runtime/proc.go:401 +0xce fp=0xc000489738 sp=0xc000489718 pc=0x44282e
runtime.gcBgMarkWorker(0xc00022c4d0)
	/home/mvdan/tip/src/runtime/mgc.go:1352 +0xe9 fp=0xc0004897c8 sp=0xc000489738 pc=0x422d29
runtime.gcBgMarkStartWorkers.gowrap1()
	/home/mvdan/tip/src/runtime/mgc.go:1268 +0x25 fp=0xc0004897e0 sp=0xc0004897c8 pc=0x422c05
runtime.goexit({})
	/home/mvdan/tip/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc0004897e8 sp=0xc0004897e0 pc=0x479ce1
created by runtime.gcBgMarkStartWorkers in goroutine 1
	/home/mvdan/tip/src/runtime/mgc.go:1268 +0x105

goroutine 30 gp=0xc000482540 m=nil [GC worker (idle)]:
runtime.gopark(0x316e47359ce?, 0x3?, 0x55?, 0xfd?, 0x0?)
	/home/mvdan/tip/src/runtime/proc.go:401 +0xce fp=0xc000489f38 sp=0xc000489f18 pc=0x44282e
runtime.gcBgMarkWorker(0xc00022c4d0)
	/home/mvdan/tip/src/runtime/mgc.go:1352 +0xe9 fp=0xc000489fc8 sp=0xc000489f38 pc=0x422d29
runtime.gcBgMarkStartWorkers.gowrap1()
	/home/mvdan/tip/src/runtime/mgc.go:1268 +0x25 fp=0xc000489fe0 sp=0xc000489fc8 pc=0x422c05
runtime.goexit({})
	/home/mvdan/tip/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc000489fe8 sp=0xc000489fe0 pc=0x479ce1
created by runtime.gcBgMarkStartWorkers in goroutine 1
	/home/mvdan/tip/src/runtime/mgc.go:1268 +0x105

goroutine 31 gp=0xc000482700 m=nil [GC worker (idle)]:
runtime.gopark(0x14f93a0?, 0x3?, 0x14?, 0xe?, 0x0?)
	/home/mvdan/tip/src/runtime/proc.go:401 +0xce fp=0xc00048a738 sp=0xc00048a718 pc=0x44282e
runtime.gcBgMarkWorker(0xc00022c4d0)
	/home/mvdan/tip/src/runtime/mgc.go:1352 +0xe9 fp=0xc00048a7c8 sp=0xc00048a738 pc=0x422d29
runtime.gcBgMarkStartWorkers.gowrap1()
	/home/mvdan/tip/src/runtime/mgc.go:1268 +0x25 fp=0xc00048a7e0 sp=0xc00048a7c8 pc=0x422c05
runtime.goexit({})
	/home/mvdan/tip/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc00048a7e8 sp=0xc00048a7e0 pc=0x479ce1
created by runtime.gcBgMarkStartWorkers in goroutine 1
	/home/mvdan/tip/src/runtime/mgc.go:1268 +0x105

goroutine 32 gp=0xc0004828c0 m=nil [GC worker (idle)]:
runtime.gopark(0x316e4736f4b?, 0x1?, 0x11?, 0x94?, 0x0?)
	/home/mvdan/tip/src/runtime/proc.go:401 +0xce fp=0xc00048af38 sp=0xc00048af18 pc=0x44282e
runtime.gcBgMarkWorker(0xc00022c4d0)
	/home/mvdan/tip/src/runtime/mgc.go:1352 +0xe9 fp=0xc00048afc8 sp=0xc00048af38 pc=0x422d29
runtime.gcBgMarkStartWorkers.gowrap1()
	/home/mvdan/tip/src/runtime/mgc.go:1268 +0x25 fp=0xc00048afe0 sp=0xc00048afc8 pc=0x422c05
runtime.goexit({})
	/home/mvdan/tip/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc00048afe8 sp=0xc00048afe0 pc=0x479ce1
created by runtime.gcBgMarkStartWorkers in goroutine 1
	/home/mvdan/tip/src/runtime/mgc.go:1268 +0x105

goroutine 33 gp=0xc000482a80 m=nil [GC worker (idle)]:
runtime.gopark(0x14f93a0?, 0x1?, 0x9b?, 0x13?, 0x0?)
	/home/mvdan/tip/src/runtime/proc.go:401 +0xce fp=0xc00048b738 sp=0xc00048b718 pc=0x44282e
runtime.gcBgMarkWorker(0xc00022c4d0)
	/home/mvdan/tip/src/runtime/mgc.go:1352 +0xe9 fp=0xc00048b7c8 sp=0xc00048b738 pc=0x422d29
runtime.gcBgMarkStartWorkers.gowrap1()
	/home/mvdan/tip/src/runtime/mgc.go:1268 +0x25 fp=0xc00048b7e0 sp=0xc00048b7c8 pc=0x422c05
runtime.goexit({})
	/home/mvdan/tip/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc00048b7e8 sp=0xc00048b7e0 pc=0x479ce1
created by runtime.gcBgMarkStartWorkers in goroutine 1
	/home/mvdan/tip/src/runtime/mgc.go:1268 +0x105

goroutine 34 gp=0xc000482c40 m=nil [GC worker (idle)]:
runtime.gopark(0x316e47370e5?, 0x3?, 0xf0?, 0x25?, 0x0?)
	/home/mvdan/tip/src/runtime/proc.go:401 +0xce fp=0xc00048bf38 sp=0xc00048bf18 pc=0x44282e
runtime.gcBgMarkWorker(0xc00022c4d0)
	/home/mvdan/tip/src/runtime/mgc.go:1352 +0xe9 fp=0xc00048bfc8 sp=0xc00048bf38 pc=0x422d29
runtime.gcBgMarkStartWorkers.gowrap1()
	/home/mvdan/tip/src/runtime/mgc.go:1268 +0x25 fp=0xc00048bfe0 sp=0xc00048bfc8 pc=0x422c05
runtime.goexit({})
	/home/mvdan/tip/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc00048bfe8 sp=0xc00048bfe0 pc=0x479ce1
created by runtime.gcBgMarkStartWorkers in goroutine 1
	/home/mvdan/tip/src/runtime/mgc.go:1268 +0x105

goroutine 35 gp=0xc000482e00 m=nil [GC worker (idle)]:
runtime.gopark(0x316e47365d2?, 0x3?, 0xfb?, 0x2f?, 0x0?)
	/home/mvdan/tip/src/runtime/proc.go:401 +0xce fp=0xc000484738 sp=0xc000484718 pc=0x44282e
runtime.gcBgMarkWorker(0xc00022c4d0)
	/home/mvdan/tip/src/runtime/mgc.go:1352 +0xe9 fp=0xc0004847c8 sp=0xc000484738 pc=0x422d29
runtime.gcBgMarkStartWorkers.gowrap1()
	/home/mvdan/tip/src/runtime/mgc.go:1268 +0x25 fp=0xc0004847e0 sp=0xc0004847c8 pc=0x422c05
runtime.goexit({})
	/home/mvdan/tip/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc0004847e8 sp=0xc0004847e0 pc=0x479ce1
created by runtime.gcBgMarkStartWorkers in goroutine 1
	/home/mvdan/tip/src/runtime/mgc.go:1268 +0x105

And, as extra proof that Go tip works on the parent commit without the fmt.Stringer:

$ git log -1 --oneline
a35caede (HEAD -> master, origin/master, origin/HEAD) encoding/toml: first decoder implementation
$ go version
go version devel go1.23-7f9edb4225 2024-05-11 20:38:24 +0000 linux/amd64
$ go install ./cmd/cue
$ cue vet -c=false ./...
[succeeds after about 2s]

I realise that this is a fairly poor reproducer, as it involves a large project with a lot of code. I haven't sat down to spend the time trying to create a small reproducer. I am hoping that by sharing the steps above, the root cause will be relatively easy to spot. My best guess is that it involves the use of a closure function, and perhaps the way that I convert it to a stringer type that is itself just a function.

I will try a git bisect shortly, although it might take a bit of time to get through it.

@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label May 11, 2024
@mvdan
Copy link
Member Author

mvdan commented May 11, 2024

Hmm, the bisect didn't work at all, correctly spotting that my building of Go 1.22.0 locally (or even 1.22.3) also results in a crash. The 1.22.3 that works comes from my Linux distro:

$ go env
GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/home/mvdan/.cache/go-build'
GOENV='/home/mvdan/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/home/mvdan/go/pkg/mod'
GONOPROXY='github.com/cue-unity'
GONOSUMDB='github.com/cue-unity'
GOOS='linux'
GOPATH='/home/mvdan/go'
GOPRIVATE='github.com/cue-unity'
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/lib/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/lib/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.22.3'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/home/mvdan/src/c/cue/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build3618018604=/tmp/go-build -gno-record-gcc-switches'

Whereas a locally built 1.22.3 from git fails, where the only apparent differences are GOROOT and GOTOOLDIR:

$ go env
GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/home/mvdan/.cache/go-build'
GOENV='/home/mvdan/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/home/mvdan/go/pkg/mod'
GONOPROXY='github.com/cue-unity'
GONOSUMDB='github.com/cue-unity'
GOOS='linux'
GOPATH='/home/mvdan/go'
GOPRIVATE='github.com/cue-unity'
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/home/mvdan/tip'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/home/mvdan/tip/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.22.3'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/home/mvdan/src/c/cue/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build2526892122=/tmp/go-build -gno-record-gcc-switches'

I'm really confused now. As far as I can tell, the Linux distro aren't doing anything like applying patches: https://gitlab.archlinux.org/archlinux/packaging/packages/go/-/blob/main/PKGBUILD

@mvdan
Copy link
Member Author

mvdan commented May 11, 2024

Please ignore me. This was me messing up with $PATH to the point that I wasn't even running the newly built cue binary in both cases.

@mvdan mvdan closed this as not planned Won't fix, can't repro, duplicate, stale May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime.
Projects
None yet
Development

No branches or pull requests

2 participants