-
-
Notifications
You must be signed in to change notification settings - Fork 388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Privacy Badger on Chrome on Linux consuming high CPU #2954
Comments
@nhed Are you able to reproduce this bug? For example, does this happen regularly while using Google Meet or some other specific website? |
Seen it very high couple of time before in both I disabled and issue went away. Unrelated to Google Meet - I thing it started before I had to get on the call. Worth nothing that I run with two profile-dirs, personal and work (i think task manager shows a global view, so shows tasks from both profiles?) and at the time I had the PB extension only installed on the profile that was not running the Google Meet. Right now when I'm not running a google meet I just saw 65% usage and non-responsive extension button. |
Thanks for the additional information! It sounds like it's something about your particular installation of Privacy Badger. Uninstalling and reinstalling Privacy Badger may fix the problem. If you would like to try debugging though, you could navigate to The first thing to do once you've got developer tools open is to see if there are any meaningful errors in the Console tab. If you can consistently reproduce excessive CPU use, you can also switch over to the Performance tab, start recording a performance profile, and while recording, perform the actions that cause your Privacy Badger to use excessive CPU. We could then review what exactly Privacy Badger did at the time of high CPU use. Once you finish making a performance recording, you can right-click inside the Performance tab and select "Save profile" to export the performance data. |
well - maybe uninstalling extension and restarting chrome would have done the trick - not sure When I checked underlying storage to see which Noticed that the date on the LOCK file was old and renamed whole dir while reinstalling ext - but only then noticed with after forcing restart of chrome - things came back ok (ext is now responsive) I will now monitor for the CPU issues and come back here if it recurs Thanks |
Sounds good, thank you! |
Looks like the Chrome IO lock error means that Chrome extension storage is broken, which would break pretty much all browser extensions. Restarting Chrome should fix it though. Not sure why or when this happens. |
Just started seeing it again today. Seeing the same LOCK issue - not sure if there is a point in doing the performance recording but did anyway and sent while awaiting disabled the extension (I think it will recreate as long as I do not restart browser - and guarantee proper cleanup in between) |
Thanks for the performance recording! It looks like the CPU is maxed out because while Privacy Badger failed to properly initialize, probably because of JS errors, maybe the one above, Privacy Badger still injected "content scripts" into the page (for example to help remove tracking from some links inside Gmail) and the content scripts want to know whether they should proceed but Privacy Badger isn't ready to respond to them yet but it will never be ready because of the JS errors and we get an infinite loop at this point. So ... I should be able to fix the infinite loop, which will fix the CPU issue. However, Privacy Badger will still break now and then for you, where it will fail to finish initializing because something is badly wrong with browser extension storage. It would be good to figure out what to do to fix the underlying extension storage Chrome issue. Will removing your Chrome profile and starting from scratch do it? Do other people run into this problem? It doesn't seem specific to Privacy Badger. |
Would your fix have any visual indications that the extension failed to initialize? |
Sure, testing would be really nice! We could also then take another look at the errors that cause Privacy Badger to fail on initialization. There are no extra steps, no build process, just load from |
No, the only the thing I changed in #2955 is that the CPU-consuming infinite loop should terminate in under ten seconds. |
unfortunately since offering to test my browser did crash so it will probably be a while before I run into the lock/local-storage issues (but I have the extension loaded from source - had issue running it before the browser restart) |
I updated #2955 to also style the badge with a red exclamation mark and to show an error message in the popup once failed initialization is detected (after ten seconds or so). |
Discussed in #2953
How does one debug (to see if it is related to a specific tab)?
Originally posted by nhed March 6, 2024
Seen it happen several times (over several PB versions). Laptop fans spinning up,
htop
showing high cpu taken by chrome, chrome's task manager shows PB as highest CPU user.uname -r
:6.5.10-200.fc38.x86_64
rpm -q google-chrome-stable
:google-chrome-stable-120.0.6099.224-1.x86_64
2024.2.6
Disabled & Re-enabled and things quieted down
Did not see any discussion re CPU usage (is this the right place to have this convo?)
The text was updated successfully, but these errors were encountered: