Skip to content

cmd/trace: reported goroutines doesn't associate with any goroutine information #54425

@hitzhangjie

Description

@hitzhangjie

What version of Go are you using (go version)?

$ go version
go version go1.18.3 darwin/arm64

Does this issue reproduce with the latest release?

I didn't not try the latest version.

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE="auto"
GOARCH="arm64"
GOBIN=""
GOCACHE="/Users/zhangjie/Library/Caches/go-build"
GOENV="/Users//Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users//go/pkg/mod"
GOOS="darwin"
GOPATH="/Users//go"
GOROOT="/usr/local/go"
GOSUMDB="off"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_arm64"
GOVCS=""
GOVERSION="go1.18.3"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/4m/2_pn1sln1fzcg2zg_4mh95z80000gn/T/go-build852456570=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

go tool trace trace.out, then view the goroutine analysis, at last there's a N=<?>,
it reports there's N goroutine created here, but it doesn't contains any goroutine information,missing entry function name.

image

What did you expect to see?

I want to know what does it mean, if detailed description is shown, it may be better understood.

What did you see instead?

I see N=4 at last, it is not clear, it doesn't contains any function name info.

I read the code src/cmd/trace, it is caused by the GDesc.PC / GDesc.Name is zero value.
But I don't know why this occasion happend? At least here should add more description to let developers know what does it mean.

And, the problem is, not only the template cannot be rendered( the goroutine func entry missing), but also we cannot query these goroutines (missing the link /goroutine?id=0).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions