cue-lang / cue

The home of the CUE language! Validate and define text-based and dynamic configuration
https://cuelang.org
Apache License 2.0
5.13k stars 294 forks source link

ci: investigate build failures on macos #528

Closed cueckoo closed 3 years ago

cueckoo commented 3 years ago

Originally opened by @myitcv in https://github.com/cuelang/cue/issues/528

For example https://github.com/cuelang/cue/runs/1128815995?check_suite_focus=true (which was macos-latest, go1.14.9)

Log: https://gist.github.com/myitcv/c080d20fd0102ee7903cb4a5dad4cce7

Appears to be some sort of issue in the Kubernetes tutorial from this run at least, causing the test to timeout:

panic: test timed out after 10m0s

goroutine 50 [running]:
testing.(*M).startAlarm.func1()
    /Users/runner/hostedtoolcache/go/1.14.9/x64/src/testing/testing.go:1524 +0x11c
created by time.goFunc
    /Users/runner/hostedtoolcache/go/1.14.9/x64/src/time/sleep.go:168 +0x52

goroutine 1 [chan receive, 9 minutes]:
testing.(*T).Run(0xc00028bc20, 0x1d0e203, 0xc, 0x1d4a428, 0x0)
    /Users/runner/hostedtoolcache/go/1.14.9/x64/src/testing/testing.go:1106 +0x739
testing.runTests.func1(0xc00028bc20)
    /Users/runner/hostedtoolcache/go/1.14.9/x64/src/testing/testing.go:1349 +0xa7
testing.tRunner(0xc00028bc20, 0xc0003c1d38)
    /Users/runner/hostedtoolcache/go/1.14.9/x64/src/testing/testing.go:1054 +0x1ec
testing.runTests(0xc0004a6000, 0x24dbfc0, 0x2, 0x2, 0x0)
    /Users/runner/hostedtoolcache/go/1.14.9/x64/src/testing/testing.go:1347 +0x528
testing.(*M).Run(0xc000494200, 0x0)
    /Users/runner/hostedtoolcache/go/1.14.9/x64/src/testing/testing.go:1264 +0x440
main.main()
    _testmain.go:46 +0x224

goroutine 3 [runnable]:
cuelang.org/go/internal/core/eval.(*fieldSet).MarkField(...)
    /Users/runner/work/cue/cue/internal/core/eval/optionals.go:152
cuelang.org/go/internal/core/eval.(*nodeContext).addStruct(0xc000c4cb00, 0xc000c36320, 0xc00047a870, 0x7)
    /Users/runner/work/cue/cue/internal/core/eval/eval.go:1325 +0x21d2
cuelang.org/go/internal/core/eval.(*nodeContext).addExprConjunct(0xc000c4cb00, 0xc000c36320, 0x1e8efe0, 0xc00047a870, 0xc000000007)
    /Users/runner/work/cue/cue/internal/core/eval/eval.go:936 +0x166
cuelang.org/go/internal/core/eval.(*nodeContext).evalExpr(0xc000c4cb00, 0xc000c362d0, 0x1e8eb20, 0xc00042ca90, 0x6)
    /Users/runner/work/cue/cue/internal/core/eval/eval.go:1066 +0x5c9
cuelang.org/go/internal/core/eval.(*nodeContext).addExprConjunct(0xc000c4cb00, 0xc000c362d0, 0x1e8eb20, 0xc00042ca90, 0xc000000006)
    /Users/runner/work/cue/cue/internal/core/eval/eval.go:949 +0xbe
cuelang.org/go/internal/core/eval.(*nodeContext).evalExpr(0xc000c4cb00, 0xc000c361e0, 0x1e8ef20, 0xc000481040, 0x6)
    /Users/runner/work/cue/cue/internal/core/eval/eval.go:1066 +0x5c9
cuelang.org/go/internal/core/eval.(*nodeContext).addExprConjunct(0xc000c4cb00, 0xc000c361e0, 0x1e8ef20, 0xc000481040, 0xc000000006)
    /Users/runner/work/cue/cue/internal/core/eval/eval.go:949 +0xbe
cuelang.org/go/internal/core/eval.(*nodeContext).addStruct(0xc000c4cb00, 0xc000c36190, 0xc0004848d0, 0x4)
    /Users/runner/work/cue/cue/internal/core/eval/eval.go:1359 +0x1768
cuelang.org/go/internal/core/eval.(*nodeContext).addExprConjunct(0xc000c4cb00, 0xc000c36190, 0x1e8efe0, 0xc0004848d0, 0xc000000004)
    /Users/runner/work/cue/cue/internal/core/eval/eval.go:936 +0x166
