New issue
Advanced search Search tips

Issue 888027 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner: ----
Closed: Dec 4
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

Unexpectedly high CPU usage when pausing on a JavaScript breakpoint

Reported by lee...@gmail.com, Sep 21

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36

Steps to reproduce the problem:
1. Open the Task Manager and measure CPU usage of your tab
2. Put a breakpoint in any JavaScript file used by that tab
3. Make sure the script execution pauses on that breakpoint
4. Measure CPU usage of your tab again

What is the expected behavior?

What went wrong?
Task Manager shows that the tab I'm trying to debug takes 6-15% CPU when idle and Developer Tools are open. When using the webpage it goes up to 30% on average, never above 50%.

When it pauses on any JavaScript breakpoint CPU usage immediately jumps to 200-260%. It goes down again if I continue script execution.

Did this work before? N/A 

Chrome version: 69.0.3497.100  Channel: stable
OS Version: Ubuntu 18.04
Flash Version: 

JavaScript is not minified. I'm not using source maps & I have them disabled in settings. I tried disabling different extensions with no luck.

My CPU is i7-7700HQ.

I have an ultrabook (poor cooling) and thermald shuts my machine down when CPU temperature hits 100 degrees Celsius. It happened to me 3 times this week, each time when debugging in Chrome. Never ever before.
 
Owner: kozy@chromium.org
Cannot reproduce it.

Once it happens again can you please do the following:
1. open a new tab
2. in the address bar type chrome://tracing 
3. press Record button in the top left
4. click "Manually select settings" and make sure all checkboxes on the left-hand side pane are checked.
5. click Record button at the bottom
6. let it record for several seconds and click Stop
7. save the recorder trace to a file and attach it to this bug report.

Thank you.
Please find the file attached.

I noticed that when the tab is inactive, the CPU usage goes down a bit. That's why you'll find lower CPU usage at the beginning & end of the tracing results.

This is 100% reproducible.
trace_tracing.json.gz
7.4 MB Download
Labels: Needs-Triage-M69
Components: Blink>Compositing
I do not see any DevTools specific in the trace. There are a lot of work happening on compositor tile workers. Do you have dedicated GPU in your ultrabook?
Could you go to DevTools settings and check "Disable paused state overlay" checkbox in Appearance section of Preferences tab and try to reproduce issue again?

+ blink > compositing, just in case if compositor guru can detect well known issue by trace.

Components: -Blink>Compositing Internals>Compositing
Cc: kozy@chromium.org vamshi.kommuri@chromium.org
 Issue 816557  has been merged into this issue.
Yes, I have a dedicated GPU. I'm using official drivers.

Partial output of `lshw -c video`:
    product: GP107M [GeForce GTX 1050 Ti Mobile]
    configuration: driver=nvidia latency=0

Partial output of `modinfo nvidia`:
    filename:       /lib/modules/4.15.0-32-generic/updates/dkms/nvidia.ko
    alias:          char-major-195-*
    version:        396.54
    name:           nvidia
    vermagic:       4.15.0-32-generic SMP mod_unload 

My machine is Asus ZenBook Pro UX550VE.

---------

With "Disable pause state overlay" option checked the issue does not occur.

Unless I go to the "Elements" tab and activate the "Select an element in the page to inspect it" tool. Once I select an element or deactivate the tool, CPU usage drops down again.

---------

Sorry, I cannot find "blink > compositing".

https://cdn.pbrd.co/images/HFvzQ8b.png

Cc: enne@chromium.org
Status: Assigned (was: Unconfirmed)
Agreed that the trace looks like a lot of the time is being spent in raster workers.  This is likely because devtools is causing lots of repaints for some reason.  That would probably be the place to start investigating.
Cc: xidac...@chromium.org
Xida, could it be related to  crbug.com/760738 ?
Cc: fs...@chromium.org
It looks like 760738 is canvas related, I am no longer working on canvas.

fserb@: could you take a look.
Owner: fs...@chromium.org
Fernando, please take a look. Feel free to reassign if you think that it is not gpu related.
Owner: ----
Status: Available (was: Assigned)
Status: Fixed (was: Available)
This was a compositor issue.

Sign in to add a comment