jlfwong / speedscope

🔬 A fast, interactive web-based viewer for performance profiles.
https://www.speedscope.app
MIT License
5.59k stars 246 forks source link

Chrome crashes when viewing large profiles #347

Open themreza opened 3 years ago

themreza commented 3 years ago

I tried using https://speedscope.app with a relatively large profile JSON file, which is around 65 MB in size. While switching around between different threads it suddenly crashed.

I'm running Chrome Version 89.0.4389.114 (Official Build) (64-bit) on Ubuntu 20.04 with an Nvidia 1660 Ti and 32 GB RAM.

Is there a local / desktop viewer for the generated .json file from py-spy?

I used the command py-spy record -f speedscope --subprocesses --pid 1234.

image

mazatov commented 3 years ago

Did you find a workaround for this issue? I'm having the same problem

jlfwong commented 3 years ago

Hi! If either of you could provide a sample profile or a script which generates a sample profile that reproduces this, that would help me investigate.

It's possible the file is just too large, but I'd be surprised by that since there are other profile types that seem to load okay up to a couple hundred MB

themreza commented 3 years ago

I tried this on an instance of Odoo (https://github.com/odoo/odoo) running in Docker (https://hub.docker.com/_/odoo). I generated the profile by running py-spy with the command I posted above and letting it run for a while (around 20 minutes). Unfortunately I cannot share my sample as it contains private informtion, but in general this should happen with any web-server or job queue application that constantly processes data.

jlfwong commented 3 years ago

Thanks for the high-level repro steps.

Being blunt, without a file to debug with or a script that I can copy paste and run to generate the file, I'm incredibly unlikely to invest any time to debug this.

themreza commented 3 years ago

Jamie, I appreciate your work on this project, but I don't see the need for sarcasm as my intention was to suggest improvements. I also don't believe I was blunt as I tried to describe my profiling environment as clearly as possible. As I stated, I cannot share my profile as it contains sensitive information. May I ask if you have tested this tool on large profiles, perhaps multiple megabytes or even gigabytes of data?

jlfwong commented 3 years ago

Sorry, I wasn't intending to be sarcastic, but to be, as I said, blunt. I mean what I said literally.

From the instructions written, to investigate further, I believe I'd have to figure out what odoo is, figure out how to boot the docker image, figure out how to install py-spy, figure out how to find right pid for odoo, and then finally run the command that you've provided.

If you could provide a github repository which I can clone and run a single command to generate a file which creates the failure scenario, then that would create a much stronger incentive to investigate.

I have tested speedscope on multi-megabyte files in the past and it's worked, but each file format is different.

As an example of another issue (which I admittedly also have not taken the time to investigate yet) in which easy reproduction steps were provided where the reporter also could not provide their original profiles, see https://github.com/jlfwong/speedscope/issues/340. When I do have time, using the steps specifically outlined in that issue, I'll be able to reproduce the issue focusing only on the portions that are relevant to speedscope's own source.

themreza commented 3 years ago

Thanks for the clarification. I will try to repeat the same steps in a clean environment and post the profile.