pprof icon indicating copy to clipboard operation
pprof copied to clipboard

UI error with Node.js CPU profile: TypeError: Failed to construct 'URL'

Open ofrobots opened this issue 6 years ago • 5 comments

Originally reported at https://github.com/nodejs/node/pull/25576#issuecomment-505847595 by @filipesilva:

Capturing the CPU profile using the node pprof was a breeze. The browser visualization for the CPU profile seems to fail to render for view->top with a Uncaught TypeError: Failed to construct 'URL': Invalid URL console message, and view->flamegraph fails with the same plus Uncaught RangeError: Maximum call stack size exceeded. view->graph/peek/source seem to work. I need to spend some time looking at the information in here. Haven't yet tried the heap profile mode.

ofrobots avatar Jun 26 '19 16:06 ofrobots

@filipesilva

Can you share the profile you are having trouble with?

kalyanac avatar Jun 26 '19 16:06 kalyanac

Thanks for following up on this! @kalyanac this is the profile I used:

pprof-profile-10488.pb.gz

I recorded it using the instructions in https://www.npmjs.com/package/pprof#requiring-from-the-command-line.

filipesilva avatar Jun 26 '19 17:06 filipesilva

Thanks for the profile!

@filipesilva - Another follow-up questions: Which version of pprof are you using? (Either the commit hash if using pprof from this repo, or the go version if using go tool pprof would be helpful)

I can't reproduce either error with the pprof at the head of this repo as describe. The flame tab works for me. There's definitely seems to be a problem with the top view, though (none of the functions load).

nolanmar511 avatar Jun 26 '19 18:06 nolanmar511

@nolanmar511 I am not sure how to check the version. I followed the steps in https://github.com/google/pprof#building-pprof earlier today for the first time. I ran go get -u github.com/google/pprof in powershell, then opened the profile via pprof -http=: pprof-pprof-profile-10488.pb.gz.

Below is what I see in chrome for the graph, with the console open: image

I'm seeing Uncaught TypeError: Failed to construct 'URL': Invalid URL on all pages of View actually. Maybe it's a windows related problem? I am on Windows 10.

I tried flamegraph again and I was able to see the flamegraph, without a Uncaught RangeError: Maximum call stack size exceeded. error. I'm not sure why the different behaviour. The profile I sent over is not the original one, but it is another profile of the same type of execution, so I expected the same behaviour.

filipesilva avatar Jun 26 '19 18:06 filipesilva

Thanks!

The version of pprof from the head of this repo is being used. This might be a Windows-specific issue.

nolanmar511 avatar Jun 26 '19 20:06 nolanmar511

Hi, i just installed from latest and i've this issue, seems related to duplicated id's

Captura de pantalla 2023-06-22 a la(s) 09 24 16

i've changed the id of the container locally and it works but i'm not sure if it needs to be adjusted somewhere else.

pablomercadolibre avatar Jun 22 '23 12:06 pablomercadolibre

I cannot reproduce this now, I think the ID conflict was since fixed by @ghemawat in #792.

aalexand avatar Dec 17 '23 18:12 aalexand