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

cmd/trace: goroutine in unexpected state #17719

Closed
mkevac opened this issue Nov 1, 2016 · 4 comments
Closed

cmd/trace: goroutine in unexpected state #17719

mkevac opened this issue Nov 1, 2016 · 4 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@mkevac
Copy link
Contributor

mkevac commented Nov 1, 2016

Go version and env:

go version devel +032d150 Tue Nov 1 05:42:33 2016 +0000 linux/amd64

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/marko/goprojects"
GORACE=""
GOROOT="/home/marko/go"
GOTOOLDIR="/home/marko/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build068272964=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"

Collect trace with

$ wget http://cppbig105.mlan:13004/debug/pprof/trace?seconds=2 -O lakafka.trace
--2016-11-01 13:37:30--  http://cppbig105.mlan:13004/debug/pprof/trace?seconds=2
Resolving cppbig105.mlan (cppbig105.mlan)... 10.10.147.106
Connecting to cppbig105.mlan (cppbig105.mlan)|10.10.147.106|:13004... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/octet-stream]
Saving to: ‘lakafka.trace’

lakafka.trace                                           [              <=>                                                                                                ]  17.79M  3.62MB/s    in 4.9s    

2016-11-01 13:37:38 (3.62 MB/s) - ‘lakafka.trace’ saved [18649791]

Execute trace tool

$ go tool trace lakafka.trace

Go to "Goroutine analysis" then select one of the goroutines.
No chart will apper and there is an error in log:

$ go tool trace lakafka.trace
2016/11/01 13:37:39 Parsing trace...
2016/11/01 13:37:50 Serializing trace...
2016/11/01 13:37:51 Splitting trace...
2016/11/01 13:37:56 Opening browser
2016/11/01 13:38:02 failed to generate trace: expected G 481 to be in state 1, but got state 2
^C

Full trace: lakafka.trace.zip

@quentinmit quentinmit changed the title go tool trace gives errors on correctly collected trace cmd/trace: goroutine in unexpected state Nov 1, 2016
@quentinmit quentinmit added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Nov 1, 2016
@quentinmit quentinmit added this to the Go1.8 milestone Nov 1, 2016
@quentinmit
Copy link
Contributor

/cc @aclements

@rsc rsc modified the milestones: Go1.8Maybe, Go1.8 Nov 3, 2016
@aclements
Copy link
Member

This will be fixed by https://go-review.googlesource.com/c/32810/ (hadn't noticed this bug when I wrote the CL).

@aclements aclements 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 Nov 9, 2016
@rsc rsc modified the milestones: Go1.8, Go1.8Maybe Nov 11, 2016
@ianlancetaylor
Copy link
Contributor

@aclements Is CL 32810 going to get into 1.8? Can you add "Fixes #17719" to the CL, so that it is attached on the release dashboard? Thanks.

@gopherbot
Copy link

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

@golang golang locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

6 participants