Closed Bug 778285 Opened 13 years ago Closed 10 years ago

Failure to free compartments for closed tabs causes horrible performance near OOM

Categories

(Firefox :: General, defect)

x86
macOS
defect
Not set
major

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: wes, Unassigned)

References

Details

(Keywords: perf, Whiteboard: [MemShrink:P3])

Attachments

(3 files)

Attached file about:memory output
So, I'm working on an app and accidentally allocated about 1 GB of JS objects. My machine goes into swap, the browser becomes very unresponsive, and I close the offending tab (only one open besides a text file). The compartment is *still* taking up memory, even several minutes later as I type this bug, making my browsing experience simply awful. A beach ball on my mac every few seconds, long pauses. From about:memory, I ran the CC and GC before snapshoting the first attachment. I forget if I ran "minimize memory" or not. More than 10 minutes later, I still have 1GB of memory allocated to that compartment, and that tab is most definitely closed. That's when I snapshotted the second about:memory and about:compartments.
Attached file about:compartments
There is definitely no tab open to any chiptic.wes.msgs.net content
I followed these directions https://wiki.mozilla.org/Performance:Leak_Tools#Cycle_collector_heap_dump The file is 385 megabytes uncompressed, about a 42M download, caveat transforor http://www.page.ca/~wes/cc-edges-1.36851.log.gz
There are some ghost windows, even.
Whiteboard: [MemShrink]
We do give the JS engine a hint to maybe run a GC when a window is closed, but I don't know the particulars of how the JS engine decides when to actually run a GC.
I think it always ends up running a GC 5 seconds after a page close. Plus Wes was manually making it GC.
(In reply to Andrew McCreight [:mccr8] from comment #6) > I think it always ends up running a GC 5 seconds after a page close. Plus > Wes was manually making it GC. Oh, indeed. Wes, can you reproduce this problem? Can you reproduce it in safe mode? What version of Firefox are you running?
MemShrink:P3 for now -- Wes, can you answer the questions? Thanks!
Whiteboard: [MemShrink] → [MemShrink:P3]
(In reply to Justin Lebar [:jlebar] from comment #7) > (In reply to Andrew McCreight [:mccr8] from comment #6) > > I think it always ends up running a GC 5 seconds after a page close. Plus > > Wes was manually making it GC. > > Oh, indeed. > > Wes, can you reproduce this problem? Can you reproduce it in safe mode? > What version of Firefox are you running?
Severity: normal → major
Flags: needinfo?(wes)
Keywords: perf
Hi -- sorry for my bugzilla absence, I have had a stupid-busy schedule since mid-2012 and no longer work after hours due to RSI. Wayne, thanks for the e-mail tickle. I have not reproduced that issue recently, but I also have not been working on that application in quite some time. That said: I am scheduled to resume work on that application in about 10-12 days. I will to try reproduce with Firefox.current then.
Flags: needinfo?(wes)
thanks
Flags: needinfo?(wes)
See Also: → 1051818
don't think wes is coming back, so clearing NI. worth keeping open?
Flags: needinfo?(wes) → needinfo?(continuation)
Status: NEW → RESOLVED
Closed: 10 years ago
Flags: needinfo?(continuation)
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: