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/tools/go/packages: TestAll failures #58397

Closed
gopherbot opened this issue Feb 7, 2023 · 4 comments
Closed

x/tools/go/packages: TestAll failures #58397

gopherbot opened this issue Feb 7, 2023 · 4 comments
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@gopherbot
Copy link

gopherbot commented Feb 7, 2023

#!watchflakes
post <- pkg == "golang.org/x/tools/go/packages" && test == "TestAll" && date < "2023-07-01"

Issue created automatically to collect these failures.

Example (log):

panic: test timed out after 20m0s
running tests:
	TestInvalidFilesBeforeOverlayContains (19m47s)
	TestInvalidFilesBeforeOverlayContains/Modules (19m23s)
	TestInvalidFilesBeforeOverlayContains/Modules/main (16m52s)
	TestLoadDifferentPatterns (19m47s)
	TestLoadDifferentPatterns/Modules (19m25s)

sync.runtime_Semacquire(0xc00ef97f18?)
	C:/workdir/go/src/runtime/sema.go:62 +0x25
sync.(*WaitGroup).Wait(0xc00ef97f10)
	C:/workdir/go/src/sync/waitgroup.go:116 +0xa8
golang.org/x/tools/go/packages.(*loader).refine(0xc001e3e000, 0xc002b77220)
	C:/workdir/gopath/src/golang.org/x/tools/go/packages/packages.go:778 +0xfbe
golang.org/x/tools/go/packages.Load(0xc0013fd1e0?, {0xc02f096330, 0x1, 0x1})
	C:/workdir/gopath/src/golang.org/x/tools/go/packages/packages.go:266 +0x10f
golang.org/x/tools/go/packages_test.testLoadDifferentPatterns(0xc0013fd1e0, {0x140511c90, 0x140721390})
	C:/workdir/gopath/src/golang.org/x/tools/go/packages/overlay_test.go:1023 +0x8e5
golang.org/x/tools/go/packages_test.testAllOrModulesParallel.func1(0xc0013fd1e0, {0x140511c90, 0x140721390})
	C:/workdir/gopath/src/golang.org/x/tools/go/packages/packages_test.go:81 +0x1ab
golang.org/x/tools/go/packages/packagestest.TestAll.func1(0xc0013fd1e0)
	C:/workdir/gopath/src/golang.org/x/tools/go/packages/packagestest/export.go:162 +0x62
testing.tRunner(0xc0013fd1e0, 0xc012fe9dc0)

watchflakes

@gopherbot gopherbot added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Feb 7, 2023
@gopherbot
Copy link
Author

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "golang.org/x/tools/go/packages" && test == "TestAll"
2023-02-07 20:55 windows-amd64-race tools@ebad375b go@9565d990 x/tools/go/packages.TestAll (log)
panic: test timed out after 20m0s
running tests:
	TestInvalidFilesBeforeOverlayContains (19m47s)
	TestInvalidFilesBeforeOverlayContains/Modules (19m23s)
	TestInvalidFilesBeforeOverlayContains/Modules/main (16m52s)
	TestLoadDifferentPatterns (19m47s)
	TestLoadDifferentPatterns/Modules (19m25s)

sync.runtime_Semacquire(0xc00ef97f18?)
	C:/workdir/go/src/runtime/sema.go:62 +0x25
sync.(*WaitGroup).Wait(0xc00ef97f10)
	C:/workdir/go/src/sync/waitgroup.go:116 +0xa8
golang.org/x/tools/go/packages.(*loader).refine(0xc001e3e000, 0xc002b77220)
	C:/workdir/gopath/src/golang.org/x/tools/go/packages/packages.go:778 +0xfbe
golang.org/x/tools/go/packages.Load(0xc0013fd1e0?, {0xc02f096330, 0x1, 0x1})
	C:/workdir/gopath/src/golang.org/x/tools/go/packages/packages.go:266 +0x10f
golang.org/x/tools/go/packages_test.testLoadDifferentPatterns(0xc0013fd1e0, {0x140511c90, 0x140721390})
	C:/workdir/gopath/src/golang.org/x/tools/go/packages/overlay_test.go:1023 +0x8e5
golang.org/x/tools/go/packages_test.testAllOrModulesParallel.func1(0xc0013fd1e0, {0x140511c90, 0x140721390})
	C:/workdir/gopath/src/golang.org/x/tools/go/packages/packages_test.go:81 +0x1ab
golang.org/x/tools/go/packages/packagestest.TestAll.func1(0xc0013fd1e0)
	C:/workdir/gopath/src/golang.org/x/tools/go/packages/packagestest/export.go:162 +0x62
testing.tRunner(0xc0013fd1e0, 0xc012fe9dc0)

watchflakes

@gopherbot gopherbot added the Tools This label describes issues relating to any tools in the x/tools repository. label Feb 7, 2023
@gopherbot gopherbot added this to the Unreleased milestone Feb 7, 2023
@bcmills
Copy link
Contributor

bcmills commented Feb 8, 2023

This looks like either just a timeout or a bug in the windows-amd64-race runtime (attn @golang/runtime).

There is one goroutine in the running state, but the goroutine dump doesn't include it.
It's not clear to me whether it that goroutine is making progress or actually wedged.

goroutine 17248 [running]:
	goroutine running on other thread; stack unavailable
created by golang.org/x/tools/go/packages.(*loader).loadRecursive.func1
	C:/workdir/gopath/src/golang.org/x/tools/go/packages/packages.go:845 +0xee

In addition, there is one goroutine in the runnable state, and the rest of the (numerous!) goroutines seem to be waiting for it to complete:

goroutine 18238 [runnable]:
go/types.(*Named).resolve(0xc002f2b6c0)
	C:/workdir/go/src/go/types/named.go:161 +0x5e5
go/types.(*Named).Underlying(0xc000d593c0?)
	C:/workdir/go/src/go/types/named.go:458 +0x27
go/types.(*Named).under(0xc002f2b6c0)
	C:/workdir/go/src/go/types/named.go:486 +0x3f
go/types.under({0x140510c18?, 0xc002f2b6c0?})
	C:/workdir/go/src/go/types/under.go:15 +0x58
go/types.lookupFieldOrMethod({0x140510c40, 0xc003455bd0}, 0x1, 0xc000d59a30?, {0xc008107ef5, 0xb}, 0x40?)
	C:/workdir/go/src/go/types/lookup.go:102 +0x1a5
go/types.LookupFieldOrMethod({0x140510c40, 0xc003455bd0}, 0xa0?, 0xc01318b3e0?, {0xc008107ef5, 0xb})
	C:/workdir/go/src/go/types/lookup.go:68 +0xe5
go/types.(*Checker).selector(0xc0006fbc20, 0xc022e6d240, 0xc00c9f4b40, 0x0, 0x0)
	C:/workdir/go/src/go/types/call.go:585 +0x487
go/types.(*Checker).exprInternal(0xc0006fbc20, 0xc022e6d240, {0x140511840?, 0xc00c9f4b40?}, {0x0, 0x0})
	C:/workdir/go/src/go/types/expr.go:1577 +0x1605
go/types.(*Checker).rawExpr(0xc0006fbc20, 0xc022e6d240, {0x140511840, 0xc00c9f4b40}, {0x0, 0x0}, 0x0)
	C:/workdir/go/src/go/types/expr.go:1242 +0x266
go/types.(*Checker).expr(0x14027753c?, 0x140016907?, {0x140511840, 0xc00c9f4b40})
	C:/workdir/go/src/go/types/expr.go:1763 +0x4d
go/types.(*Checker).assignVar(0xc0006fbc20, {0x140511840, 0xc00c9f4b40}, 0xc022e6d200)
	C:/workdir/go/src/go/types/assignments.go:198 +0x465
go/types.(*Checker).assignVars(0xc0006fbc20?, {0xc02f37eee0?, 0x1, 0x1}, {0xc02f37ef00?, 0x1, 0x1})
	C:/workdir/go/src/go/types/assignments.go:390 +0x22d
go/types.(*Checker).stmt(0xc0006fbc20, 0x0, {0x140511120?, 0xc0013021c0?})
	C:/workdir/go/src/go/types/stmt.go:479 +0x1207
go/types.(*Checker).stmtList(0xc021903170?, 0x0, {0xc01430c400, 0x21, 0x0?})
	C:/workdir/go/src/go/types/stmt.go:124 +0xc6
go/types.(*Checker).funcBody(0xc0006fbc20, 0xc00121cd20, {0xc008107468, 0x8}, 0xc001faa600, 0xc021903170, {0x0, 0x0})
	C:/workdir/go/src/go/types/stmt.go:44 +0x54b
go/types.(*Checker).funcDecl.func1()
	C:/workdir/go/src/go/types/decl.go:831 +0xc5
go/types.(*Checker).processDelayed(0xc0006fbc20, 0x0)
	C:/workdir/go/src/go/types/check.go:387 +0x302
go/types.(*Checker).checkFiles(0xc0006fbc20, {0xc00e697000, 0x80, 0x80})
	C:/workdir/go/src/go/types/check.go:332 +0x22a
go/types.(*Checker).Files(...)
	C:/workdir/go/src/go/types/check.go:304
golang.org/x/tools/go/packages.(*loader).loadPackage(0xc001e3e000, 0xc038a00720)
	C:/workdir/gopath/src/golang.org/x/tools/go/packages/packages.go:1052 +0x17ff
golang.org/x/tools/go/packages.(*loader).loadRecursive.func1()
	C:/workdir/gopath/src/golang.org/x/tools/go/packages/packages.go:851 +0x30e
sync.(*Once).doSlow(0xc038a00730, 0xc002bf3f58)
	C:/workdir/go/src/sync/once.go:74 +0xf1
sync.(*Once).Do(0xc038a00730, 0x0?)
	C:/workdir/go/src/sync/once.go:65 +0x45
golang.org/x/tools/go/packages.(*loader).loadRecursive(0xc001e3e000, 0xc038a00720)
	C:/workdir/gopath/src/golang.org/x/tools/go/packages/packages.go:839 +0x67
golang.org/x/tools/go/packages.(*loader).loadRecursive.func1.1(0x0?)
	C:/workdir/gopath/src/golang.org/x/tools/go/packages/packages.go:846 +0x3e
created by golang.org/x/tools/go/packages.(*loader).loadRecursive.func1
	C:/workdir/gopath/src/golang.org/x/tools/go/packages/packages.go:845 +0xee

@gopherbot
Copy link
Author

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "golang.org/x/tools/go/packages" && test == "TestAll"
2023-06-22 21:46 darwin-amd64-12_0 tools@c8278fe9 go@6dce882b x/tools/go/packages.TestAll (log)
SIGSEGV: segmentation violation
PC=0x10275f1 m=6 sigcode=1

rax    0x14ecde0
rbx    0xc040038000
rcx    0x3e
rdx    0x0
rdi    0x800000000000
rsi    0x0
rbp    0x700003522e20
...
	/tmp/buildlet/go/src/runtime/chan.go:442 +0x12 fp=0xc000064d50 sp=0xc000064d28 pc=0x1005f32
testing.(*T).Run(0xc006eb9d40, {0xc000ba7440?, 0x1?}, 0xc02487b020)
	/tmp/buildlet/go/src/testing/testing.go:1649 +0x3c8 fp=0xc000064e10 sp=0xc000064d50 pc=0x10ebb08
golang.org/x/tools/go/packages_test.testCgoNoSyntax(0xc006eb9d40?, {0x134a850, 0x1503860})
	/tmp/buildlet/gopath/src/golang.org/x/tools/go/packages/packages_test.go:1929 +0x228 fp=0xc000064ed8 sp=0xc000064e10 pc=0x12639e8
golang.org/x/tools/go/packages_test.testAllOrModulesParallel.func1(0xc006eb9d40, {0x134a850, 0x1503860})
	/tmp/buildlet/gopath/src/golang.org/x/tools/go/packages/packages_test.go:81 +0x138 fp=0xc000064f30 sp=0xc000064ed8 pc=0x1253db8
golang.org/x/tools/go/packages/packagestest.TestAll.func1(0xc006eb9d40)
	/tmp/buildlet/gopath/src/golang.org/x/tools/go/packages/packagestest/export.go:162 +0x51 fp=0xc000064f70 sp=0xc000064f30 pc=0x1242ad1
testing.tRunner(0xc006eb9d40, 0xc00bbe14e0)

watchflakes

@bcmills bcmills closed this as not planned Won't fix, can't repro, duplicate, stale Jun 30, 2023
@bcmills
Copy link
Contributor

bcmills commented Jun 30, 2023

Duplicate of #37602

@bcmills bcmills marked this as a duplicate of #37602 Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
Status: Done
Development

No branches or pull requests

2 participants