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: pprof create profile directory under the root dir, not %USERPROFILE% on windows #18864

Closed
hirochachacha opened this issue Jan 31, 2017 · 3 comments

Comments

@hirochachacha
Copy link
Contributor

hirochachacha commented Jan 31, 2017

Please answer these questions before submitting your issue. Thanks!

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

go version go1.7.3 windows/amd64

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

set GOARCH=amd64
set GOBIN=
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=
set GORACE=
set GOROOT=C:\Go
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set CC=gcc
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\Hiroshi\AppData\Local\Temp\go-build623875630=/tmp/go-build -gno-record-gcc-switches
set CXX=g++
set CGO_ENABLED=1

What did you do?

If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
run go tool pprof mybin on cmd.exe.

What did you expect to see?

profile directory should not be created on the root directory.

What did you see instead?

C:\Users\Hiroshi\work>dir C:\pprof
 Volume in drive C is Windows10_OS
 Volume Serial Number is 6203-7069

 Directory of C:\pprof

01/31/2017  01:08 PM    <DIR>          .
01/31/2017  01:08 PM    <DIR>          ..
               0 File(s)              0 bytes
               2 Dir(s)  10,739,838,976 bytes free
@gopherbot
Copy link

CL https://golang.org/cl/36070 mentions this issue.

@ALTree
Copy link
Member

ALTree commented Jan 31, 2017

I suggest you wait for the merge from upstream pprof before submitting patches... I vaguely remember an issue about pprof's TMPDIRS and I think the mechanism has been fixed upstream.

@hirochachacha
Copy link
Contributor Author

Thank you for quick suggestion.

It seems google/pprof has the same issue.

https://github.com/google/pprof/blob/master/internal/driver/fetch.go#L220

Maybe I should make PR for google/pprof instead and wait for the merge.

hirochachacha added a commit to hirochachacha/pprof that referenced this issue Feb 25, 2017
Not all OSes have $HOME variable.
Use appropriate variables per OS.

Fixes golang/go#18864
@golang golang locked and limited conversation to collaborators Feb 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants