Closed Bug 1695379 Opened 3 years ago Closed 3 years ago

WebRender ANGLE Crash in [@ OOM | large | mozalloc_abort | moz_xmalloc | std::vector<T>::_Emplace_reallocate<T>]

Categories

(Core :: Graphics: WebRender, defect, P3)

x86
Windows
defect

Tracking

()

RESOLVED FIXED
90 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox87 --- wontfix
firefox88 --- wontfix
firefox89 --- wontfix
firefox90 --- fixed

People

(Reporter: cpeterson, Assigned: sotaro)

References

(Depends on 1 open bug)

Details

(Keywords: crash)

Crash Data

Crash report: https://crash-stats.mozilla.org/report/index/8221ac78-fb02-405f-8dc5-8351a0210227

I hit this WebRender ANGLE OOM crash three times today in 32-bit Firefox build on 64-bit Windows 10.

MOZ_CRASH Reason: MOZ_CRASH()

Top 10 frames of crashing thread:

0 mozglue.dll mozalloc_abort memory/mozalloc/mozalloc_abort.cpp:33
1 mozglue.dll mozalloc_handle_oom memory/mozalloc/mozalloc_oom.cpp:51
2 mozglue.dll moz_xmalloc memory/mozalloc/mozalloc.cpp:54
3 libglesv2.dll std::vector<gl::ProgramVaryingRef, std::allocator<gl::ProgramVaryingRef> >::_Emplace_reallocate<gl::ProgramVaryingRef> vs2017_15.8.4/VC/include/vector:956
4 libglesv2.dll gl::Program::loadBinary gfx/angle/checkout/src/libANGLE/Program.cpp:1920
5 libglesv2.dll gl::Context::programBinary gfx/angle/checkout/src/libANGLE/Context.cpp:6941
6 libglesv2.dll gl::ProgramBinary gfx/angle/checkout/src/libGLESv2/entry_points_gles_3_0_autogen.cpp:1940
7 xul.dll gleam::gl::{{impl}}::program_binary third_party/rust/gleam/src/gles_fns.rs:1702
8 xul.dll webrender::device::gl::Device::create_program gfx/wr/webrender/src/device/gl.rs:2972
9 xul.dll webrender::renderer::shade::LazilyCompiledShader::get_internal gfx/wr/webrender/src/renderer/shade.rs:201

This was caused by a 1.63 GB allocation, which doesn't seem sane.

Blocks: gfx-triage

Hey, can you reproduce this and if so, on what site?

Flags: needinfo?(cpeterson)

Can you get a full stack from a debugger? It's difficult to tell what's actually going on here from the crash stack.

Depends on: 1636194

(In reply to Jim Mathies [:jimm] from comment #2)

Hey, can you reproduce this and if so, on what site?

(In reply to Jeff Muizelaar [:jrmuizel] from comment #3)

Can you get a full stack from a debugger? It's difficult to tell what's actually going on here from the crash stack.

I haven't seen this crash since I reported it on 2021-02-26. I don't know what site might have triggered it. My crash reports didn't have URLs because they were from the gpu process. But I always have a dozen Google Docs and Sheets tabs open, so that might be related.

Flags: needinfo?(cpeterson)

I'll improve the signature and take a look at a minidump.

Flags: needinfo?(jmuizelaar)

This crash is happening here:
https://searchfox.org/mozilla-central/rev/166dfa51ee50207a253fc577b9a596e64f24258c/gfx/angle/checkout/src/libANGLE/Program.cpp#5391

It seems like we must be reading a very large uniformIndexCount out of the stream and that's causing us to OOM.

Flags: needinfo?(jmuizelaar)

(In reply to Jeff Muizelaar [:jrmuizel] from comment #6)

This crash is happening here:
https://searchfox.org/mozilla-central/rev/166dfa51ee50207a253fc577b9a596e64f24258c/gfx/angle/checkout/src/libANGLE/Program.cpp#5391

It seems like we must be reading a very large uniformIndexCount out of the stream and that's causing us to OOM.

This seems exploitable since streams can be manipulated. Should we put a sensible cap here on uniformIndexCount -- in addition to fixing the bug?

The streams are not exposed to webcontent. We create them, store them to disk and load them.

Flags: needinfo?(jmuizelaar)
Depends on: 1704010
Flags: needinfo?(jmuizelaar)
No longer depends on: 1704010
Depends on: 1704010
Severity: -- → S3
Priority: -- → P3

Bug 1707471 looks similar problem.

See Also: → 1707471
Crash Signature: [@ OOM | large | mozalloc_abort | moz_xmalloc | std::vector<T>::_Emplace_reallocate<T>] → [@ OOM | large | mozalloc_abort | moz_xmalloc | std::vector<T>::_Emplace_reallocate<T>] [@ OOM | large | mozalloc_abort | moz_xmalloc | std::vector<T>::_Emplace_reallocate<T> | gl::Program::loadBinary]
Depends on: 1707814
Status: NEW → RESOLVED
Crash Signature: [@ OOM | large | mozalloc_abort | moz_xmalloc | std::vector<T>::_Emplace_reallocate<T>] [@ OOM | large | mozalloc_abort | moz_xmalloc | std::vector<T>::_Emplace_reallocate<T> | gl::Program::loadBinary] → [@ OOM | large | mozalloc_abort | moz_xmalloc | std::vector<T>::_Emplace_reallocate<T>] [@ OOM | large | mozalloc_abort | moz_xmalloc | std::vector<T>::_Emplace_reallocate<T> | gl::Program::loadBinary]
Closed: 3 years ago
Resolution: --- → FIXED
Assignee: nobody → sotaro.ikeda.g
Target Milestone: --- → 90 Branch
No longer blocks: gfx-triage
You need to log in before you can comment on or make changes to this bug.