cuelang.org/go/internal/core/eval.(*nodeContext).evalExpr(0xc000c4cb00, 0xc000c36140, 0x1e8ef20, 0xc000481120, 0x4)
    /Users/runner/work/cue/cue/internal/core/eval/eval.go:1066 +0x5c9
cuelang.org/go/internal/core/eval.(*nodeContext).addExprConjunct(0xc000c4cb00, 0xc000c36140, 0x1e8ef20, 0xc000481120, 0xc000000004)
    /Users/runner/work/cue/cue/internal/core/eval/eval.go:949 +0xbe
cuelang.org/go/internal/core/eval.(*nodeContext).addStruct(0xc000c4cb00, 0xc000c360f0, 0xc000484930, 0x2)
    /Users/runner/work/cue/cue/internal/core/eval/eval.go:1359 +0x1768
cuelang.org/go/internal/core/eval.(*nodeContext).addExprConjunct(0xc000c4cb00, 0xc000c360f0, 0x1e8efe0, 0xc000484930, 0xc000000002)
    /Users/runner/work/cue/cue/internal/core/eval/eval.go:936 +0x166
cuelang.org/go/internal/core/eval.(*nodeContext).evalExpr(0xc000c4cb00, 0xc000c360a0, 0x1e8ef20, 0xc000481720, 0x2)
    /Users/runner/work/cue/cue/internal/core/eval/eval.go:1066 +0x5c9
cuelang.org/go/internal/core/eval.(*nodeContext).addExprConjunct(0xc000c4cb00, 0xc000c360a0, 0x1e8ef20, 0xc000481720, 0xc000000002)
    /Users/runner/work/cue/cue/internal/core/eval/eval.go:949 +0xbe
cuelang.org/go/internal/core/eval.(*nodeContext).addStruct(0xc000c4cb00, 0xc000a2b770, 0xc000484b70, 0x0)
    /Users/runner/work/cue/cue/internal/core/eval/eval.go:1359 +0x1768
cuelang.org/go/internal/core/eval.(*nodeContext).addExprConjunct(0xc000c4cb00, 0xc000a2b770, 0x1e8eae0, 0xc0004817a0, 0xc000000000)
    /Users/runner/work/cue/cue/internal/core/eval/eval.go:936 +0x166
cuelang.org/go/internal/core/eval.(*Evaluator).evalVertex(0xc00071e540, 0xc000552b60, 0xc000a48480, 0xc000e87404, 0x0, 0x0, 0x0)
    /Users/runner/work/cue/cue/internal/core/eval/eval.go:403 +0x39e
cuelang.org/go/internal/core/eval.(*Evaluator).UnifyAccept(0xc00071e540, 0xc000552b60, 0xc000a48480, 0xc000a4a004, 0x0, 0x0)
    /Users/runner/work/cue/cue/internal/core/eval/eval.go:265 +0xf2
cuelang.org/go/internal/core/eval.(*Evaluator).Unify(0xc00071e540, 0xc000552b60, 0xc000a48480, 0xc00047ac04)
    /Users/runner/work/cue/cue/internal/core/eval/eval.go:239 +0x5e
cuelang.org/go/internal/core/eval.(*nodeContext).postDisjunct(0xc000a4a000)
    /Users/runner/work/cue/cue/internal/core/eval/eval.go:587 +0x3c3
cuelang.org/go/internal/core/eval.(*nodeContext).updateResult(0xc000a4a000, 0x146c401)
    /Users/runner/work/cue/cue/internal/core/eval/disjunct.go:130 +0x54
cuelang.org/go/internal/core/eval.(*nodeContext).tryDisjuncts(0xc000a4a000, 0xc0008a2e00)
    /Users/runner/work/cue/cue/internal/core/eval/disjunct.go:197 +0x2f0
cuelang.org/go/internal/core/eval.(*Evaluator).evalVertex(0xc00071e540, 0xc000552b60, 0xc000b5f320, 0xc000802004, 0x0, 0x0, 0x0)
    /Users/runner/work/cue/cue/internal/core/eval/eval.go:431 +0x4a0
cuelang.org/go/internal/core/eval.(*Evaluator).UnifyAccept(0xc00071e540, 0xc000552b60, 0xc000b5f320, 0xc000548804, 0x0, 0x0)
    /Users/runner/work/cue/cue/internal/core/eval/eval.go:265 +0xf2
cuelang.org/go/internal/core/eval.(*Evaluator).Unify(0xc00071e540, 0xc000552b60, 0xc000b5f320, 0xc00047a904)
    /Users/runner/work/cue/cue/internal/core/eval/eval.go:239 +0x5e
