Skip to content

cmd/trace: goroutine in unexpected state #17719

@mkevac

Description

@mkevac

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions