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: browser visualization on windows broken #9178

Closed
cookieo9 opened this issue Nov 27, 2014 · 12 comments
Closed

cmd/pprof: browser visualization on windows broken #9178

cookieo9 opened this issue Nov 27, 2014 · 12 comments
Milestone

Comments

@cookieo9
Copy link
Contributor

@cookieo9 cookieo9 commented Nov 27, 2014

Running one of the browser visualization commands in pprof on windows (eg: weblist)
produces the following error:

(pprof) weblist
exec: "/usr/bin/open": file does not exist

This happens because it attempts to execute echo of the following programs (as seen at
https://code.google.com/p/go/source/browse/src/cmd/pprof/internal/commands/commands.go#82)

var browsers = []string{"chrome", "google-chrome",
"firefox", "/usr/bin/open"}

None of these commands work on Windows because neither Chrome nor Firefox update PATH to
allow themselves to be run from the command line, and the last command is OS X specific
to let the OS find the correct program.
@ianlancetaylor
Copy link
Contributor

@ianlancetaylor ianlancetaylor commented Nov 27, 2014

Comment 1:

Labels changed: added repo-main, release-go1.5, os-windows.

@cookieo9
Copy link
Contributor Author

@cookieo9 cookieo9 commented Nov 27, 2014

Comment 2:

I'm not sure how the "s/echo/one/" typo happened...
By adding the "C:\Program Files (x86)\Google\Chrome\Application" directory (the default
install location for chrome on x86-64 machines) to PATH does allow the browser to be
found by pprof, and the result to be shown, so there doesn't look to be anything else
wrong with the functionality.
@minux
Copy link
Member

@minux minux commented Nov 27, 2014

Comment 3:

on windows, it should use "cmd /c start".
cookieo9, could you please give https://golang.org/cl/180380043 a try?
iant, do you think this is good for 1.4?

Owner changed to @minux.

Status changed to Started.

@minux
Copy link
Member

@minux minux commented Nov 27, 2014

Comment 4:

btw, I think we should also add xdg-open as a fallback for linux.
@cookieo9
Copy link
Contributor Author

@cookieo9 cookieo9 commented Nov 27, 2014

Comment 5:

I don't have a dev/tip environment set up for windows, but I applied the
change to 1.4rc1 by hand, manually rebuilt cmd/pprof and got the following:
The process cannot access the file because it is being used by another
process.
If I find the time I'll set up a proper testing environment and try the CL.
@minux
Copy link
Member

@minux minux commented Nov 27, 2014

Comment 6:

Yeah, I just updated the CL, please try again.
@cookieo9
Copy link
Contributor Author

@cookieo9 cookieo9 commented Nov 27, 2014

Comment 7:

#6: It seems to work when applied manually, although I found it annoying that the
function in question has both tempfile and tempFile variables.
@minux
Copy link
Member

@minux minux commented Nov 27, 2014

Comment 8:

Thanks. I will mail the CL out and see if it could make it into Go 1.4.
@gopherbot
Copy link

@gopherbot gopherbot commented Nov 27, 2014

Comment 9:

CL https://golang.org/cl/180380043 mentions this issue.
@minux
Copy link
Member

@minux minux commented Nov 27, 2014

Comment 10:

tentatively change label to Release-Go1.4. Pending approval.

Labels changed: added release-go1.4, removed release-go1.5.

@minux
Copy link
Member

@minux minux commented Dec 4, 2014

Comment 11:

This issue was closed by revision c9d0c81.

Status changed to Fixed.

@rsc
Copy link
Contributor

@rsc rsc commented Dec 4, 2014

Comment 12:

This issue was closed by revision 229e10a28de1.

@cookieo9 cookieo9 added fixed labels Dec 4, 2014
@rsc rsc added this to the Go1.4 milestone Apr 14, 2015
@rsc rsc removed the release-go1.4 label Apr 14, 2015
rsc added a commit that referenced this issue May 11, 2015
…en browser on windows

««« CL 180380043 / d56c648b069f
cmd/pprof/internal/commands: add command to open browser on windows

While we're at there, also add a message to prompt the user to install
Graphviz if "dot" command is not found.

Fixes #9178.

LGTM=adg, alex.brainman, cookieo9, rsc
R=rsc, adg, bradfitz, alex.brainman, cookieo9, smyrman
CC=golang-codereviews
https://golang.org/cl/180380043

»»»

TBR=minux
CC=golang-codereviews
https://golang.org/cl/186760043
@golang golang locked and limited conversation to collaborators Jun 25, 2016
wheatman added a commit to wheatman/go-akaros that referenced this issue Jun 25, 2018
…en browser on windows

««« CL 180380043 / d56c648b069f
cmd/pprof/internal/commands: add command to open browser on windows

While we're at there, also add a message to prompt the user to install
Graphviz if "dot" command is not found.

Fixes golang#9178.

LGTM=adg, alex.brainman, cookieo9, rsc
R=rsc, adg, bradfitz, alex.brainman, cookieo9, smyrman
CC=golang-codereviews
https://golang.org/cl/180380043

»»»

TBR=minux
CC=golang-codereviews
https://golang.org/cl/186760043
wheatman added a commit to wheatman/go-akaros that referenced this issue Jun 26, 2018
…en browser on windows

««« CL 180380043 / d56c648b069f
cmd/pprof/internal/commands: add command to open browser on windows

While we're at there, also add a message to prompt the user to install
Graphviz if "dot" command is not found.

Fixes golang#9178.

LGTM=adg, alex.brainman, cookieo9, rsc
R=rsc, adg, bradfitz, alex.brainman, cookieo9, smyrman
CC=golang-codereviews
https://golang.org/cl/180380043

»»»

TBR=minux
CC=golang-codereviews
https://golang.org/cl/186760043
wheatman added a commit to wheatman/go-akaros that referenced this issue Jul 9, 2018
…en browser on windows

««« CL 180380043 / d56c648b069f
cmd/pprof/internal/commands: add command to open browser on windows

While we're at there, also add a message to prompt the user to install
Graphviz if "dot" command is not found.

Fixes golang#9178.

LGTM=adg, alex.brainman, cookieo9, rsc
R=rsc, adg, bradfitz, alex.brainman, cookieo9, smyrman
CC=golang-codereviews
https://golang.org/cl/180380043

»»»

TBR=minux
CC=golang-codereviews
https://golang.org/cl/186760043
wheatman added a commit to wheatman/go-akaros that referenced this issue Jul 20, 2018
…en browser on windows

««« CL 180380043 / d56c648b069f
cmd/pprof/internal/commands: add command to open browser on windows

While we're at there, also add a message to prompt the user to install
Graphviz if "dot" command is not found.

Fixes golang#9178.

LGTM=adg, alex.brainman, cookieo9, rsc
R=rsc, adg, bradfitz, alex.brainman, cookieo9, smyrman
CC=golang-codereviews
https://golang.org/cl/180380043

»»»

TBR=minux
CC=golang-codereviews
https://golang.org/cl/186760043
wheatman added a commit to wheatman/go-akaros that referenced this issue Jul 30, 2018
…en browser on windows

««« CL 180380043 / d56c648b069f
cmd/pprof/internal/commands: add command to open browser on windows

While we're at there, also add a message to prompt the user to install
Graphviz if "dot" command is not found.

Fixes golang#9178.

LGTM=adg, alex.brainman, cookieo9, rsc
R=rsc, adg, bradfitz, alex.brainman, cookieo9, smyrman
CC=golang-codereviews
https://golang.org/cl/180380043

»»»

TBR=minux
CC=golang-codereviews
https://golang.org/cl/186760043
This issue was closed.
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
5 participants
You can’t perform that action at this time.