cuelang.org/go/internal/core/eval.(*nodeContext).postDisjunct(0xc000548840)
    /Users/runner/work/cue/cue/internal/core/eval/eval.go:587 +0x3c3
cuelang.org/go/internal/core/eval.(*nodeContext).updateResult(0xc000548840, 0x146c401)
    /Users/runner/work/cue/cue/internal/core/eval/disjunct.go:130 +0x54
cuelang.org/go/internal/core/eval.(*nodeContext).tryDisjuncts(0xc000548840, 0xc0008a2d00)
    /Users/runner/work/cue/cue/internal/core/eval/disjunct.go:197 +0x2f0
cuelang.org/go/internal/core/eval.(*Evaluator).evalVertex(0xc00071e540, 0xc000552b60, 0xc000b5ec60, 0x1ccfe04, 0x0, 0x0, 0x0)
    /Users/runner/work/cue/cue/internal/core/eval/eval.go:431 +0x4a0
cuelang.org/go/internal/core/eval.(*Evaluator).UnifyAccept(0xc00071e540, 0xc000552b60, 0xc000b5ec60, 0xc000456a04, 0x0, 0x0)
    /Users/runner/work/cue/cue/internal/core/eval/eval.go:265 +0xf2
cuelang.org/go/internal/core/eval.(*Evaluator).Unify(0xc00071e540, 0xc000552b60, 0xc000b5ec60, 0xc0002b5e04)
    /Users/runner/work/cue/cue/internal/core/eval/eval.go:239 +0x5e
cuelang.org/go/internal/core/adt.(*Vertex).Finalize(...)
    /Users/runner/work/cue/cue/internal/core/adt/composite.go:350
cuelang.org/go/cue.Value.Unify(0xc00047a660, 0xc0003eafc0, 0xc00047a660, 0xc0002b5ef0, 0x2, 0xc00047a660)
    /Users/runner/work/cue/cue/cue/types.go:1662 +0x21c
cuelang.org/go/internal/filetypes.FromFile(0xc00073ea20, 0x0, 0xc00001efc0, 0xc00073efc0, 0xc0005486e0)
    /Users/runner/work/cue/cue/internal/filetypes/filetypes.go:76 +0x138
cuelang.org/go/internal/encoding.(*Decoder).validate(0xc000b5eb40, 0xc00073efc0, 0xc00073ea20)
    /Users/runner/work/cue/cue/internal/encoding/encoding.go:336 +0x89
cuelang.org/go/internal/encoding.NewDecoder(0xc00073ea20, 0xc000b5eab0, 0x0)
    /Users/runner/work/cue/cue/internal/encoding/encoding.go:221 +0xb98
cuelang.org/go/cue/load.(*loader).addFiles(0xc000c102d0, 0xc0001023c0, 0x4a, 0xc0005d8a00)
    /Users/runner/work/cue/cue/cue/load/loader.go:222 +0x40a
cuelang.org/go/cue/load.(*loader).importPkg(0xc000c102d0, 0x0, 0x0, 0xc0005d8a00, 0x0)
    /Users/runner/work/cue/cue/cue/load/import.go:195 +0xe48
cuelang.org/go/cue/load.(*loader).matchPackagesInFS.func1(0xc000c860e0, 0x64, 0x1e9f760, 0xc0004a5450, 0x0, 0x0, 0x0, 0x0)
    /Users/runner/work/cue/cue/cue/load/search.go:208 +0x380
cuelang.org/go/cue/load.(*fileSystem).walkRec(0xc000f120d0, 0xc000c860e0, 0x64, 0x1e9f760, 0xc0004a5450, 0xc000e18450, 0x0, 0x0)
    /Users/runner/work/cue/cue/cue/load/fs.go:268 +0x101
cuelang.org/go/cue/load.(*fileSystem).walkRec(0xc000f120d0, 0xc000042c00, 0x57, 0x1e9f760, 0xc00146b2b0, 0xc000e18450, 0x0, 0x0)
    /Users/runner/work/cue/cue/cue/load/fs.go:283 +0x248
cuelang.org/go/cue/load.(*fileSystem).walkRec(0xc000f120d0, 0xc000102780, 0x53, 0x1e9f760, 0xc00146aea0, 0xc000e18450, 0x0, 0x0)
    /Users/runner/work/cue/cue/cue/load/fs.go:283 +0x248
cuelang.org/go/cue/load.(*fileSystem).walk(0xc000f120d0, 0xc000102780, 0x53, 0xc000aae450, 0x57, 0xc00001ff80)
    /Users/runner/work/cue/cue/cue/load/fs.go:253 +0x228
cuelang.org/go/cue/load.(*loader).matchPackagesInFS(0xc000c102d0, 0xc001671cc9, 0x5, 0x0, 0x0, 0x1)
    /Users/runner/work/cue/cue/cue/load/search.go:165 +0x86a
cuelang.org/go/cue/load.(*loader).importPathsQuiet(0xc000c102d0, 0xc000ac9480, 0x1, 0x2, 0x1d064e5, 0x1, 0x0)
    /Users/runner/work/cue/cue/cue/load/search.go:354 +0x503
cuelang.org/go/cue/load.(*loader).importPaths(0xc000c102d0, 0xc000ac9480, 0x1, 0x2, 0x0, 0x0, 0x0)
    /Users/runner/work/cue/cue/cue/load/search.go:326 +0x5b
cuelang.org/go/cue/load.Instances(0xc000ac9480, 0x1, 0x2, 0x24e9600, 0x0, 0x0, 0x0)
    /Users/runner/work/cue/cue/cue/load/loader.go:70 +0x163
cuelang.org/go/cmd/cue/cmd.loadFromArgs(...)
    /Users/runner/work/cue/cue/cmd/cue/cmd/common.go:111
cuelang.org/go/cmd/cue/cmd.parseArgs(0xc000ac8d60, 0xc000ac9480, 0x1, 0x2, 0xc000854740, 0x10550f1, 0xc000aaf1a8, 0x5f12c3b4)
    /Users/runner/work/cue/cue/cmd/cue/cmd/common.go:381 +0x3cd
cuelang.org/go/cmd/cue/cmd.runEval(0xc000ac8d60, 0xc000ac9480, 0x1, 0x2, 0x0, 0x0)
    /Users/runner/work/cue/cue/cmd/cue/cmd/eval.go:90 +0xfd
cuelang.org/go/cmd/cue/cmd.mkRunE.func1(0xc000b2d600, 0xc000ac9480, 0x1, 0x2, 0x0, 0x0)
    /Users/runner/work/cue/cue/cmd/cue/cmd/root.go:46 +0x9f
github.com/spf13/cobra.(*Command).execute(0xc000b2d600, 0xc000ac9460, 0x2, 0x2, 0xc000b2d600, 0xc000ac9460)
    /Users/runner/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:842 +0x524
github.com/spf13/cobra.(*Command).ExecuteC(0xc000b2cdc0, 0x0, 0x0, 0x0)
    /Users/runner/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:950 +0x49a
github.com/spf13/cobra.(*Command).Execute(...)
    /Users/runner/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:887
cuelang.org/go/cmd/cue/cmd.(*Command).Run(0xc000ac8d60, 0x1e9a520, 0xc000120008, 0x0, 0x0)
    /Users/runner/work/cue/cue/cmd/cue/cmd/root.go:206 +0x9d
cuelang.org/go/internal/cuetest.Run(0xc00028bd40, 0xc000038a50, 0x4b, 0xc0003dc1e0, 0x11, 0xc000e19d70)
    /Users/runner/work/cue/cue/internal/cuetest/sim.go:79 +0x578
cuelang.org/go/doc/tutorial/kubernetes.TestTutorial(0xc00028bd40)
    /Users/runner/work/cue/cue/doc/tutorial/kubernetes/tut_test.go:170 +0x117a
testing.tRunner(0xc00028bd40, 0x1d4a428)
    /Users/runner/hostedtoolcache/go/1.14.9/x64/src/testing/testing.go:1054 +0x1ec
created by testing.(*T).Run
    /Users/runner/hostedtoolcache/go/1.14.9/x64/src/testing/testing.go:1105 +0x701
FAIL    cuelang.org/go/doc/tutorial/kubernetes  601.544s
cueckoo commented 3 years ago

Original reply by @myitcv in https://github.com/cuelang/cue/issues/528#issuecomment-694285075

@mpvl suggests this could be performance-related. When combined with a particularly slow runner we might start seeing these timeouts (passing builds on macos take 3 or 4 mins generally)

cueckoo commented 3 years ago

Original reply by @myitcv in https://github.com/cuelang/cue/issues/528#issuecomment-694285684

Same apparent issue in https://github.com/cuelang/cue/runs/1122902967?check_suite_focus=true

cueckoo commented 3 years ago

Original reply by @mpvl in https://github.com/cuelang/cue/issues/528#issuecomment-701381835

Let's close for now. I expect the latest performance improvements to just tip this in the favorable camp.