AdguardBrowserExtension
AdguardBrowserExtension copied to clipboard
Memory Leak / Run away with some tabs / websites after many hours
AdGuard Extension version
4.3.13
Browser version
Firefox 123.0
OS version
Windows 10 22H2 19045.4046
What filters do you have enabled?
AdGuard Base filter, AdGuard URL Tracking filter, AdGuard Social Media filter, NoCoin Filter List
What Stealth Mode options do you have enabled?
No response
Issue Details
After leaving the browser open with tabs for a number of hours the memory used by Firefox increases to use all available memory. Restarting the browser will fix this and return levels to normal. It is also possible to close the offending tabs which drops the memory use accordingly. However, it is not possible / difficult to know which tabs / websites are consuming the most memory as often the browser becomes unresponsive. AdGuard has been identified as the likely culprit from about:memory in a session which was vaugely responsive. Websites that have recently identified as potentially causing the issue:
- https://www.hswdiamondtools.co.uk
- https://chat.openai.com/
- https://www.livingwage.org.uk/
- https://cpc.farnell.com/
- https://www.farnell.com/ All will have normal memory footprints initially increasing over time with it mostly all allocated to AdGuard extension.
Expected Behavior
AdGuard doesn't continually consume more and more memory. If a website tab is open for a longer period then perodic garbage collection is done if needed to maintain more acceptable levels.
Screenshots
Screenshot 1:
Additional Information
Snip from Main Process (pid 17464) Explicit Allocations
─14,283,722,292 B (95.48%) -- js-non-window │ ├──14,252,535,000 B (95.27%) -- zones │ │ ├──14,231,353,336 B (95.13%) -- zone(0x1b1ff43d900) │ │ │ ├──13,557,513,344 B (90.63%) -- strings │ │ │ │ ├───8,742,371,160 B (58.44%) -- string(length=656062, copies=6649, "#psyduckpockeball, a[href^="https://ya-distrib.ru/r/"], .mywidget__col > a.mywidget__link_advert, div[id^="_u_ablock_"], .ipsAdvertisement, .adv-news-within, div[id^="yandex_rtb"], a[href^="https://ad.letmeads.com/"], div[data-adv-type="dfp"], body #vid_vpaut_div, .adsbyyottos, .flat_pm_outgoing, #Ad2, #AdText, #Ad_Top, #Adfox_Banner, #AdvertFieldBottom, #AdvertFieldCenter, #AdvertFieldTop, #Advertisement, #AdvertisingTopLine, #BanHolder28-1, #BannerDiv, #BannerGBottom, #BannerGCenter, #BannerGIMG, #BannerGTop, #BannerH2Left, #BannerHIMG, #BannerHLeft, #BannerUnderBroChat, #JaboxAdBarOuter, #JobInformer, #METABAR_IFRAME, #MarketGidComposite1001, #PopUpWnd, #PopWin, #PopWin_popupsu_notds, #RichBanner_center, #Tadspacehead, #__adIframe, #ad-200, #ad-container, #ad-content, #ad-slides, #ad-wrapper, #ad1, #ad2, #ad3, #ad4 { display: none !important; }/r/n#ad7, #ad728x90, #adContainer, #adHeadBanner, #adL, #adP, #adTop, #adWrapper, #ad_container, #ad_help_link, #ad_hide_mask_ad_0, #ad_hide_mask_ad_1, #ad_square, " (truncated)) │ │ │ │ │ ├──8,742,211,584 B (58.44%) ── malloc-heap/two-byte │ │ │ │ │ └────────159,576 B (00.00%) ── gc-heap/two-byte │ │ │ │ ├───3,365,990,400 B (22.50%) -- string(length=656047, copies=2560, "#psyduckpockeball, a[href^="https://ya-distrib.ru/r/"], .mywidget__col > a.mywidget__link_advert, div[id^="_u_ablock_"], .ipsAdvertisement, .adv-news-within, div[id^="yandex_rtb"], a[href^="https://ad.letmeads.com/"], div[data-adv-type="dfp"], body #vid_vpaut_div, .adsbyyottos, .flat_pm_outgoing, #Ad2, #AdText, #Ad_Top, #Adfox_Banner, #AdvertFieldBottom, #AdvertFieldCenter, #AdvertFieldTop, #Advertisement, #AdvertisingTopLine, #BanHolder28-1, #BannerDiv, #BannerGBottom, #BannerGCenter, #BannerGIMG, #BannerGTop, #BannerH2Left, #BannerHIMG, #BannerHLeft, #BannerUnderBroChat, #JaboxAdBarOuter, #JobInformer, #METABAR_IFRAME, #MarketGidComposite1001, #PopUpWnd, #PopWin, #PopWin_popupsu_notds, #RichBanner_center, #Tadspacehead, #__adIframe, #ad-200, #ad-container, #ad-content, #ad-slides, #ad-wrapper, #ad1, #ad2, #ad3, #ad4 { display: none !important; }/r/n#ad7, #ad728x90, #adContainer, #adHeadBanner, #adL, #adP, #adTop, #adWrapper, #ad_container, #ad_help_link, #ad_hide_mask_ad_0, #ad_hide_mask_ad_1, #ad_square, " (truncated)) │ │ │ │ │ ├──3,365,928,960 B (22.50%) ── malloc-heap/two-byte │ │ │ │ │ └─────────61,440 B (00.00%) ── gc-heap/two-byte │ │ │ │ ├─────683,716,800 B (04.57%) -- string(length=656520, copies=520, "#psyduckpockeball, a[href^="https://ya-distrib.ru/r/"], .mywidget__col > a.mywidget__link_advert, div[id^="_u_ablock_"], .ipsAdvertisement, .adv-news-within, div[id^="yandex_rtb"], a[href^="https://ad.letmeads.com/"], div[data-adv-type="dfp"], body #vid_vpaut_div, .adsbyyottos, .flat_pm_outgoing, #Ad2, #AdText, #Ad_Top, #Adfox_Banner, #AdvertFieldBottom, #AdvertFieldCenter, #AdvertFieldTop, #Advertisement, #AdvertisingTopLine, #BanHolder28-1, #BannerDiv, #BannerGBottom, #BannerGCenter, #BannerGIMG, #BannerGTop, #BannerH2Left, #BannerHIMG, #BannerHLeft, #BannerUnderBroChat, #JaboxAdBarOuter, #JobInformer, #METABAR_IFRAME, #MarketGidComposite1001, #PopUpWnd, #PopWin, #PopWin_popupsu_notds, #RichBanner_center, #Tadspacehead, #__adIframe, #ad-200, #ad-container, #ad-content, #ad-slides, #ad-wrapper, #ad1, #ad2, #ad3, #ad4 { display: none !important; }/r/n#ad7, #ad728x90, #adContainer, #adHeadBanner, #adL, #adP, #adTop, #adWrapper, #ad_container, #ad_help_link, #ad_hide_mask_ad_0, #ad_hide_mask_ad_1, #ad_square, " (truncated)) │ │ │ │ │ ├──683,704,320 B (04.57%) ── malloc-heap/two-byte │ │ │ │ │ └───────12,480 B (00.00%) ── gc-heap/two-byte │ │ │ │ ├──────44,048,728 B (00.29%) -- string(<non-notable strings>) │ │ │ │ │ ├──39,748,528 B (00.27%) -- malloc-heap │ │ │ │ │ │ ├──39,231,840 B (00.26%) ── latin1 │ │ │ │ │ │ └─────516,688 B (00.00%) ── two-byte │ │ │ │ │ └───4,300,200 B (00.03%) -- gc-heap │ │ │ │ │ ├──4,195,920 B (00.03%) ── latin1 │ │ │ │ │ └────104,280 B (00.00%) ── two-byte │ │ │ │ ├───────9,695,448 B (00.06%) -- string(<about-memory>) │ │ │ │ │ ├──9,695,232 B (00.06%) ── malloc-heap │ │ │ │ │ └────────216 B (00.00%) ── gc-heap │ │ │ │ ├───────6,594,680 B (00.04%) -- string(length=659414, copies=5, "#psyduckpockeball, a[href^="https://ya-distrib.ru/r/"], .mywidget__col > a.mywidget__link_advert, div[id^="_u_ablock_"], .ipsAdvertisement, .adv-news-within, div[id^="yandex_rtb"], a[href^="https://ad.letmeads.com/"], div[data-adv-type="dfp"], body #vid_vpaut_div, .adsbyyottos, .flat_pm_outgoing, #Ad2, #AdText, #Ad_Top, #Adfox_Banner, #AdvertFieldBottom, #AdvertFieldCenter, #AdvertFieldTop, #Advertisement, #AdvertisingTopLine, #BanHolder28-1, #BannerDiv, #BannerGBottom, #BannerGCenter, #BannerGIMG, #BannerGTop, #BannerH2Left, #BannerHIMG, #BannerHLeft, #BannerUnderBroChat, #JaboxAdBarOuter, #JobInformer, #METABAR_IFRAME, #MarketGidComposite1001, #PopUpWnd, #PopWin, #PopWin_popupsu_notds, #RichBanner_center, #Tadspacehead, #__adIframe, #ad-200, #ad-container, #ad-content, #ad-slides, #ad-wrapper, #ad1, #ad2, #ad3, #ad4 { display: none !important; }/r/n#ad7, #ad728x90, #adContainer, #adHeadBanner, #adL, #adP, #adTop, #adWrapper, #ad_container, #ad_help_link, #ad_hide_mask_ad_0, #ad_hide_mask_ad_1, #ad_square, " (truncated)) │ │ │ │ │ ├──6,594,560 B (00.04%) ── malloc-heap/two-byte │ │ │ │ │ └────────120 B (00.00%) ── gc-heap/two-byte
Snip from webIsolated=https://hswdiamondtools.co.uk (pid 15804) Explicit Allocations
1,745,827,424 B (63.73%) -- realm([Expanded Principal [https://www.hswdiamondtools.co.uk/iso30---er32-tool-holder---high-precision-2871-p.asp, moz-extension://bd75f6a3-7787-4cbb-a4f4-c4ea9d6b86dc/]], Content Script "AdGuard AdBlocker" (ID: [email protected], moz-extension://bd75f6a3-7787-4cbb-a4f4-c4ea9d6b86dc/)) │ │ │ │ ├────963,231,648 B (35.16%) -- scripts │ │ │ │ │ ├──509,465,168 B (18.60%) ── malloc-heap/data [4] │ │ │ │ │ └──453,766,480 B (16.57%) ── gc-heap [4] │ │ │ │ ├────768,517,904 B (28.06%) -- classes │ │ │ │ │ ├──535,697,768 B (19.56%) -- class(Function)/objects │ │ │ │ │ │ ├──517,846,168 B (18.90%) ── gc-heap [4] │ │ │ │ │ │ └───17,851,600 B (00.65%) ── malloc-heap/slots [4] │ │ │ │ │ ├──139,248,480 B (05.08%) -- class(Object)/objects │ │ │ │ │ │ ├───86,016,128 B (03.14%) -- malloc-heap │ │ │ │ │ │ │ ├──51,970,176 B (01.90%) ── slots [4] │ │ │ │ │ │ │ └──34,045,952 B (01.24%) ── elements/normal │ │ │ │ │ │ └───53,232,352 B (01.94%) ── gc-heap [4] │ │ │ │ │ ├───33,884,952 B (01.24%) -- class(Call)/objects │ │ │ │ │ │ ├──33,352,984 B (01.22%) ── gc-heap │ │ │ │ │ │ └─────531,968 B (00.02%) ── malloc-heap/slots │ │ │ │ │ ├───22,776,936 B (00.83%) -- class(LexicalEnvironment)/objects │ │ │ │ │ │ ├──17,022,976 B (00.62%) ── malloc-heap/slots │ │ │ │ │ │ └───5,753,960 B (00.21%) ── gc-heap │ │ │ │ │ ├───14,429,744 B (00.53%) ── class(RegExp)/objects/gc-heap │ │ │ │ │ ├────9,586,280 B (00.35%) ── class(BoundFunctionObject)/objects/gc-heap │ │ │ │ │ ├────9,520,144 B (00.35%) -- class(Array)/objects │ │ │ │ │ │ ├──6,728,464 B (00.25%) ── gc-heap │ │ │ │ │ │ └──2,791,680 B (00.10%) -- malloc-heap │ │ │ │ │ │ ├──2,791,168 B (00.10%) ── elements/normal │ │ │ │ │ │ └────────512 B (00.00%) ── slots │ │ │ │ │ ├────2,327,360 B (00.08%) -- class(Map)/objects │ │ │ │ │ │ ├──1,861,888 B (00.07%) ── malloc-heap/misc │ │ │ │ │ │ └────465,472 B (00.02%) ── gc-heap │ │ │ │ │ ├──────466,032 B (00.02%) ── class(ScriptSource)/objects/gc-heap │ │ │ │ │ ├──────458,752 B (00.02%) ── class(Proxy)/objects/gc-heap [4] │ │ │ │ │ └──────121,456 B (00.00%) -- class(<non-notable classes>)/objects │ │ │ │ │ ├───66,704 B (00.00%) ── gc-heap [4] │ │ │ │ │ └───54,752 B (00.00%) -- malloc-heap │ │ │ │ │ ├──38,304 B (00.00%) ── slots [4] │ │ │ │ │ ├───8,896 B (00.00%) ── global-data [4] │ │ │ │ │ ├───5,632 B (00.00%) ── misc [4] │ │ │ │ │ └───1,920 B (00.00%) ── elements/normal [3] │ │ │ │ ├─────13,632,256 B (00.50%) ── saved-stacks-set │ │ │ │ ├────────368,096 B (00.01%) ── jit-scripts │ │ │ │ ├─────────41,824 B (00.00%) ── baseline/data │ │ │ │ ├─────────13,648 B (00.00%) ── sundries/malloc-heap [4] │ │ │ │ ├─────────12,512 B (00.00%) ── alloc-sites │ │ │ │ └──────────9,536 B (00.00%) ── ion-data
Update on this. It appears that this actually happens on any website that is loaded. Upon restarting Firefox the tab doesn't load in to memory until it has become active. Once the tab is active then the memory useage for Firefox and AdBlock extension slowly rises for that tab / website. If the browser is responsive enough to do so then closing the tab reduces memory useage accordingly.
@maeterlinckle Hello! Please check if the problem persists on the latest beta version for Firefox at https://github.com/AdguardTeam/AdguardBrowserExtension/releases/tag/v4.3.31-beta We've fixed the possible problem with the memory leak there.
OK - installed. Will report back in a few days.
@maeterlinckle Does the problem still reproduce?
@maeterlinckle We'll close the issue for now. If the problem persists, please leave a comment.
Hello, Sorry, life got in the way. Yes this appears to have fixed the issue and is running well now. From my experience this would be good to push to production. thanks,
@alexx7311 Thank you for your work on this!