brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17.9k stars 2.34k forks source link

High CPU usage since today [urgent] #19125

Closed ygoe closed 2 years ago

ygoe commented 3 years ago

Test Plan for QA:

https://github.com/brave/brave-browser/issues/19125#issuecomment-987857523 cc @brave/legacy_qa

Description

Since today, Brave is using a full CPU core constantly. My CPU fan keeps spinning my ears off and the system probably eats tons of electricity.

Also, Brave cannot be quit properly. The main process keeps spinning around the CPU and never closes. I have to kill it to close Brave. Next time I start it, I can restore the session.

I've closed all tabs now but the issues doesn't go away. It's really frustrating to use this browser now.

The internal task manager (Shift+Esc) doesn't show anything I could use. The browser is around 100% and the entries from the second line on change permanently, with just a few % CPU usage. No single culprit to be found here. Must be the browser itself. A bad update?

Steps to Reproduce

  1. Open Brave

Actual result:

See above

Expected result:

See above

Reproduces how often:

Always, immediately, easy

Brave version (brave://version info)

Brave | 1.31.88 Chromium: 95.0.4638.69 (Offizieller Build) (64-Bit) -- | -- Überarbeitung | 6a1600ed572fedecd573b6c2b90a22fe6392a410-refs/branch-heads/4638@{#984} Betriebssystem | Windows 10 Version 20H2 (Build 19042.1288)

Version/Channel Information:

Other Additional Information:

Miscellaneous Information:

I tried to find out how to launch this browser in safe mode but no such thing exists in Brave so I can't test any further.

duaneking commented 2 years ago

Brave should not be connecting to servers that a user has not explicitly asked it to connect to.

ygoe commented 2 years ago

@duaneking Well, Brave should probably connect to servers that provide software updates, filter lists, safe browsing data, public suffix data and a bunch of other stuff that a browser needs to keep up-to-date nowadays. But then, it should not break if that connection fails for some reason. Anyway, it seems like no network connections were involved in this bug (if it was the daylight saving time change as described).

LaurenWags commented 2 years ago

@iefremov is this related to the daylight savings change from a few months ago? In the test plan you didn't mention that but wondering if QA also needs to modify the date of our machines to reproduce? or is the following test plan sufficient?

Test plan: https://github.com/brave/brave-browser/issues/19125#issuecomment-987857523

huyz commented 2 years ago

After suffering for months, I tried progressively switching some of my profiles to Chrome, and saw the same problem there. So I don't think that Brave is at fault. My educated guess, based on which profile migration triggered the problem in Chrome too, is: lots of tabs and lots of extensions put Chrome/Brave in a bad way. I hope to be able to narrow down the problem by doing a binary search on extensions eventually and trying to reduce the number of my tabs.

iefremov commented 2 years ago

@iefremov is this related to the daylight savings change from a few months ago? In the test plan you didn't mention that but wondering if QA also needs to modify the date of our machines to reproduce? or is the following test plan sufficient?

My bad @LaurenWags , of course you need to modify the date to reproduce

LaurenWags commented 2 years ago

thanks for confirming @iefremov! We want to be sure we test this one appropriately 👍🏻 cc @kjozwiak

stephendonner commented 2 years ago

Verified PASSED using

Brave 1.35.79 Chromium: 97.0.4692.71 (Official Build) beta (x86_64)
Revision adefa7837d02a07a604c1e6eff0b3a09422ab88d-refs/branch-heads/4692@{#1247}
OS macOS Version 11.6.1 (Build 20G224)

Steps:

  1. installed 1.33.106
  2. set system date to November 7, 2021
  3. set system clock to 11:01pm
  4. waited 4 or so minutes
  5. launched Brave
  6. about 8 minutes later, it froze (I couldn't even bring up its Task Manager; CPU was pegged)
system date & time top output
Screen Shot 2021-11-07 at 11 01 50 PM Screen Shot 2021-11-07 at 11 13 29 PM
  1. installed 1.35.79
  2. repeated steps from 2 onward (and used the browser for upwards of 30 minutes, afterwords)

Confirmed that there was no devastating CPU spike/process hang any longer.


Verification PASSED on


Brave | 1.35.77 Chromium: 97.0.4692.71 (Official Build) beta (64-bit)
-- | --
Revision | adefa7837d02a07a604c1e6eff0b3a09422ab88d-refs/branch-heads/4692@{#1247}
OS | Windows 10 Version 21H2 (Build 19044.1415)

Verification passed on

Brave 1.35.98 Chromium: 98.0.4758.74 (Official Build) (64-bit)
Revision d0fe1ec4df090cd3eb02b591228505e12ea476e9-refs/branch-heads/4758@{#935}
OS Ubuntu 18.04 LTS
srirambv commented 2 years ago

Verification passed on Oppo Reno 5 with Android 11 running 1.35.85 x64 Beta build