Closed
Bug 730753
Opened 13 years ago
Closed 13 years ago
OOM crash with repeatedly calling canvas getContext
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla13
People
(Reporter: alice0775, Assigned: smaug)
References
Details
(Keywords: crash, regression, testcase, Whiteboard: [MemShrink:P2])
Attachments
(3 files)
(deleted),
patch
|
mccr8
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
akeybl
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
Details | Diff | Splinter Review |
Build Identifier:
http://hg.mozilla.org/mozilla-central/rev/ce20e9b47e9c
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120225 Firefox/13.0a1 ID:20120225031723
When I test Bug 730698 attachment 600788 [details], browser crashes bp-20846c43-1e86-459b-a638-e25832120226
Reproducible: Always
Steps to Reproduce:
1. Start Firefox with new profile
2. Run firefoxcrashtest.html of attachment 600788 [details]
Actual Results:
Browser crashes
Expected Results:
No crash
Regression window(m-c)
Browser does not crash for about 1 min. And I can barely operate it:
http://hg.mozilla.org/mozilla-central/rev/f410bdf30132
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0a1) Gecko/20120130 Firefox/12.0a1 ID:20120130122131
Browser crashes within 30sec:
http://hg.mozilla.org/mozilla-central/rev/89bb79343f73
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0a1) Gecko/20120130 Firefox/12.0a1 ID:20120130125731
Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=f410bdf30132&tochange=89bb79343f73
Comment 1•13 years ago
|
||
This sounds like a CC regression...
tracking-firefox12:
--- → ?
tracking-firefox13:
--- → ?
Updated•13 years ago
|
Assignee | ||
Comment 2•13 years ago
|
||
My initial guess is that we end up calling CC fewer times, so we don't release memory
fast enough.
Assignee: nobody → bugs
Assignee | ||
Comment 3•13 years ago
|
||
Unfortunately I can't reproduce this on linux.
Assignee | ||
Comment 4•13 years ago
|
||
I'll post a patch to tryserver. Hopefully someone can test it.
Assignee | ||
Comment 5•13 years ago
|
||
This brings back similar behavior what we have in <FF12.
Yes, there can be some more CCs, but fortunately they are a lot faster.
http://mxr.mozilla.org/mozilla-beta/source/dom/base/nsJSEnvironment.cpp#3430
http://mxr.mozilla.org/mozilla-beta/source/dom/base/nsJSEnvironment.cpp#3339
https://tbpl.mozilla.org/?tree=Try&rev=26f8245eb5b0
Please test the tryserver build
Look for 26f8245eb5b0 in
http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/
Attachment #600877 -
Flags: review?(continuation)
Comment 6•13 years ago
|
||
Comment on attachment 600877 [details] [diff] [review]
patch
Review of attachment 600877 [details] [diff] [review]:
-----------------------------------------------------------------
Makes sense. We really have no idea how much garbage a GC could have released, so we should err on the side of caution.
::: dom/base/nsJSEnvironment.cpp
@@ +180,5 @@
> static PRUint32 sForgetSkippableBeforeCC = 0;
> static PRUint32 sPreviousSuspectedCount = 0;
>
> static bool sCleanupSinceLastGC = true;
> +static bool sNeedsFullCC = false;
Do you need to set this to false in that init function, too?
Attachment #600877 -
Flags: review?(continuation) → review+
Assignee | ||
Comment 7•13 years ago
|
||
(In reply to Andrew McCreight [:mccr8] from comment #6)
> > +static bool sNeedsFullCC = false;
>
> Do you need to set this to false in that init function, too?
I could do that, just to be consistent.
(Someone should cleanup nsJSEnvironment.cpp)
Assignee | ||
Comment 8•13 years ago
|
||
Assignee | ||
Comment 9•13 years ago
|
||
Comment on attachment 600897 [details] [diff] [review]
patch
[Approval Request Comment]
Regression caused by (bug #): bug 721543
User impact if declined: possible OOM in rare cases
Testing completed (on m-c, etc.): just landed to m-c
Risk to taking this patch (and alternatives if risky): bringing back old behavior,
should be low risk.
String changes made by this patch: N/A
Attachment #600897 -
Flags: approval-mozilla-aurora?
Assignee | ||
Comment 10•13 years ago
|
||
Assignee | ||
Comment 11•13 years ago
|
||
Could someone please test http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/opettay@mozilla.com-26f8245eb5b0/
Comment 12•13 years ago
|
||
I wonder if this will help with the intermittent hang I was getting in bug 727965.
Reporter | ||
Comment 13•13 years ago
|
||
(In reply to Olli Pettay [:smaug] from comment #11)
> Could someone please test
> http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/opettay@mozilla.
> com-26f8245eb5b0/
The try build crashes after 15-30sec :(
Assignee | ||
Comment 14•13 years ago
|
||
Boo. Then it is about something else.
We should still use the patch.
Could you check if GC and/or CC runs while running the test.
Set javascript.options.mem.log to true and check error console Messages.
Reporter | ||
Comment 15•13 years ago
|
||
And latest m-c tinderbox-builds also crashes after 15-30sec.
bp-2176ffdf-c6e3-4216-9f32-625232120227
http://hg.mozilla.org/mozilla-central/rev/8ea5c983743f
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120227 Firefox/13.0a1 ID:20120227065949
tracking-firefox12:
? → ---
tracking-firefox13:
? → ---
Reporter | ||
Comment 16•13 years ago
|
||
Sorry, Accidentally removed flags
tracking-firefox12:
--- → ?
tracking-firefox13:
--- → ?
Reporter | ||
Comment 17•13 years ago
|
||
(In reply to Olli Pettay [:smaug] from comment #14)
> Could you check if GC and/or CC runs while running the test.
> Set javascript.options.mem.log to true and check error console Messages.
It is difficult to capture the log because the browser crashes and error console closes at same time.
GC(T+12.8) TotalTime: 3.4ms, Type: compartment, MMU(20ms): 83%, MMU(50ms): 93%, Reason: TOO_MUCH_MALLOC, +chunks: 0, -chunks: 0
mark: 1.5, mark-roots: 1.1, mark-other: 0.0, sweep: 1.6, sweep-obj: 0.5, sweep-string: 0.0, sweep-script: 0.0, sweep-shape: 0.0, discard-code: 0.0, discard-analysis: 0.1, xpconnect: 0.6, deallocate: 0.0
GC(T+13.6) TotalTime: 2.7ms, Type: compartment, MMU(20ms): 86%, MMU(50ms): 94%, Reason: TOO_MUCH_MALLOC, +chunks: 0, -chunks: 0
mark: 1.2, mark-roots: 0.9, mark-other: 0.0, sweep: 1.3, sweep-obj: 0.4, sweep-string: 0.0, sweep-script: 0.0, sweep-shape: 0.0, discard-code: 0.0, discard-analysis: 0.1, xpconnect: 0.4, deallocate: 0.0
GC(T+14.5) TotalTime: 2.9ms, Type: compartment, MMU(20ms): 85%, MMU(50ms): 94%, Reason: TOO_MUCH_MALLOC, +chunks: 0, -chunks: 0
mark: 1.2, mark-roots: 0.9, mark-other: 0.0, sweep: 1.5, sweep-obj: 0.5, sweep-string: 0.0, sweep-script: 0.0, sweep-shape: 0.0, discard-code: 0.0, discard-analysis: 0.1, xpconnect: 0.5, deallocate: 0.0
Reporter | ||
Comment 18•13 years ago
|
||
Comment #17 is the Nightly nightly build.
http://hg.mozilla.org/mozilla-central/rev/d1b2fd680235
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120227 Firefox/13.0a1 ID:20120227031120
Assignee | ||
Comment 19•13 years ago
|
||
Oh, only compartment GC. That doesn't trigger CC.
Assignee | ||
Comment 20•13 years ago
|
||
Have we changed when full GC is triggered?
Updated•13 years ago
|
Whiteboard: [MemShrink]
Comment 21•13 years ago
|
||
Comment on attachment 600897 [details] [diff] [review]
patch
[Triage Comment]
Not clear this is absolutely necessary, but restores old behavior so approving for Aurora 12.
Attachment #600897 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Assignee | ||
Comment 22•13 years ago
|
||
Comment 23•13 years ago
|
||
Is it fixed in the trunk?
status-firefox12:
--- → affected
Target Milestone: --- → mozilla13
Assignee | ||
Comment 24•13 years ago
|
||
This depends on bug 730853. The patch fixes one issue.
Assignee | ||
Comment 25•13 years ago
|
||
Comment 26•13 years ago
|
||
With this patch (well, and my patch in bug 728460), I'm seeing about 80% of CCs being triggered by this force CC. It kind of makes the CC hostage to the GC if we want to try to call the CC less. Kind of a shame, but I think this patch is probably the way to go, because otherwise you'll hit situations like this that are problematic.
Updated•13 years ago
|
Whiteboard: [MemShrink] → [MemShrink:P2]
Comment 27•13 years ago
|
||
Olli: would it make sense to trigger a CC every 5 or 10 compartmental GCs?
Comment 28•13 years ago
|
||
This probably belongs in another bug, but another approach to getting the GC to trigger a CC would be to dump all wrapped natives (etc.) into the purple buffer at the conclusion of a GC. Then we could filter out everything held by a marked object using the normal methods. That would probably work for this particular case, where it is allocating a huge number of cross-compartment cycles.
Updated•13 years ago
|
Comment 29•13 years ago
|
||
Bug 730853 didn't land in 12.0 so it's not fully fixed.
Comment 30•13 years ago
|
||
(In reply to Scoobidiver from comment #29)
> Bug 730853 didn't land in 12.0 so it's not fully fixed.
Given the original risk evaluation that this would only occur in rare cases, untracking for 12 since we wouldn't take any more forward change for this.
Comment 31•13 years ago
|
||
I think this is finished, correct?
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•