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

internal/abi: TestFuncPCCompileError consistently timing out on openbsd-arm-jsing #58248

Closed
bcmills opened this issue Feb 2, 2023 · 2 comments
Assignees
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. Testing An issue that has been verified to require only test changes, not just a test failure.
Milestone

Comments

@bcmills
Copy link
Contributor

bcmills commented Feb 2, 2023

https://build.golang.org/log/9f102b5b360d00802798e5aa462ceb858d2bb23c:

panic: test timed out after 15m0s
running tests:
	TestFuncPCCompileError (15m0s)
…
goroutine 7 [syscall]:
syscall.syscall6(0x8fed4, 0x15dff, 0x44fb98, 0x0, 0x486000, 0x0, 0x0)
	/home/gopher/build/go/src/runtime/sys_openbsd3.go:46 +0x18 fp=0x44fb40 sp=0x44fb30 pc=0x826bc
syscall.wait4(0x15dff, 0x44fb98, 0x0, 0x486000)
	/home/gopher/build/go/src/syscall/zsyscall_openbsd_arm.go:43 +0x58 fp=0x44fb78 sp=0x44fb40 pc=0x8db54
syscall.Wait4(0x15dff, 0x44fbbc, 0x0, 0x486000)
	/home/gopher/build/go/src/syscall/syscall_bsd.go:144 +0x3c fp=0x44fb9c sp=0x44fb78 pc=0x8d690
os.(*Process).wait(0x41a1e0)
	/home/gopher/build/go/src/os/exec_unix.go:43 +0x88 fp=0x44fbd4 sp=0x44fb9c pc=0xa6e94
os.(*Process).Wait(...)
	/home/gopher/build/go/src/os/exec.go:132
os/exec.(*Cmd).Wait(0x47e000)
	/home/gopher/build/go/src/os/exec/exec.go:890 +0x38 fp=0x44fc0c sp=0x44fbd4 pc=0xf19f0
os/exec.(*Cmd).Run(0x47e000)
	/home/gopher/build/go/src/os/exec/exec.go:590 +0x48 fp=0x44fc1c sp=0x44fc0c pc=0xf0710
os/exec.(*Cmd).Output(0x47e000)
	/home/gopher/build/go/src/os/exec/exec.go:984 +0xbc fp=0x44fc44 sp=0x44fc1c pc=0xf20d0
internal/goroot.PkgfileMap.func1()
	/home/gopher/build/go/src/internal/goroot/importcfg.go:45 +0xc0 fp=0x44fccc sp=0x44fc44 pc=0x126b30
sync.(*Once).doSlow(0x258d20, 0x161554)
	/home/gopher/build/go/src/sync/once.go:74 +0xb8 fp=0x44fcf4 sp=0x44fccc pc=0x8a29c
sync.(*Once).Do(0x258d20, 0x161554)
	/home/gopher/build/go/src/sync/once.go:65 +0x40 fp=0x44fd00 sp=0x44fcf4 pc=0x8a1d4
internal/goroot.PkgfileMap()
	/home/gopher/build/go/src/internal/goroot/importcfg.go:43 +0x24 fp=0x44fd0c sp=0x44fd00 pc=0x126a24
internal/goroot.Importcfg()
	/home/gopher/build/go/src/internal/goroot/importcfg.go:21 +0x28 fp=0x44fd88 sp=0x44fd0c pc=0x1267fc
internal/testenv.WriteImportcfg({0x183178, 0x402e10}, {0x47c050, 0x4b}, 0x0)
	/home/gopher/build/go/src/internal/testenv/testenv.go:353 +0x18 fp=0x44fe28 sp=0x44fd88 pc=0x1273fc
internal/abi_test.TestFuncPCCompileError(0x402e10)
	/home/gopher/build/go/src/internal/abi/abi_test.go:46 +0x210 fp=0x44ff98 sp=0x44fe28 pc=0x128040
testing.tRunner(0x402e10, 0x161540)
	/home/gopher/build/go/src/testing/testing.go:1576 +0x118 fp=0x44ffe0 sp=0x44ff98 pc=0xe6dec
testing.(*T).Run.func1()
	/home/gopher/build/go/src/testing/testing.go:1629 +0x30 fp=0x44ffec sp=0x44ffe0 pc=0xe7e2c
runtime.goexit()
	/home/gopher/build/go/src/runtime/asm_arm.s:831 +0x4 fp=0x44ffec sp=0x44ffec pc=0x847a4
created by testing.(*T).Run
	/home/gopher/build/go/src/testing/testing.go:1629 +0x43c
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Feb 2, 2023
@bcmills
Copy link
Contributor Author

bcmills commented Feb 2, 2023

This is closely related to CL 454498 and #56967.

This test is probably timing out trying to rebuild all of std when it really only needs internal/abi.

@bcmills bcmills added Testing An issue that has been verified to require only test changes, not just a test failure. NeedsFix The path to resolution is known, but the work has not been done. labels Feb 2, 2023
@bcmills bcmills self-assigned this Feb 2, 2023
@bcmills bcmills added this to the Go1.21 milestone Feb 2, 2023
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/464736 mentions this issue: internal/abi: avoid rebuilding all of std in TestFuncPCCompileError

johanbrandhorst pushed a commit to Pryz/go that referenced this issue Feb 12, 2023
Instead, have the caller pass in an explicit list of the packages
(if any) they need.

After golang#47257, a builder running a test does not necessarily have the
entire standard library already cached, especially when running tests
in sharded mode. testenv.WriteImportcfg used to write an importcfg for
the entire standard library — which required rebuilding the entire
standard library — even though most tests need only a tiny subset.

This reduces the time to test internal/abi with a cold build cache on
my workstation from ~16s to ~0.05s.

It somewhat increases the time for 'go test go/internal/gcimporter'
with a cold cache, from ~43s to ~54s, presumably due to decreased
parallelism in rebuilding the standard library and increased overhead
in re-resolving the import map. However, 'go test -short' running time
remains stable (~5.5s before and after).

Fixes golang#58248.

Change-Id: I9be6b61ae6e28b75b53af85207c281bb93b9346f
Reviewed-on: https://go-review.googlesource.com/c/go/+/464736
Run-TryBot: Bryan Mills <[email protected]>
Reviewed-by: Cherry Mui <[email protected]>
Reviewed-by: Than McIntosh <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Auto-Submit: Bryan Mills <[email protected]>
@golang golang locked and limited conversation to collaborators Feb 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. Testing An issue that has been verified to require only test changes, not just a test failure.
Projects
None yet
Development

No branches or pull requests

2 participants