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: reported goroutines doesn't associate with any goroutine information #54425

Closed
hitzhangjie opened this issue Aug 13, 2022 · 2 comments
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. FrozenDueToAge

Comments

@hitzhangjie
Copy link
Contributor

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).

@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Aug 13, 2022
@seankhliao
Copy link
Member

Duplicate of #49994

@seankhliao seankhliao marked this as a duplicate of #49994 Aug 13, 2022
@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Aug 13, 2022
@gopherbot
Copy link

Change https://go.dev/cl/425042 mentions this issue: cmd/trace: display goroutines (PC=0) with clearer description

gopherbot pushed a commit that referenced this issue Aug 25, 2022
This PR fixes: #54425 #49994

Change-Id: Id60a3ba6930f8e29b12b6d8f80945decd2ce31bc
GitHub-Last-Rev: 60a040a
GitHub-Pull-Request: #54575
Reviewed-on: https://go-review.googlesource.com/c/go/+/425042
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
rajbarik pushed a commit to rajbarik/go that referenced this issue Sep 1, 2022
This PR fixes: golang#54425 golang#49994

Change-Id: Id60a3ba6930f8e29b12b6d8f80945decd2ce31bc
GitHub-Last-Rev: 60a040a
GitHub-Pull-Request: golang#54575
Reviewed-on: https://go-review.googlesource.com/c/go/+/425042
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
@golang golang locked and limited conversation to collaborators Aug 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. FrozenDueToAge
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants