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/pprof: reject cpu profiling with -race #5659

Closed
alexbrainman opened this issue Jun 7, 2013 · 15 comments
Closed

runtime/pprof: reject cpu profiling with -race #5659

alexbrainman opened this issue Jun 7, 2013 · 15 comments

Comments

@alexbrainman
Copy link
Member

c:\>go test -race -v runtime/pprof
=== RUN TestCPUProfile
--- FAIL: TestCPUProfile (8.26 seconds)
        pprof_test.go:56: profile too short: [0x0 0x3 0x0 0x2710 0x0 0x0 0x1 0x0]
FAIL
exit status 1
FAIL    runtime/pprof   8.328s
@dvyukov
Copy link
Member

dvyukov commented Jun 7, 2013

Comment 1:

Labels changed: added racedetector.

@alberts
Copy link
Contributor

alberts commented Jun 13, 2013

Comment 2:

I'm seeing this at tip:
=== RUN TestCPUProfile
runtime: unknown argument frame size for runtime.asmcgocall
fatal error: invalid stack
goroutine 0 [idle]:
runtime.throw(0x69e27c)
    /build/go.tip/go/src/pkg/runtime/panic.c:475 +0x67
runtime.gentraceback(0x423552, 0x7fab03ffee20, 0x0, 0xc2100017e0, 0x0, ...)
    /build/go.tip/go/src/pkg/runtime/traceback_x86.c:104 +0xa7b
runtime.sigprof(0x423552, 0x7fab03ffee20, 0x0, 0xc2100017e0)
    /build/go.tip/go/src/pkg/runtime/proc.c:1818 +0xe3
runtime.sighandler(0x1b, 0xc210050bf0, 0xc210050ac0, 0xc2100017e0)
    /build/go.tip/go/src/pkg/runtime/signal_amd64.c:51 +0x81
runtime.sigtramp()
    /build/go.tip/go/src/pkg/runtime/sys_linux_amd64.s:207 +0x54
runtime: unknown argument frame size for runtime.sigreturn
panic during panic
FAIL    runtime/pprof   0.653s

@davecheney
Copy link
Contributor

Comment 3:

Related, issue #5659.

@gopherbot
Copy link

Comment 4 by ray@cloudflare.com:

Hello,
We're also seeing this on some of our server code. It seems to only occur under load and
when we attempt a cpuprofile. Perhaps another data point will be helpful.
 runtime: unknown argument frame size for runtime.chansend1
 fatal error: invalid stack
 goroutine 0 [idle]:
 runtime.throw(0xc23bfc)
    /var/lib/jenkins/tools/go-latest/src/pkg/runtime/panic.c:475 +0x67
 runtime.gentraceback(0x42bad9, 0x7fa51757e9c0, 0x0, 0xc21959fd80, 0x0, ...)
    /var/lib/jenkins/tools/go-latest/src/pkg/runtime/traceback_x86.c:104 +0xa7b
 runtime.sigprof(0x42bad9, 0x7fa51757e9c0, 0x0, 0xc21959fd80)
    /var/lib/jenkins/tools/go-latest/src/pkg/runtime/proc.c:1833 +0xe3
 runtime.sighandler(0x1b, 0xc2147edd70, 0xc2147edc40, 0xc21959fd80)
    /var/lib/jenkins/tools/go-latest/src/pkg/runtime/signal_amd64.c:51 +0x81
 runtime.sigtramp()
    /var/lib/jenkins/tools/go-latest/src/pkg/runtime/sys_linux_amd64.s:207 +0x54
 runtime: unknown argument frame size for runtime.sigreturn
 panic during panic

@davecheney
Copy link
Contributor

Comment 5:

@ray - thanks for the data point. Is this a released version of Go, or trunk ? which
revno ?

@gopherbot
Copy link

Comment 6 by ray@cloudflare.com:

Oops, yes, we are tracking tip (but that isn't too useful). This is the version string
we built with:
devel +2b6568891862 Mon Jun 17 15:41:17 2013 +0400

@davecheney
Copy link
Contributor

Comment 7:

@ray - that is ok, I didn't think this issue was present in the 1.1 release branch.
Thanks for confirming.

@minux
Copy link
Member

minux commented Jun 19, 2013

Comment 8:

Re #4, it should be issue #5736.

@rsc
Copy link
Contributor

rsc commented Jun 21, 2013

Comment 9:

Let's just make profiling refuse to run when race mode is on.

@rsc
Copy link
Contributor

rsc commented Jul 30, 2013

Comment 10:

Labels changed: added priority-later, go1.2, removed priority-triage.

@dvyukov
Copy link
Member

dvyukov commented Jul 30, 2013

Comment 11:

I would close this.
There are no principal reasons why this can not work (even if not very useful, while I
actually used profiling to understand race-induced overheads). The bugs revealed are not
race-specific, the can happen with cgo or with goroutine preemption.

@alexbrainman
Copy link
Member Author

Comment 12:

Dmitriy,
Feel free to close. I don't have particular interest in this. I just reported a broken
test that I saw.
Alex

@rsc
Copy link
Contributor

rsc commented Jul 31, 2013

Comment 13:

Dmitriy, I don't understand what you mean by "close this".
People are seeing failures in runtime/pprof under race detection.
We cannot just close the issue without addressing that.
Either (1) we fix pprof or race detector, whichever is the problem, or (2) we disable
pprof with race detection.

@dvyukov
Copy link
Member

dvyukov commented Jul 31, 2013

Comment 14:

Several issues reported in this thread. Most of them are not related to race detector.
We need to file remaining issues with pprof/runtime interaction in separate issues (if
any). But this issue is misleading.

@dvyukov
Copy link
Member

dvyukov commented Aug 13, 2013

Comment 15:

This issue was closed by revision e33e476.

Status changed to Fixed.

@rsc rsc added this to the Go1.2 milestone Apr 14, 2015
@rsc rsc removed the go1.2 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants