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: leaves behind $HOME/pprof #18029

Closed
mvdan opened this issue Nov 23, 2016 · 4 comments
Closed

cmd/pprof: leaves behind $HOME/pprof #18029

mvdan opened this issue Nov 23, 2016 · 4 comments

Comments

@mvdan
Copy link
Member

@mvdan mvdan commented Nov 23, 2016

Please answer these questions before submitting your issue. Thanks!

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

go version devel +3f69822 Wed Nov 23 04:29:25 2016 +0000 linux/amd64

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

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/mvdan/go"
GORACE=""
GOROOT="/home/mvdan/tip"
GOTOOLDIR="/home/mvdan/tip/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build002913838=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"

What did you do?

In any package with tests:

rm -r ~/pprof
go test -cpuprofile cpu.out
go tool pprof foo.test cpu.out
(do whatever, exit with ^D)

Note that it happens with exit/quit too.

What did you expect to see?

go tool pprof not cluttering my home directory.

What did you see instead?

An empty $HOME/pprof directory, just created:

drwxr-xr-x 1 mvdan mvdan    0 Nov 23 11:20 pprof/

I can submit a small patch to remove the directory if it's the correct fix. If the directory should be left behind for some reason, then I suggest it be a temporary directory under /tmp.

@ALTree
Copy link
Member

@ALTree ALTree commented Nov 23, 2016

Note: this was #9180 (which was marked as fixed).

@mvdan
Copy link
Member Author

@mvdan mvdan commented Nov 23, 2016

It seems like the fix got rid of some uses of $HOME/pprof, but some others remain.

@0xmohit
Copy link
Contributor

@0xmohit 0xmohit commented Nov 23, 2016

This appears to be a dup of #16178.

@mvdan
Copy link
Member Author

@mvdan mvdan commented Nov 23, 2016

@0xmohit correct, thanks. Hadn't found it because I was searching for pprof home.

@mvdan mvdan closed this Nov 23, 2016
@golang golang locked and limited conversation to collaborators Nov 23, 2017
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
4 participants
You can’t perform that action at this time.