Closed Bug 1245552 Opened 6 years ago Closed 5 years ago

crash in OOM | large | mozalloc_abort | mozalloc_handle_oom | moz_xmalloc | mozilla::gl::TexSubImage2DHelper


(Core :: Graphics, defect)

Not set



Tracking Status
firefox44 --- affected
firefox45 --- affected
firefox46 --- affected
firefox47 --- affected
firefox48 --- fixed
fennec 45+ ---


(Reporter: snorp, Assigned: sotaro)



(Keywords: crash)

Crash Data


(2 files, 4 obsolete files)

This bug was filed from the Socorro interface and is 
report bp-d7d008ec-af8e-4405-8086-924372160131.

Here is a OOM when we're trying to upload a giant (24MB in this case) texture. Probably a good place to look at for gfx OOM in general.
The allocation that seems to be OOMing is in TexSubImage2DWithoutUnpackSubimage, where we allocate and copy the entire texture. I guess the main question here is why do we have a 24MB texture in the first place? At upload time in this scenario we will require 3x that amount: once for original data, once for the copy here in TexSubImage2DWithoutUnpackSubimage, and presumably one more for the texture itself. That's a lot, though we will throw at least one of those copies away immediately.
Sotaro, can you see if there is a better way to deal with such large requests?
Assignee: nobody → sotaro.ikeda.g
tracking-fennec: ? → 45+
a testcase is created by modifying attachment 8584779 [details] of Bug 1148582. It created a very large mask layer.
MaskLayer is created by ContainerState::CreateMaskLayer().

MaskLayer data is stored as SourceSurfaceImage. SourceSurfaceImage::GetTextureClient() allocates duplicated memory as TextureClient. It seems better to avoid to allocate duplicated memory if possible.
Bug 1252405 is created for Comment 4.
(In reply to Sotaro Ikeda [:sotaro] from comment #7)

The patch seemed to cause some test failures.
Attachment #8726628 - Attachment is obsolete: true
Attachment #8727851 - Attachment is obsolete: true
Jeff recommended to allocate a mask as to aligned to 4 byte as a short term solution.
Attachment #8727866 - Attachment is obsolete: true
Add fuzz to tests.
Attachment #8728221 - Attachment is obsolete: true
Attachment #8730058 - Flags: review?(matt.woodrow)
Attachment #8730058 - Flags: review?(matt.woodrow) → review+
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
Depends on: 1289829
You need to log in before you can comment on or make changes to this bug.