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

misc/cgo/testcarchive: TestSIGPROF flakes with "signal: profiling timer expired" #19320

Open
ianlancetaylor opened this issue Feb 28, 2017 · 10 comments

Comments

@ianlancetaylor
Copy link
Contributor

commented Feb 28, 2017

I see this test failure from a trybot, in https://storage.googleapis.com/go-build-log/f8d7aae9/darwin-amd64-10_11_578453d9.log.

##### ../misc/cgo/testcarchive
--- FAIL: TestSIGPROF (1.40s)
	carchive_test.go:591: 
	carchive_test.go:592: signal: profiling timer expired
FAIL
2017/02/28 07:44:16 Failed: exit status 1

@ianlancetaylor ianlancetaylor added this to the Go1.9 milestone Feb 28, 2017

@josharian

This comment has been minimized.

Copy link
Contributor

commented Mar 30, 2017

@gopherbot

This comment has been minimized.

Copy link

commented May 5, 2017

CL https://golang.org/cl/42830 mentions this issue.

@crawshaw

This comment has been minimized.

Copy link
Contributor

commented May 5, 2017

I see this once every ~200 runs of go test -run=TestSIGPROF carchive_test.go.

What I think may be happening:

  • thread A has a pending SIGPROF
  • thread B calls setcpuprofilerate(0) which turns off further SIGPROFs with setitimer, and then removes the handler using a special code path just for c-archive/c-shared
  • thread A tries to deal with SIGPROF, and the default handler terminates the program.

If this is so, then I don't see a way to uninstall the SIGPROF handler.

https://golang.org/cl/42830 leaves the handler installed once it is installed. That's enough to fix the test, over several thousand runs. Is this good enough? Should we also forward SIGPROF in this case?

@bradfitz

This comment has been minimized.

Copy link
Member

commented Jul 6, 2017

Kicking to Go 1.10.

@bcmills, feel free to take it over (soon) if you think this is important for Go 1.9.

@dmitshur

This comment has been minimized.

Copy link
Member

commented Sep 7, 2017

It looks like this intermittent trybot failure may have masked a real failure in CL 60530, causing #21783.

@gopherbot

This comment has been minimized.

Copy link

commented Oct 6, 2017

Change https://golang.org/cl/68850 mentions this issue: runtime: clear pending SIGPROF signals after disabling the profile timer

@gopherbot

This comment has been minimized.

Copy link

commented Oct 7, 2017

Change https://golang.org/cl/69111 mentions this issue: misc/cgo/testcarchive: avoid crashes from spurious SIGPROF signals

@gopherbot

This comment has been minimized.

Copy link

commented Oct 8, 2017

Change https://golang.org/cl/69114 mentions this issue: misc/cgo/testcarchive: skip slaky SIGPROF test on darwin

gopherbot pushed a commit that referenced this issue Oct 9, 2017
Elias Naur
misc/cgo/testcarchive: skip flaky SIGPROF test on darwin
Updates #19320.

Change-Id: Id38df033e3f0873986e668c8ff3855b6e08407a9
Reviewed-on: https://go-review.googlesource.com/69114
Run-TryBot: Elias Naur <elias.naur@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>

@rsc rsc modified the milestones: Go1.10, Go1.11 Nov 22, 2017

@gopherbot gopherbot modified the milestones: Go1.11, Unplanned May 23, 2018

@mvdan

This comment has been minimized.

Copy link
Member

commented Mar 22, 2019

Happened on a freebsd-amd64-12_0 trybot run: https://farmer.golang.org/temporarylogs?name=freebsd-amd64-12_0&rev=f424e02578b25cb81ab055a6bd39e86b1f37855a&st=0xc455410000

##### ../misc/cgo/testcarchive
--- FAIL: TestSIGPROF (1.45s)
    carchive_test.go:670: 
    carchive_test.go:671: signal: profiling timer expired
FAIL
2019/03/22 12:26:23 Failed: exit status 1
@bcmills

This comment has been minimized.

Copy link
Member

commented Jul 31, 2019

@bcmills bcmills changed the title misc/cgo/testcarchive: failure on Darwin: signal: profiling timer expired misc/cgo/testcarchive: TestSIGPROF flakes with "signal: profiling timer expired" Jul 31, 2019

@bcmills bcmills removed the OS-Darwin label Jul 31, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
9 participants
You can’t perform that action at this time.