Closed Bug 948406 Opened 11 years ago Closed 11 years ago

Intermittent TEST-UNEXPECTED-FAIL | tests/content/canvas/test/reftest/webgl-orientation-test.html?readback&__&_____&preserve | application timed out after 330 seconds with no output | application crashed [@ eglCreatePbufferSurface]

Categories

(Core :: Graphics: CanvasWebGL, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla29
Tracking Status
firefox27 --- fixed
firefox28 --- fixed
firefox29 --- fixed
firefox-esr24 --- unaffected
b2g-v1.2 --- fixed
b2g-v1.3 --- fixed

People

(Reporter: cbook, Assigned: bjacob)

References

()

Details

(Keywords: crash, intermittent-failure)

Attachments

(1 file)

b2g_emulator b2g-inbound opt test reftest-5 on 2013-12-10 00:46:42 PST for push ceb5d3eb31f3

slave: talos-r3-fed-039

https://tbpl.mozilla.org/php/getParsedLog.php?id=31735287&tree=B2g-Inbound

TEST-UNEXPECTED-FAIL | http://10.0.2.2:8888/tests/content/canvas/test/reftest/webgl-orientation-test.html?readback&__&_____&preserve | application timed out after 330 seconds with no output
PROCESS-CRASH | http://10.0.2.2:8888/tests/content/canvas/test/reftest/webgl-orientation-test.html?readback&__&_____&preserve | application crashed [@ eglCreatePbufferSurface]
Return code: 1

01:27:43  WARNING -  PROCESS-CRASH | http://10.0.2.2:8888/tests/content/canvas/test/reftest/webgl-orientation-test.html?readback&__&_____&preserve | application crashed [@ eglCreatePbufferSurface]
01:27:43     INFO -  Crash dump filename: /tmp/tmpbMCNP0/18de125d-20f8-1591-4ef94e61-3ec402cf.dmp
01:27:43     INFO -  Operating system: Android
01:27:43     INFO -                    0.0.0 Linux 2.6.29-00297-ge2ba18d #4 Tue Sep 24 09:35:47 UTC 2013 armv7l Android/full/generic:4.0.4.0.4.0.4/OPENMASTER/eng.cltbld.20131210.021458:eng/test-keys
01:27:43     INFO -  CPU: arm
01:27:43     INFO -       0 CPUs
01:27:43     INFO -  Crash reason:  SIGSEGV
01:27:43     INFO -  Crash address: 0x44300000
01:27:43     INFO -  Thread 0 (crashed)
01:27:43     INFO -   0  libEGL_emulation.so!eglCreatePbufferSurface [egl.cpp : 655 + 0x0]
01:27:43     INFO -       r4 = 0x44300000    r5 = 0x00000000    r6 = 0x0000305c    r7 = 0x0000305c
01:27:43     INFO -       r8 = 0x00000010    r9 = 0x00000010   r10 = 0x00003057    fp = 0xbef91a8c
01:27:43     INFO -       sp = 0xbef919f8    lr = 0x40060174    pc = 0x47acce0e
01:27:43     INFO -      Found by: given as instruction pointer in context
01:27:43     INFO -   1  libEGL.so!eglCreatePbufferSurface [eglApi.cpp : 426 + 0xf]
01:27:43     INFO -       r4 = 0x442fffb8    r5 = 0x00000000    r6 = 0x4036bd10    r7 = 0x00000000
01:27:43     INFO -       r8 = 0x00000000    r9 = 0x00000001   r10 = 0x00003057    fp = 0xbef91a8c
01:27:43     INFO -       sp = 0xbef91a30    pc = 0x40353713
01:27:43     INFO -      Found by: call frame info
01:27:43     INFO -   2  libxul.so!mozilla::gl::GLContextEGL::CreateEGLPBufferOffscreenContext(nsIntSize const&) [GLLibraryEGL.h:ceb5d3eb31f3 : 203 + 0x11]
01:27:43     INFO -       r4 = 0x42300988    r5 = 0xffffa55c    r6 = 0xbef91a98    r7 = 0xbef91a84
01:27:43     INFO -       r8 = 0x00000000    r9 = 0xffffa55c   r10 = 0x00003057    fp = 0xbef91a8c
01:27:43     INFO -       sp = 0xbef91a68    pc = 0x40ed3d0d
01:27:43     INFO -      Found by: call frame info
01:27:43     INFO -   3  libxul.so!mozilla::gl::GLContextProviderEGL::CreateOffscreen(nsIntSize const&, mozilla::gfx::SurfaceCaps const&, mozilla::gl::ContextFlags) [GLContextProviderEGL.cpp:ceb5d3eb31f3 : 888 + 0x3]
01:27:43     INFO -       r4 = 0x00000001    r5 = 0xbef91b24    r6 = 0x00000100    r7 = 0xbef91b10
01:27:43     INFO -       r8 = 0x00000001    r9 = 0x00000000   r10 = 0x00000000    fp = 0x4362bbb0
01:27:43     INFO -       sp = 0xbef91ad0    pc = 0x40ed3e2f
01:27:43     INFO -      Found by: call frame info
01:27:43     INFO -   4  libxul.so!mozilla::WebGLContext::SetDimensions(int, int) [WebGLContext.cpp:ceb5d3eb31f3 : 554 + 0x7]
01:27:43     INFO -       r4 = 0x46bda6e0    r5 = 0x00000100    r6 = 0x00000100    r7 = 0x00000000
01:27:43     INFO -       r8 = 0x00000001    r9 = 0x00000000   r10 = 0x00000000    fp = 0x4362bbb0
01:27:43     INFO -       sp = 0xbef91b08    pc = 0x41361aa1
01:27:43     INFO -      Found by: call frame info
01:27:43     INFO -   5  libxul.so!mozilla::dom::HTMLCanvasElement::UpdateContext(JSContext*, JS::Handle<JS::Value>) [HTMLCanvasElement.cpp:ceb5d3eb31f3 : 802 + 0x9]
01:27:43     INFO -       r4 = 0x4521f400    r5 = 0x00000000    r6 = 0x00000000    r7 = 0x00000000
01:27:43     INFO -       r8 = 0xbef91cb0    r9 = 0xbef91cb0   r10 = 0x4232d868    fp = 0x4222c218
01:27:43     INFO -       sp = 0xbef91b70    pc = 0x4139ae67
01:27:43     INFO -      Found by: call frame info
01:27:43     INFO -   6  libxul.so!mozilla::dom::HTMLCanvasElement::GetContext(JSContext*, nsAString_internal const&, JS::Handle<JS::Value>, mozilla::ErrorResult&) [HTMLCanvasElement.cpp:ceb5d3eb31f3 : 714 + 0x9]
In above stack, frame 1 is:

http://androidxref.com/4.0.4/xref/frameworks/base/opengl/libs/EGL/eglApi.cpp#426

frame 0 is:

http://androidxref.com/4.0.4/xref/development/tools/emulator/opengl/system/egl/egl.cpp#655

We're crashing in EGL while processing the attribs list passed to eglCreatePBufferSurface. Maybe there's something wrong in the attrib list we passed...
Got it --- see in http://androidxref.com/4.0.4/xref/development/tools/emulator/opengl/system/egl/egl.cpp#655 how the while() loop iterates until it finds a zero value in the attribs list. That's wrong. It should be iterating until it finds the value EGL_NONE in the list, and EGL_NONE is 0x3038.

The work-around is going to be to append some zero values at the end of the attribs list. One is not enough: the list is typically read two values at a time. Let's append 3 zeros, so with the first one ignored as the argument following EGL_NONE, there will follow a (0, 0) pair.
See above comments.
Attachment #8347348 - Flags: review?(vladimir)
Btw the bug still exists in KitKat... we should file a bug against android's emulator.
Attachment #8347348 - Attachment is patch: true
https://hg.mozilla.org/integration/mozilla-inbound/rev/ac58cfd40672
Assignee: nobody → bjacob
Target Milestone: --- → mozilla29
https://hg.mozilla.org/mozilla-central/rev/ac58cfd40672
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Looks like this worked, thanks! Can you please nominate it for uplift to Aurora/Beta/b2g26? :)
Flags: needinfo?(bjacob)
Comment on attachment 8347348 [details] [diff] [review]
safe-egl-attribs-termination

[Approval Request Comment]
Bug caused by (feature/regressing bug #): Not a regression. Not even _our_ bug. Instead, we were running into a bug in the Android/B2G emulator, which we only use to run B2G tests.
User impact if declined: Intermittent orange on B2G emulator. RyanVM can comment on frequency.
Testing completed (on m-c, etc.): m-c for a few days
Risk to taking this patch (and alternatives if risky): Low, but not zero. The patch is about 10 lines of code. Arrays are involved.
String or IDL/UUID changes made by this patch: none
Attachment #8347348 - Flags: approval-mozilla-beta?
Attachment #8347348 - Flags: approval-mozilla-b2g26?
Attachment #8347348 - Flags: approval-mozilla-aurora?
Flags: needinfo?(bjacob)
Attachment #8347348 - Flags: approval-mozilla-beta?
Attachment #8347348 - Flags: approval-mozilla-beta+
Attachment #8347348 - Flags: approval-mozilla-b2g26?
Attachment #8347348 - Flags: approval-mozilla-b2g26+
Attachment #8347348 - Flags: approval-mozilla-aurora?
Attachment #8347348 - Flags: approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: