Open Bug 1433580 Opened 6 years ago Updated 2 years ago

High JavaScript memory usage related to google safeframe

Categories

(Core :: JavaScript Engine, defect, P3)

defect

Tracking

()

REOPENED

People

(Reporter: unicorn.consulting, Unassigned)

Details

(Whiteboard: {MemShrink:P2])

Attachments

(4 files)

Attached file memory-report-new.json
Firefox on occasions consumes over 5,000Kb per the Windows task manager.  There are no add-ons or themes active.

It is always after the screen has been blanked for the night,  but the machine is set not to enter sleep mode.  The only other commonality appears to be having an ebay tab open.  But that might be because I almost always have one open.

I am including a memory file in the hope that helps with the diagnosis.
Same problem on Ubuntu Mate 17.10 x64 since v57 and still in v58.
Whiteboard: {MemShrink]
Attachment #8945912 - Attachment filename: memory-report-new.json → memory-report-new.json.gz
Attachment #8945912 - Attachment mime type: application/json → application/gzip
The attached memory report looks okay, I'm not seeing anything like 5Gb (I think that's what you meant, 5,000kB would be okay). Does the memory usage spike and then return to normal or does it stay high?
Flags: needinfo?(unicorn.consulting)
When it goes high, the only way to reduce it is to restart Firefox.  What I have noticed is I have an update restart pending when I need to do the restart to make it convenient,  but I have no idea if the is a link.

The memory I was quoting was the MB that windows task manager reports.
Flags: needinfo?(unicorn.consulting)
Matt, to clarify are you seeing memory usage in the Mb or Gb range? 

Eric said that 5Mb is not alarming.

Can you send a screenshot from your windows task manager when you're seeing the high memory usage? 

Thanks.
Flags: needinfo?(unicorn.consulting)
Attached image memory.png
This has been sitting in the background of my machine for a couple of days,  but it is from my most recent incident.
Flags: needinfo?(unicorn.consulting)
(In reply to al0305 from comment #6)
> happen to me since firefox 59 beta i see several minifreeze trying change of
> page to other and only open 1 web and firefox eating 1 gb like google crome
> 
> screen: https://ibb.co/eGC4Y7
> 
> addons: adblock and mega

Please file a separate bug.
Matt, can you provide a memory report when the issue happening? We think it might be a website leak but it's a hard to tell from a snapshot of task manager.
Flags: needinfo?(unicorn.consulting)
Ok I have given it a week and the issue has not reoccurred.  It would appear whatever was happening is no longer happening.  Perhaps the bug can be closed workforme.

I should point out that the json file I uploaded and attached to the bug was from an occasion where the issue was occurring.
Flags: needinfo?(unicorn.consulting)
Closing for now, please feel free to reopen if you see the issue again.
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → WORKSFORME
This and the attached PNG from to-days fiasco.
Attached image WindowsMemory.PNG
Status: RESOLVED → REOPENED
Ever confirmed: true
Resolution: WORKSFORME → ---
It's virtually all ad related:

> 1,294.73 MB (100.0%) -- explicit
> ├──1,161.82 MB (89.73%) -- window-objects
> │  ├──1,156.13 MB (89.30%) -- top(https://www.ebay.com.au/sch/i.html?_from=R40&_sacat=0&_nkw=automotive+wire&_pgn=6&_skc=250&rt=nc, id=30064771073)
> │  │  ├──1,029.86 MB (79.54%) -- active
> │  │  │  ├────824.75 MB (63.70%) ++ window(https://tpc.googlesyndication.com/safeframe/1-0-23/html/container.html)
> │  │  │  ├─────90.80 MB (07.01%) ++ window(https://tpc.googlesyndication.com/safeframe/1-0-23/html/container.html?n=4)
> │  │  │  ├─────90.56 MB (06.99%) ++ window(https://ad.doubleclick.net/ddm/adi/N7442.130396.SPICEWORKS/B20864533.219149628;dc_ver=41.108;sz=728x90;u_sd=1;dc_adk=2995336723;ord=65x9ul;click=https%3A%2F%2Fadclick.g.doubleclick.net%2Fpcs%2Fclick%3Fxai%3DAKAOjsvt2EP5U8UmE71Gceuf6Ucmwd9BJV5XiOG0w9ysNCau8TuNv2qp4XxtwQT6sc6vd7gD4JtU0E2wXjnqZ-dAnDyaOdjc45ONixxPMBhxj8xj5B5yP5c6w28gsER3lQesNzkbaoFkoH5uXR7D-8ESzxHzkQJ0ROon0Of6NRh6FaN-b30chckqs2YtKsWE7ykRfC0YYDaH2hjHRe6Tm_Btt12Xkm-IC4XSRMQV60bfHullaFgLPZtqkkCv14ZrfL4obU4iWKAqYXuTYzieJoJ8PwdThQa3pxDIYOppr3Rx%26sig%3DCg0ArKJSzFz8hPk-YUjbEAE%26urlfix%3D1%26adurl%3Dhttps%3A%2F%2Fsin1-ib.adnxs.com%2Fclick%253FzczMzMzM5D9nZmZmZubgPwAAAOBRuBNAAAAAAAAA6j8AAAAAAADwP10dgEjna8UBoxHV1M-khHvTv9taAAAAAERQsQC0GwAAOwMAAAIAAACebsMFDyQUAAAAAABVU0QAQVVEANgCWgCy5AAAAAABAQUCAAAAALQAMSONSQAAAAA.%2Fcnd%253D%252521WAlIqQjv6bMKEJ7djS4Yj8hQIAAoADoJU0lOMTozNTg1%2Fcca%253DODI3I1NJTjE6MzU4NQ%253D%253D%2Fbn%253D79442%2Freferrer%253Dhttps%25253A%25252F%25252Fwww.ebay.com.au%25252Fsch%25252Fi.html%25253F_from%25253DR40%252526_sacat%25253D0%252526_nkw%25253Dautomotive%25252Bwire%252526_pgn%25253D6%252526_skc%25253D250%252526rt%25253Dnc%2Fclickenc%253D;dc_rfl=5,https%3A%2F%2Fwww.ebay.com.au%2Fsch%2Fi.html%3F_from%3DR40%26_sacat%3D0%26_nkw%3Dautomotive%2Bwire%26_pgn%3D6%26_skc%3D250%26rt%3Dnc$0;xdt=1;crlt=RWsOV7Ihj*;osda=2;sttr=27;prcl=s?)
> │  │  │  └─────23.75 MB (01.83%) ++ (15 tiny)
This is pretty straightforward to repro:

#1 - load https://www.ebay.com.au/sch/i.html?_from=R40&_sacat=0&_nkw=automotive+wire&_pgn=6&_skc=250&rt=nc
#2 - let it hang out for a few hours

I can see that memory is slowly increasing in the content process, predominantly for JS in a safeframe window:

> │  │  │  ├──182.90 MB (40.15%) -- window(https://tpc.googlesyndication.com/safeframe/1-0-23/html/container.html)
> │  │  │  │  ├──173.22 MB (38.02%) -- js-compartment(https://tpc.googlesyndication.com/safeframe/1-0-23/html/container.html, about:blank)
> │  │  │  │  │  ├──163.98 MB (36.00%) -- classes
> │  │  │  │  │  │  ├───78.73 MB (17.28%) ++ class(Function)/objects
> │  │  │  │  │  │  ├───45.24 MB (09.93%) ++ class(Object)/objects
> │  │  │  │  │  │  ├───22.33 MB (04.90%) ++ class(Array)/objects
> │  │  │  │  │  │  ├───17.42 MB (03.82%) ++ class(Call)/objects
> │  │  │  │  │  │  └────0.26 MB (00.06%) ++ class(<non-notable classes>)/objects
Component: General → JavaScript Engine
Product: Firefox → Core
Summary: Apparent memory leak → High JavaScript memory usage related to google safeframe
To fix this, we first need to know what's keeping all these functions alive. Sounds like a job for heap profiling. Nick?

(It is hard to place blame. A leak could conceivably be related to closures, wrapper machinery, xpconnect goop, browser chrome, dom implementation details... and of course, web sites can be super leaky.)
Flags: needinfo?(nfitzgerald)
Priority: -- → P3
Whiteboard: {MemShrink] → {MemShrink:P2]
Flags: needinfo?(nfitzgerald)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: