Closed
Bug 873378
Opened 12 years ago
Closed 11 years ago
Crash Report [@ gfxImageSurface::CopyFrom(gfxImageSurface*) ]
Categories
(Core :: Graphics, defect)
Tracking
()
VERIFIED
FIXED
mozilla26
People
(Reporter: paul.feher, Assigned: BenWa)
References
()
Details
(Keywords: crash, reproducible, Whiteboard: [native-crash])
Crash Data
Attachments
(4 files, 4 obsolete files)
This bug was filed from the Socorro interface and is
report bp-f8c343c1-8e20-41c2-82cc-d079f2130517 .
=============================================================
Aurora 23.0a2 2013-05-16
LG Nexus 4 (Android 4.2.2)
Steps to reproduce:
1) Go to http://people.mozilla.com/~nhirata/html_tp/accel_bug615597.html
2) Rotate the device several times portrait/landscape
Crash stack:
0 libc.so libc.so@0x18688
1 libxul.so gfxImageSurface::CopyFrom gfx/thebes/gfxImageSurface.cpp:289
2 libxul.so gfxReusableSurfaceWrapper::GetWritable gfxReusableSurfaceWrapper.cpp:67
3 libxul.so mozilla::layers::TextureClientTile::LockImageSurface gfx/layers/client/TextureClient.cpp:217
4 libxul.so mozilla::layers::TextureClientTile::LockImageSurface gfx/layers/client/TextureClient.cpp:215
5 libxul.so mozilla::layers::BasicTiledLayerBuffer::ValidateTileInternal gfx/layers/client/TiledContentClient.cpp:213
6 libxul.so mozilla::FrameLayerBuilder::DrawThebesLayer layout/base/FrameLayerBuilder.cpp:3324
7 @0x6de10ffe
8 libxul.so nsRefPtr<mozilla::layers::ImageContainer>::assign_assuming_AddRef obj-firefox/dist/include/mozilla/mozalloc.h:225
9 libmozglue.so arena_dalloc jemalloc.c:4675
10 libxul.so nsRegion::SetToElements nsRegion.cpp:278
11 libxul.so nsRegion::Copy nsRegion.cpp:606
12 libxul.so nsRegion::And nsRegion.cpp:732
13 libxul.so mozilla::layers::BasicTiledLayerBuffer::ValidateTile gfx/layers/client/TiledContentClient.cpp:268
14 libxul.so nsRegion::SetToElements nsRegion.cpp:278
15 libxul.so mozilla::layers::TiledLayerBuffer<mozilla::layers::BasicTiledLayerBuffer, mozill gfx/layers/TiledLayerBuffer.h:416
Updated•12 years ago
|
status-firefox23:
--- → affected
Component: General → Graphics
Product: Firefox for Android → Core
Hardware: All → ARM
Whiteboard: [native-crash]
Version: Firefox 23 → 23 Branch
Updated•11 years ago
|
status-firefox21:
--- → affected
status-firefox22:
--- → affected
status-firefox24:
--- → affected
Version: 23 Branch → Trunk
Comment 2•11 years ago
|
||
100% reproducible visiting this URL in Nightly for Android (06/19)
http://kieranhealy.org/philcites/
--
LG Nexus 4 (Android 4.2.2)
HTC One (Android 4.1)
Keywords: reproducible
Comment 3•11 years ago
|
||
Since this is reproducible is this worth having an owner?
Flags: needinfo?(joe)
Updated•11 years ago
|
Flags: needinfo?(joe)
Comment 5•11 years ago
|
||
Let me make sure we have a device, then I'll reassign.
Assignee: nobody → milan
Flags: needinfo?(milan)
Comment 6•11 years ago
|
||
BenWa, can you take a look at this? I reproduced it on Nexus 4 Kats has using the Comment 2 STR.
Assignee: milan → bgirard
Assignee | ||
Comment 7•11 years ago
|
||
Just a quick update since it's been two weeks. I have an environment and I'm starting to work on this issue.
Assignee | ||
Comment 8•11 years ago
|
||
(In reply to Aaron Train [:aaronmt] from comment #2)
> 100% reproducible visiting this URL in Nightly for Android (06/19)
>
> http://kieranhealy.org/philcites/
>
> --
> LG Nexus 4 (Android 4.2.2)
> HTC One (Android 4.1)
I'm seeing a crash with this spammed:
W/Adreno200-GSL(21135): <sharedmem_gpumem_alloc:991>: sharedmem_gpumem_alloc: mmap failed errno 12 Out of memory
Looks like I'll have to debug that first.
Assignee | ||
Comment 9•11 years ago
|
||
Some progress on the real bug now that Comment 8 went away for now.
It seems like the write lock is set on all the tiles. It's most likely not reset correctly because we should only be locking one tile at a time. This forces us to copy the entire screen leading to an allocation failing and SIGSEGV.
Assignee | ||
Comment 10•11 years ago
|
||
Alright my previous guess was wrong. The problem is that we allocate 200 layers of size 512^2 which is about 200MB so we OOM.
I think we need to have a cap on our layers after which we just flatten everything.
Assignee | ||
Comment 11•11 years ago
|
||
I'll be testing this out tomorrow
Assignee | ||
Updated•11 years ago
|
Attachment #775436 -
Flags: review?(matt.woodrow)
Assignee | ||
Comment 12•11 years ago
|
||
Attachment #775436 -
Attachment is obsolete: true
Attachment #775436 -
Flags: review?(matt.woodrow)
Attachment #775711 -
Flags: review?(matt.woodrow)
Assignee | ||
Comment 13•11 years ago
|
||
Comment on attachment 775711 [details] [diff] [review]
Enforce a max of 20 layers on mobile
Asking roc instead to review this to get another opinion.
Attachment #775711 -
Flags: review?(matt.woodrow) → review?(roc)
Comment on attachment 775711 [details] [diff] [review]
Enforce a max of 20 layers on mobile
Review of attachment 775711 [details] [diff] [review]:
-----------------------------------------------------------------
This is actually restricting the maximum number of active, non-static-content child layers any layer can have. That's fine, but you should document that more carefully. Also this pref should be add explicitly to all.js with the value -1, and its behavior documented in a comment there.
Attachment #775711 -
Flags: review?(roc) → review+
Assignee | ||
Comment 15•11 years ago
|
||
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #14)
> Comment on attachment 775711 [details] [diff] [review]
> Enforce a max of 20 layers on mobile
>
> Review of attachment 775711 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> This is actually restricting the maximum number of active,
> non-static-content child layers any layer can have.
Ohh right, matt pointed that out but I forgot to fix it. Either will fix this bug but I imagine a global max-layer per tree is simpler to understand and more useful to have. I'll change it to that unless you object.
I actually think your current behavior is better and easier to understand.
Assignee | ||
Comment 17•11 years ago
|
||
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #16)
> I actually think your current behavior is better and easier to understand.
It's not what I'd expect when setting layers.max-active and I think we can miss cases where do you want to restrict the layer count. But I'm fine with landing this patch and changing this later as needed.
Assignee | ||
Comment 18•11 years ago
|
||
Added pref to all.js
Attachment #775711 -
Attachment is obsolete: true
Attachment #776656 -
Flags: review+
Assignee | ||
Comment 19•11 years ago
|
||
Tree is closed.
Attachment #776656 -
Attachment is obsolete: true
Attachment #777947 -
Flags: review+
Attachment #777947 -
Flags: checkin?
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Updated•11 years ago
|
Attachment #777947 -
Flags: checkin? → checkin+
Comment 20•11 years ago
|
||
Keywords: checkin-needed
Assignee | ||
Comment 21•11 years ago
|
||
Bustage fix for unexpected tests:
https://hg.mozilla.org/integration/mozilla-inbound/rev/5efda3c30be3
I didn't push to try because I didn't think we really had tests with 20 layers. We should consider forcing the page to render in a single thebes and seeing which tests pass/fail unexpectedly.
Comment 22•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/4c89002460da
https://hg.mozilla.org/mozilla-central/rev/5efda3c30be3
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
Comment 23•11 years ago
|
||
+/* static */ int32_t
+nsDisplayItem::MaxActiveLayers()
+{
+ static int32_t sMaxLayers = false;
+ static bool sMaxLayersCached = false;
+
+ if (!sMaxLayersCached) {
+ Preferences::AddIntVarCache(&sMaxLayers, "layers.max-active", -1);
+ sMaxLayersCached = true;
+ }
+
+ return sMaxLayersCached;
+}
^^^^^^ !!
This effectively returns 1 every time.
Assignee | ||
Comment 24•11 years ago
|
||
AAhh thanks! I knew it was something silly about this pref not working causing these regressions.
Comment 25•11 years ago
|
||
Once it did start returning 20 on mobile, it started failing reftest-2:
https://tbpl.mozilla.org/php/getParsedLog.php?id=25623153&tree=Mozilla-Inbound, possibly because of the filtering at the edges. The test and the reference result end up with different layers tree and I'm guessing that's where the differences come from. Maybe - it would explain why 1 worked, and 20 does not (with 1, the layer trees are the same), but the trees are also different with the old code, yet the test passed. Perhaps something changed in the layerization algorithm during the three days we had this code in?
Flags: needinfo?(bgirard)
Comment 26•11 years ago
|
||
Milan, do you have those layer tree dumps handy?
In particular being able to compare the one with a 20 limit, vs no-limit would be useful.
Assignee | ||
Comment 27•11 years ago
|
||
we likely want to blackout my bustage fix which was incorrect.
(In reply to Benoit Girard (:BenWa) from comment #21)
> Bustage fix for unexpected tests:
> https://hg.mozilla.org/integration/mozilla-inbound/rev/5efda3c30be3
Flags: needinfo?(bgirard)
Comment 28•11 years ago
|
||
This changeset causes bug 897239 (crash when trying to open bluetooth or wifi in FirefoxOS settings app).
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 29•11 years ago
|
||
Comment on attachment 777947 [details] [diff] [review]
patch - ready to land. r=roc
Review of attachment 777947 [details] [diff] [review]:
-----------------------------------------------------------------
::: layout/base/nsDisplayList.cpp
@@ +1507,5 @@
> + Preferences::AddIntVarCache(&sMaxLayers, "layers.max-active", -1);
> + sMaxLayersCached = true;
> + }
> +
> + return sMaxLayersCached;
Shouldn't this be sMaxLayers ?
Comment 30•11 years ago
|
||
Right - see bug 896250 that fixed that. There are regressions in Android tests with the "proper" fix though, so that got backed out.
with the layer limit set to 1: https://tbpl.mozilla.org/?tree=Try&rev=32105e7ca6ee
with the layer limit set to -1: https://tbpl.mozilla.org/?tree=Try&rev=6e0879b39110
I believe we get the same result with the layer limit set to 20, but I don't have a try run for that.
It's just that we never actually tested this fix, because of the typo, we were setting the layer limit to 1, rather than 20.
Comment 31•11 years ago
|
||
(In reply to Matt Woodrow (:mattwoodrow) from comment #26)
> Milan, do you have those layer tree dumps handy?
>
> In particular being able to compare the one with a 20 limit, vs no-limit
> would be useful.
Not handy, and I'm in two days of training/meetings so it will be a couple of days before I get them back. I do have a few images, I will attach those.
Comment 32•11 years ago
|
||
Comment 33•11 years ago
|
||
Comment 34•11 years ago
|
||
Comment 35•11 years ago
|
||
I landed a patch to fix MaxActiveLayers in bug 897239 so I'll reclose this bug.
Status: REOPENED → RESOLVED
Closed: 11 years ago → 11 years ago
Resolution: --- → FIXED
Comment 36•11 years ago
|
||
Can we revert this patchset?
Its screwing up windows and b2g.
Comment 37•11 years ago
|
||
I'm sorry, I backed this out for causing bug 897239 and the other regressions.
https://hg.mozilla.org/integration/mozilla-inbound/rev/d0a9de949678
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 38•11 years ago
|
||
Looks like this backout is causing Android reftest orange, because we didn't yet back out the other cset from this bug, from comment 21.
Comment 39•11 years ago
|
||
I backed out comment 21, so now this should be "fully backed out" (conceptually), and the long stream of R2 orange should now turn green:
https://hg.mozilla.org/integration/mozilla-inbound/rev/de06fec529a5
Comment 40•11 years ago
|
||
Looks like the backout of this is causing the same kinds of asserts we were getting the last time bug 896250 attempted to land. Inbound's closed until this is resolved.
I filed bug 898713 to track fixing the orange resulting from this backout.
It seems like any relanding of this should include, at minimum:
https://hg.mozilla.org/mozilla-central/rev/4c89002460da
https://hg.mozilla.org/mozilla-central/rev/da5fa63e90cb
though I'm not confident that the second covers all the regressions from the first.
(I'd expect it to *not* need to include https://hg.mozilla.org/mozilla-central/rev/5efda3c30be3 .)
Assignee | ||
Comment 43•11 years ago
|
||
Thanks for the help on this bug. I spent the weekend trapped in an airports moving from flight to flight. It took 24 hours for American airlines to get me from LAX to YYZ from an initially direct flight.
Assignee | ||
Comment 44•11 years ago
|
||
Attachment #777947 -
Attachment is obsolete: true
Attachment #784638 -
Flags: review+
Comment 45•11 years ago
|
||
We managed to hit the asserts from bug 898713 that were keeping the tree closed today after pushing bug 777196 to b2g-inbound. I'll point out that it was green on Try. Just as with bug 887868, it seems unlikely to have directly been at fault. Any idea what underlying issue is happening here?
https://tbpl.mozilla.org/php/getParsedLog.php?id=26032309&tree=B2g-Inbound
https://tbpl.mozilla.org/php/getParsedLog.php?id=26032281&tree=B2g-Inbound
Updated•11 years ago
|
status-firefox25:
--- → affected
Assignee | ||
Comment 46•11 years ago
|
||
(In reply to Ryan VanderMeulen [:RyanVM UTC-4] from comment #45)
> We managed to hit the asserts from bug 898713 that were keeping the tree
> closed today after pushing bug 777196 to b2g-inbound. I'll point out that it
> was green on Try. Just as with bug 887868, it seems unlikely to have
> directly been at fault. Any idea what underlying issue is happening here?
>
> https://tbpl.mozilla.org/php/getParsedLog.php?id=26032309&tree=B2g-Inbound
> https://tbpl.mozilla.org/php/getParsedLog.php?id=26032281&tree=B2g-Inbound
I don't know what the problem is but it looks like we have a bug that isn't triggered right now but changing the code sufficiently will trigger it which is at least what this patch did. This should be investigated in a new bug.
Assignee | ||
Comment 47•11 years ago
|
||
Comment 48•11 years ago
|
||
Status: REOPENED → RESOLVED
Closed: 11 years ago → 11 years ago
Resolution: --- → FIXED
Target Milestone: mozilla25 → mozilla26
Updated•11 years ago
|
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•