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/analysis/passes/assign: Test failures #64438

Open
gopherbot opened this issue Nov 28, 2023 · 5 comments
Open

x/tools/go/analysis/passes/assign: Test failures #64438

gopherbot opened this issue Nov 28, 2023 · 5 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

#!watchflakes
default <- pkg == "golang.org/x/tools/go/analysis/passes/assign" && test == "Test"

Issue created automatically to collect these failures.

Example (log):

panic: test timed out after 20m0s
running tests:
	Test (20m0s)

sync.runtime_Semacquire(0xc000158340?)
	/workdir/go/src/runtime/sema.go:62 +0x3c
sync.(*WaitGroup).Wait(0xc00029d080)
	/workdir/go/src/sync/waitgroup.go:116 +0x88
golang.org/x/tools/go/packages.(*loader).refine(0xc00015a1c0, 0xc000000d20)
	/workdir/gopath/src/golang.org/x/tools/go/packages/packages.go:796 +0xce4
golang.org/x/tools/go/packages.Load(0xc000012900?, {0xc000028500, 0x2, 0x2})
	/workdir/gopath/src/golang.org/x/tools/go/packages/packages.go:287 +0x39c
golang.org/x/tools/go/analysis/analysistest.loadPackages(0x54cd00, {0xc00001c190, 0x49}, {0xc000028500, 0x2, 0x2})
	/workdir/gopath/src/golang.org/x/tools/go/analysis/analysistest/analysistest.go:375 +0x240
golang.org/x/tools/go/analysis/analysistest.Run({0x3aff28, 0xc0001581a0}, {0xc00001c190, 0x49}, 0x54cd00, {0xc000028500, 0x2, 0x2})
	/workdir/gopath/src/golang.org/x/tools/go/analysis/analysistest/analysistest.go:322 +0xfc
golang.org/x/tools/go/analysis/analysistest.RunWithSuggestedFixes({0x3aff28, 0xc0001581a0}, {0xc00001c190?, 0xa54c4?}, 0x2de480?, {0xc000028500?, 0x117d1c?, 0x58a6509d6862d?})
	/workdir/gopath/src/golang.org/x/tools/go/analysis/analysistest/analysistest.go:129 +0x78
golang.org/x/tools/go/analysis/passes/assign_test.Test(0xc0001581a0)
	/workdir/gopath/src/golang.org/x/tools/go/analysis/passes/assign/assign_test.go:21 +0xe4
testing.tRunner(0xc0001581a0, 0x3540b0)

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 Nov 28, 2023
@gopherbot
Copy link
Author

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "golang.org/x/tools/go/analysis/passes/assign" && test == "Test"
2023-11-28 21:19 linux-ppc64-sid-power10 tools@4cbc0533 go@6111acc8 x/tools/go/analysis/passes/assign.Test (log)
panic: test timed out after 20m0s
running tests:
	Test (20m0s)

sync.runtime_Semacquire(0xc000158340?)
	/workdir/go/src/runtime/sema.go:62 +0x3c
sync.(*WaitGroup).Wait(0xc00029d080)
	/workdir/go/src/sync/waitgroup.go:116 +0x88
golang.org/x/tools/go/packages.(*loader).refine(0xc00015a1c0, 0xc000000d20)
	/workdir/gopath/src/golang.org/x/tools/go/packages/packages.go:796 +0xce4
golang.org/x/tools/go/packages.Load(0xc000012900?, {0xc000028500, 0x2, 0x2})
	/workdir/gopath/src/golang.org/x/tools/go/packages/packages.go:287 +0x39c
golang.org/x/tools/go/analysis/analysistest.loadPackages(0x54cd00, {0xc00001c190, 0x49}, {0xc000028500, 0x2, 0x2})
	/workdir/gopath/src/golang.org/x/tools/go/analysis/analysistest/analysistest.go:375 +0x240
golang.org/x/tools/go/analysis/analysistest.Run({0x3aff28, 0xc0001581a0}, {0xc00001c190, 0x49}, 0x54cd00, {0xc000028500, 0x2, 0x2})
	/workdir/gopath/src/golang.org/x/tools/go/analysis/analysistest/analysistest.go:322 +0xfc
golang.org/x/tools/go/analysis/analysistest.RunWithSuggestedFixes({0x3aff28, 0xc0001581a0}, {0xc00001c190?, 0xa54c4?}, 0x2de480?, {0xc000028500?, 0x117d1c?, 0x58a6509d6862d?})
	/workdir/gopath/src/golang.org/x/tools/go/analysis/analysistest/analysistest.go:129 +0x78
golang.org/x/tools/go/analysis/passes/assign_test.Test(0xc0001581a0)
	/workdir/gopath/src/golang.org/x/tools/go/analysis/passes/assign/assign_test.go:21 +0xe4
testing.tRunner(0xc0001581a0, 0x3540b0)

watchflakes

@gopherbot gopherbot added the Tools This label describes issues relating to any tools in the x/tools repository. label Nov 28, 2023
@gopherbot gopherbot added this to the Unreleased milestone Nov 28, 2023
@adonovan
Copy link
Member

After 20m this test was terminated, but it wasn't stuck: it was still doing computation within the type checker, specifically makeFloatFromLiteral:

goroutine 53 [runnable]:
math/big.(*Int).Mul(0xc000682828, 0xc0006827e0, 0xc000682828)
	/workdir/go/src/math/big/int.go:184 +0x20
math/big.lehmerUpdate(0xc0006827c0, 0xc0006827e0, 0xc000682868, 0xc000682848, 0xc000682828, 0xc000682808, 0xc000682828?, 0x29beab1, 0x1892c7d1, 0x19a78b31, ...)
	/workdir/go/src/math/big/int.go:723 +0x220
math/big.(*Int).lehmerGCD(0xc000682918, 0x0, 0x0, 0xc000625b00, 0xc000625b20)
	/workdir/go/src/math/big/int.go:799 +0x470
math/big.(*Rat).norm(0xc000625b00)
	/workdir/go/src/math/big/rat.go:444 +0x108
math/big.(*Rat).SetString(0xc000625b00, {0xc00049b2a0, 0x1e})
	/workdir/go/src/math/big/ratconv.go:204 +0x814
go/constant.makeFloatFromLiteral({0xc00049b2a0, 0x1e})
	/workdir/go/src/go/constant/value.go:339 +0xe8
go/constant.MakeFromLiteral({0xc00049b2a0?, 0x4?}, 0x22bd2c?, 0x22c4a0?)
	/workdir/go/src/go/constant/value.go:442 +0x68
go/types.(*operand).setConst(0xc000625ac0, 0xc000497f00?, {0xc00049b2a0?, 0x3b3798?})
	/workdir/go/src/go/types/operand.go:214 +0xb4
go/types.(*Checker).exprInternal(0xc0004de800, {0x0?, 0x0?}, 0xc000625ac0, {0x3b1e50, 0xc000497f00}, {0x0?, 0x0?})
	/workdir/go/src/go/types/expr.go:1048 +0xc48
go/types.(*Checker).rawExpr(0xc0004de800, {0x0, 0x0}, 0xc000625ac0, {0x3b1e50?, 0xc000497f00?}, {0x0?, 0x0?}, 0x0)
	/workdir/go/src/go/types/expr.go:965 +0x19c
...

Is this a particularly underpowered machine?

@pmur
Copy link
Contributor

pmur commented Dec 1, 2023

This should be the fastest ppc64 builder. We have been seeing some odd failures (#64290) on BE ppc64, maybe this is a different manifestation of it? I also wonder if #64468 is related to these too.

@adonovan
Copy link
Member

adonovan commented Dec 1, 2023

This should be the fastest ppc64 builder. We have been seeing some odd failures (#64290) on BE ppc64, maybe this is a different manifestation of it? I also wonder if #64468 is related to these too.

They seem quite different: one is a completely bogus pointer (most likely a compiler/runtime issue) whereas this one seems like it's merely running very slowly, possibly due a bug in the application, or machine load.

@laboger
Copy link
Contributor

laboger commented Dec 4, 2023

They seem quite different: one is a completely bogus pointer (most likely a compiler/runtime issue) whereas this one seems like it's merely running very slowly, possibly due a bug in the application, or machine load.

There was a memcombine bug that affected big endian only which could cause data corruption. Just like in the case of the bad pointer where the upper bits were set incorrectly, it could corrupt the loop control value and cause a loop to iterate an excessive number of times causing the timeout. The fix for that has gone in, so if it happens again we will know it is not related to that.

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: No status
Development

No branches or pull requests

4 participants