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

runtime,misc/cgo/test: timeout in TestSetgidStress on linux/amd64 #53641

Closed
bcmills opened this issue Jul 1, 2022 · 4 comments
Closed

runtime,misc/cgo/test: timeout in TestSetgidStress on linux/amd64 #53641

bcmills opened this issue Jul 1, 2022 · 4 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. release-blocker 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 Jul 1, 2022

##### ../misc/cgo/test
ok  	misc/cgo/test	2.556s
ok  	misc/cgo/test	2.474s
SIGQUIT: quit
PC=0x472ee1 m=0 sigcode=0

…

goroutine 7 [runnable]:
runtime.gopark(0xc00019a060?, 0xc000058ee8?, 0x9f?, 0x46?, 0x7f0df652b108?)
	/workdir/go/src/runtime/proc.go:363 +0xd6 fp=0xc000058e68 sp=0xc000058e48 pc=0x440a36
runtime.chanrecv(0xc0000ca000, 0x0, 0x1)
	/workdir/go/src/runtime/chan.go:583 +0x49b fp=0xc000058ef8 sp=0xc000058e68 pc=0x40de9b
runtime.chanrecv1(0x6eb980?, 0x3e8?)
	/workdir/go/src/runtime/chan.go:442 +0x18 fp=0xc000058f20 sp=0xc000058ef8 pc=0x40d9d8
misc/cgo/test.testSetgidStress(0x4862d7?)
	/workdir/go/misc/cgo/test/setgid2_linux.go:33 +0x9c fp=0xc000058f58 sp=0xc000058f20 pc=0x56119c
misc/cgo/test.TestSetgidStress(0x0?)
	/workdir/go/misc/cgo/test/cgo_linux_test.go:23 +0x19 fp=0xc000058f70 sp=0xc000058f58 pc=0x526519
testing.tRunner(0xc0000c8000, 0x5b9500)
	/workdir/go/src/testing/testing.go:1446 +0x10b fp=0xc000058fc0 sp=0xc000058f70 pc=0x4d6a4b
testing.(*T).Run.func1()
	/workdir/go/src/testing/testing.go:1493 +0x2a fp=0xc000058fe0 sp=0xc000058fc0 pc=0x4d78ea
runtime.goexit()
	/workdir/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000058fe8 sp=0xc000058fe0 pc=0x471001
created by testing.(*T).Run
	/workdir/go/src/testing/testing.go:1493 +0x35f

…
*** Test killed with quit: ran too long (11m0s).
FAIL	misc/cgo/test	660.128s

greplogs -l -e 'goroutine \d+ .*:\n(?:.+\n\t.+\n)*misc/cgo/test\.TestSetgidStress'
2022-06-30T21:57:02-aad9382/linux-amd64-sid

@bcmills bcmills added Testing An issue that has been verified to require only test changes, not just a test failure. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker labels Jul 1, 2022
@bcmills bcmills added this to the Go1.19 milestone Jul 1, 2022
@bcmills
Copy link
Contributor Author

bcmills commented Jul 1, 2022

This test was added a couple days ago (in CL 412474 for #53374), so the error rate could potentially be high (we don't have many test runs that include this test).

As such, marking as release-blocker until the test can be fixed or skipped.

(attn @cherrymui @aclements; CC @golang/runtime)

@gopherbot
Copy link

Change https://go.dev/cl/415677 mentions this issue: misc/cgo/test: make TestSetgidStress cheaper

@bcmills bcmills reopened this Jul 27, 2022
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Jul 27, 2022
@bcmills
Copy link
Contributor Author

bcmills commented Jul 27, 2022

One more recurrence this week, on the longtest builder:
greplogs -l -e 'goroutine \d+ .*:\n(?:.+\n\t.+\n)*misc/cgo/test\.TestSetgidStress' --since=2022-07-02
2022-07-26T20:27:23-faf4e97/linux-amd64-longtest

@bcmills bcmills changed the title runtime,misc/cgo/test: timeout in TestSetgidStress on linux-amd64-sid runtime,misc/cgo/test: timeout in TestSetgidStress on linux/amd64 Jul 27, 2022
@gopherbot
Copy link

Change https://go.dev/cl/419453 mentions this issue: misc/cgo/test: use fewer threads in TestSetgidStress in long mode

@dmitshur dmitshur added NeedsFix The path to resolution is known, but the work has not been done. and removed NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Aug 1, 2022
jproberts pushed a commit to jproberts/go that referenced this issue Aug 10, 2022
TestSetgidStress spawns 1000 threads, which can be expensive on
some platforms or slow builders. Run with 50 threads in short
mode instead.

This makes the failure less reproducible even with buggy code. But
one can manually stress test it (e.g. when a flaky failure appear
on the builder).

Fixes golang#53641.

Change-Id: I33b5ea5ecaa8c7a56f59c16f9171657ee295db47
Reviewed-on: https://go-review.googlesource.com/c/go/+/415677
Reviewed-by: Austin Clements <austin@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Cherry Mui <cherryyz@google.com>
jproberts pushed a commit to jproberts/go that referenced this issue Aug 10, 2022
TestSetgidStress originally spawns 1000 threads for stress testing.
It caused timeout on some builders so CL 415677 reduced to 50 in
short mode. But it still causes flaky timeouts in longtest
builders, so reduce the number of threads in long mode as well.

Should fix golang#53641.

Change-Id: I02f4ef8a143bb1faafe3d11ad223f36f5cc245c6
Reviewed-on: https://go-review.googlesource.com/c/go/+/419453
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
@golang golang locked and limited conversation to collaborators Aug 1, 2023
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. release-blocker 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

4 participants