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/pprof: wsl cpu profiles are empty #32824

Closed
stevenh opened this issue Jun 28, 2019 · 1 comment
Closed

cmd/pprof: wsl cpu profiles are empty #32824

stevenh opened this issue Jun 28, 2019 · 1 comment

Comments

@stevenh
Copy link
Contributor

@stevenh stevenh commented Jun 28, 2019

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

go version go1.12.6 linux/amd64

Does this issue reproduce with the latest release?

Yes

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

go env Output
GOARCH="amd64"
GOBIN="/data/go/bin"
GOCACHE="/home/steveh/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/data/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/steveh/go-redis-proxy/go.mod"
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-build093919717=/tmp/go-build -gno-record-gcc-switches"

What did you do?

Ran benchmarks to get cpu profiles:

go test -cpuprofile cpu.prof -bench .
go tool pprof cpu.prof

What did you expect to see?

A non empty profile

What did you see instead?

An empty profile or at an error if the profile failed.

Running the exact same test on a BSD host resulted in the expected profile data so I suspect its related to running in the Ubuntu shell under WSL

@ALTree
Copy link
Member

@ALTree ALTree commented Jun 28, 2019

Thanks for the report.

This is a duplicate of #22366 (runtime/pprof: takes zero samples in BashOnWindows (WSL)), so I'm closing this thread in favour of the older one.

@ALTree ALTree closed this Jun 28, 2019
@golang golang locked and limited conversation to collaborators Jun 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.