Skip to content

cmd/trace: explicit goroutine function names replaced by synthetic ones #50622

@WhisperingChaos

Description

@WhisperingChaos

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

$ go version
go version go1.18beta1 linux/amd64

Does this issue reproduce with the latest release?

  • Yes - 1.18beta1 is latest 1.18 release
  • No - 1.17.1

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

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/user/.cache/go-build"
GOENV="/home/user/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/user/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/user/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/user/go1.18beta1/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/user/go1.18beta1/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.18beta1"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
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 -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build2821634988=/tmp/go-build -gno-record-gcc-switches"

What did you do?

  • Statically compile the following source.
  • Extract a 10 second interval of trace output:
    curl http://${TRACE_SERVICE_NAME}:${TRACE_SERVICE_PORT}/debug/pprof/trace?seconds=10 > ~/trace.out
    go tool trace -http=trace:${TRACE_SERVICE_PORT} ~/trace.out
  • View trace output via Chrome.
  • Performed above for both 1.18beta1 and 1.17.1 go compiler versions.

Links to go tool trace output files:

What did you expect to see?

When viewing trace's "/goroutines" page:

  • Expect the explicitly named: "msgSend" function in the "main" package to be listed as "main.msgSend".
  • Expect the explicitly named: "msgReceive" function in the "main" package to be listed as "main.msgReceive".

When viewing specific goroutine events, selected from the trace timeline, expect the event "Title" field to display either:

  • "main.msgSend" or
  • "main.msgReceive".

What did you see instead?

When viewing trace's "/goroutines" page saw:

  • "main.main.func1" and
  • "main.main.func2".

When viewing specific goroutine events, selected from the trace timeline, the event "Title" field to displayed either:

  • "main.main.func1" or
  • "main.main.func2".

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions