You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
00490a6 (i.e. main as of today), but the problem exists in all prior versions. I first stumbled upon it in Go 1.19.
What operating system and processor architecture are you using?
Irrelevant
What did you do?
Run pprof -dot on the provided file (this is a CPU profile taken of a CockroachDB 23.1 node, but these details don't matter). Note how the resulting .dot file is invalid since the " occurring in a label was not properly escaped:
I gave it a half-hearted attempt at fixing, but it seemed like there might be more than one place where the escaping isn't happening properly and it wasn't super clear to me where we'd need to throw in an escapeForDot1 on top of here:
What version of pprof are you using?
00490a6 (i.e. main as of today), but the problem exists in all prior versions. I first stumbled upon it in Go 1.19.
What operating system and processor architecture are you using?
Irrelevant
What did you do?
Run
pprof -dot
on the provided file (this is a CPU profile taken of a CockroachDB 23.1 node, but these details don't matter). Note how the resulting.dot
file is invalid since the"
occurring in a label was not properly escaped:pprof.pb.gz.txt
pprof.dot.txt
What did you expect to see?
The
"
in the label should have been escaped, resulting in a valid.dot
file.What did you see instead?
An invalid
dot
file, which in particular implies that the graph view in pprof isn't working. The line above should have beenwhich would work.
I gave it a half-hearted attempt at fixing, but it seemed like there might be more than one place where the escaping isn't happening properly and it wasn't super clear to me where we'd need to throw in an
escapeForDot
1 on top of here:pprof/internal/graph/dotgraph.go
Line 251 in a41b82a
Also, it seems useful to add testing for these sorts of things.
Footnotes
https://github.com/google/pprof/blob/a41b82acbcb1f6a6d0998b0fddeb1f1adb7d8fc1/internal/graph/dotgraph.go#L490-L495 ↩
The text was updated successfully, but these errors were encountered: