AdguardTeam / AdguardBrowserExtension

AdGuard browser extension
https://adguard.com/
GNU General Public License v3.0
3.12k stars 333 forks source link

Memory Leak #2972

Open JohnSheppard11 opened 1 month ago

JohnSheppard11 commented 1 month ago

Please answer the following questions for yourself before submitting an issue

AdGuard Extension version

5.0.113

Browser version

Google Chrome 129.0.6668.60

OS version

windows 10 22H2 19045.4894

Ad Blocking

No response

Privacy

No response

Social

No response

Annoyances

No response

Security

No response

Other

No response

Language-specific

No response

What Tracking protection options do you have enabled?

No response

Issue Details

Steps to reproduce:

  1. Launch

5 browser windows, ~30-50 tabs each. PC Power - sleep only.

1+ week already...

Temp fix: Reopen tab, for some sites after reopening you need to close the remaining processes/scripts through the browser task manager.

Expected Behavior

Working properly.

Actual Behavior

Memory leak happens. Why plz.

Screenshots

Screenshot 1

Additional Information

This bug may also be present in other browsers, check.

(Memory leak in 2024 imagine)

Using since 2011.

rpodric commented 1 month ago

Yes, it is present in other browsers: Slimjet, for example. That's an outdated browser to be sure, but at least it points away from Chrome. This never happened with the MV2 version.

jimsinenomine commented 3 weeks ago

This has been present for the past several versions and still persists for 5.0.138. A web page/tab that is open for a significant period of time and/or one that causes a lot of AdGuard extension blocking will cause an out of memory error. I've seen it in Edge, Brave and Vivaldi. I've had to stop using the extension and revert to uBOL in the meantime.

jimsinenomine commented 2 weeks ago

Still present in 5.0.161

rpodric commented 2 weeks ago

I guess no one has looked at it yet. Maybe this is the wrong way to report.

windwak3r commented 2 weeks ago

@jimsinenomine @JohnSheppard11 @rpodric Please reproduce the problem and open Task Manager in Chrome (Shift + Esc). How much memory does AdGuard consume and what is the CPU load? Can you reproduce the problem consistently on certain websites or can it happen on any website?

A web page/tab that is open for a significant period of time and/or one that causes a lot of AdGuard extension blocking will cause an out of memory error.

How long does the page have to be open? Do you just leave the page open or refresh it or click something on the page? Do you have any memory-saving options enabled in your browser?

It would also be great if you attach your AdGuard extension settings in the comment.

jimsinenomine commented 1 week ago

The ones it's happened on for me are "voice.google.com" and "mail.google.com" (as PWA). I have them permanently open in Edge. Settings are attached. I've turned the extension back on and it should cause the error again (although I did notice an update to 5.0.162). Assuming it errors, I'll then do the task manager checks and report back.

I just leave the page open. No refresh (auto or manual). Memory setting in Edge is the default "Balanced savings".

adg_ext_settings_5.0.162_301024-125258.json

rpodric commented 1 week ago

In my case, it must have been YouTube, if the site matters at all, which I'm guessing that it doesn't, since I don't use that browser for anything else. I think it's much more the time on a given site rather than the site.

jimsinenomine commented 1 week ago

Here you go re the error and the task manager. Not sure how much it helps. There's a theme here - in case anyone didn't notice 🙂 i.e. Google-owned web sites (Voice, Gmail, YouTube, etc.). Took 10-12 hours for this error to show up. HTH.

Edge OoM error Edge OoM - task manager

jimsinenomine commented 5 days ago

Issue remains in 5.0.164

rpodric commented 5 days ago

I know there's a bit of a coincidence since all the sites mentioned so far relate to Google, so it may be instructive to try to replicate on some unrelated site, like Wikipedia or whatever else.

scviktor commented 5 days ago

Can confirm the same behavior on Windows 11 with GoogleChrome 130.0.6723.92 and AddGuard Extension 5.0.164. The problem occurs after a few hours of inactivity on various websites such as: E.g. support.sap.com and others.

The tabs appear blank with an “Out of Memory” error message and a high memory usage of 1GB to 4GB. System memory of 40 GB RAM almost completely used. Closing tabs frees up storage space accordingly. Disabling the AddGuard extension will completely resolve the issue.

JohnSheppard11 commented 2 days ago

I don’t see the point in dumping anything, all open sites from the very opening start to slowly gain size in RAM, after 5 hours several GB are accumulated.

I don’t know how and where to open the settings, and I, with 5 open windows and 200 tabs, have no desire to risk losing data and turn on extension again.

I'm too lazy to log in to GitHub again and write something, I can't provide data from the logs and extension settings due to the large number of open tabs. So please don't expect any answers from me from now on. I provided everything I could provide.

So, to begin with, I recommend you to perform a global rollback to a stable version, then look for the causes of the bug, and redo all the tests properly, so as not to lose your audience and rating, which will be quite difficult to get back.