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

pprof on MacOS can't find dot? #809

Closed
rkube opened this issue Oct 16, 2023 · 3 comments
Closed

pprof on MacOS can't find dot? #809

rkube opened this issue Oct 16, 2023 · 3 comments

Comments

@rkube
Copy link

rkube commented Oct 16, 2023

Hi,
I've just installed pprof on MacOS 14.0 through go install github.com/google/pprof@latest . When I try to look
to look at a profiling data with the command below I get an error.

$ pprof -http=":" alloc-profile.pb.gz                             
Main binary filename not available.
Serving web UI on http://localhost:50980

Error: <stdin>: syntax error in line 36 scanning a quoted string (missing endquote? longer than 16384?)
String starting:"evalrule(::AdjointSensitivityIntegrand{ComponentVector{Float64, Vector{Float64},
Failed to execute dot. Is Graphviz installed?
exit status 1

I have graphviz installed through homebrew and the dot binary is available on my system:

$ which dot
/opt/homebrew/bin/dot

When I request a dot output from pprof it works fine:

$ pprof -dot alloc-profile.pb.gz | head -n 2
Main binary filename not available.
digraph "unnamed" {
node [style=filled fillcolor="#f8f8f8"]
[...]

How can I get pprof output in my browser?

@aalexand
Copy link
Collaborator

I think the first error is about dot failing to parse the file, not about dot not found.

I also think your second command doesn't run dot, it only generated a text dot file. Try "-svg".

@aalexand
Copy link
Collaborator

@rkube Basically, I think most likely an invalid dot file was produced for this profile. Maybe lack of escaping of some weird character in the function name. Can you share the profile?

@rkube
Copy link
Author

rkube commented Oct 24, 2023

Thanks. I think it was a user error.

@rkube rkube closed this as completed Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants