Closed Bug 1688999 Opened 4 years ago Closed 3 years ago

Crash in [@ mozalloc_abort | std::string::string | mozilla::gl::GLContext::InitImpl]

Categories

(Core :: Graphics, defect, P1)

Desktop
Linux
defect

Tracking

()

RESOLVED FIXED
87 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox-esr91 --- wontfix
firefox96 --- wontfix
firefox97 --- fixed
firefox98 --- fixed

People

(Reporter: aosmond, Assigned: aosmond)

References

(Regression)

Details

(Keywords: crash, regression)

Crash Data

Attachments

(1 file)

Crash report: https://crash-stats.mozilla.org/report/index/293f220a-f8d6-47c2-86f6-5064e0210126

MOZ_CRASH Reason: MOZ_CRASH()

Top 10 frames of crashing thread:

0 firefox-bin mozalloc_abort memory/mozalloc/mozalloc_abort.cpp:33
1 libxul.so std::string::string /builds/worker/fetches/clang/include/c++/7.4.0/bits/basic_string.tcc:664
2 libxul.so mozilla::gl::GLContext::InitImpl gfx/gl/GLContext.cpp:541
3 libxul.so mozilla::gl::GLContext::Init gfx/gl/GLContext.cpp:321
4 libxul.so mozilla::gl::GLContextEGL::Init gfx/gl/GLContextProviderEGL.cpp:435
5 libxul.so mozilla::gl::GLContextEGL::CreateGLContext gfx/gl/GLContextProviderEGL.cpp:784
6 libxul.so mozilla::gl::GLContextEGL::CreateEGLPBufferOffscreenContextImpl gfx/gl/GLContextProviderEGL.cpp:1192
7 libxul.so mozilla::gl::GLContextEGL::CreateEGLPBufferOffscreenContext gfx/gl/GLContextProviderEGL.cpp:1213
8 libxul.so mozilla::gl::GLContextProviderEGL::CreateHeadless gfx/gl/GLContextProviderEGL.cpp:1227
9 libxul.so mozilla::WebGLContext::CreateAndInitGL dom/canvas/WebGLContext.cpp:367

Fixed by backout of bug 1688668.

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 87 Branch
Status: RESOLVED → REOPENED
Resolution: FIXED → ---

It appears fGetString(LOCAL_GL_VERSION) can return a nullptr on Linux.
This causes a crash when we try to assign it to an std::string. This
appears to happen predominantly llvmpipe users (although generally that
should return a GL verison string as well). This patch ensures we
gracefully fail to init GL instead.

Crash Signature: [@ mozalloc_abort | std::string::string] [@ libGL.so.1@0xd6769] → [@ mozalloc_abort | std::string::string] [@ mozalloc_abort | mozilla::gl::GLContext::InitImpl ] [@ libGL.so.1@0xd6769]
Summary: Crash in [@ mozalloc_abort | std::string::string] → Crash in [@ mozalloc_abort | std::string::string | mozilla::gl::GLContext::InitImpl]
Pushed by aosmond@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ed2285c6cf09 Fix crash with null GL_VERSION string on Linux. r=jgilbert
Status: REOPENED → RESOLVED
Closed: 4 years ago3 years ago
Resolution: --- → FIXED
Has Regression Range: --- → yes

The patch landed in nightly and beta is affected.
:aosmond, is this bug important enough to require an uplift?
If not please set status_beta to wontfix.

For more information, please visit auto_nag documentation.

Flags: needinfo?(aosmond)

Comment on attachment 9259798 [details]
Bug 1688999 - Fix crash with null GL_VERSION string on Linux.

Beta/Release Uplift Approval Request

  • User impact if declined: Low volume of crashes on Linux.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): This patch just adds a check for a null pointer and disables GL if so, trivial patch. It is often a startup crash in the parent process so it can't get much worse.
  • String changes made/needed:
Flags: needinfo?(aosmond)
Attachment #9259798 - Flags: approval-mozilla-beta?

Comment on attachment 9259798 [details]
Bug 1688999 - Fix crash with null GL_VERSION string on Linux.

Approved for 97.0b8.

Attachment #9259798 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: