Assertion failure: (uint32_t)(size.width * 4) == stride, followed by crash [@ mozilla::layers::WebRenderBridgeParent::RecvGetSnapshot(mozilla::layers::PTextureParent*, bool*)]
Categories
(Core :: Graphics: WebRender, defect)
Tracking
()
People
(Reporter: intermittent-bug-filer, Unassigned)
References
Details
(Keywords: assertion, crash)
Crash Data
Filed by: kgupta [at] mozilla.com
Parsed log: https://treeherder.mozilla.org//logviewer?job_id=320053127&repo=try
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/crhw06qdRQyCpwQzd63lKg/runs/0/artifacts/public/logs/live_backing.log
This happens on WR-enabled macOS marionette test jobs.```
Updated•4 years ago
|
Comment 1•4 years ago
|
||
I tried reproducing locally on macOS with ./mach marionette-test --enable-webrender testing/marionette/harness/marionette_harness/tests/unit/test_reftest.py
but couldn't. Not sure what the problem is.
Comment 2•4 years ago
|
||
Note that this assertion is followed by a crash:
[task 2020-10-28T19:51:14.949Z] 19:51:14 INFO - PROCESS-CRASH | testing/marionette/harness/marionette_harness/tests/unit/test_reftest.py TestReftest.test_cache_multiple_sizes | application crashed [@ mozilla::layers::WebRenderBridgeParent::RecvGetSnapshot(mozilla::layers::PTextureParent*, bool*)]
[task 2020-10-28T19:51:14.950Z] 19:51:14 INFO - Mozilla crash reason: MOZ_ASSERT((uint32_t)(size.width * 4) == stride)
[task 2020-10-28T19:51:14.950Z] 19:51:14 INFO - Crash dump filename: /var/folders/fw/v1q75lw905b1rqs7t641tt88000017/T/tmpFVbFbt.mozrunner/minidumps/586CCDE1-34A2-4E44-B0B1-2A3D7CF0BB0C.dmp
[task 2020-10-28T19:51:14.950Z] 19:51:14 INFO - Operating system: Mac OS X
[task 2020-10-28T19:51:14.950Z] 19:51:14 INFO - 10.14.5 18F132
[task 2020-10-28T19:51:14.950Z] 19:51:14 INFO - CPU: amd64
[task 2020-10-28T19:51:14.950Z] 19:51:14 INFO - family 6 model 69 stepping 1
[task 2020-10-28T19:51:14.950Z] 19:51:14 INFO - 4 CPUs
[task 2020-10-28T19:51:14.950Z] 19:51:14 INFO -
[task 2020-10-28T19:51:14.950Z] 19:51:14 INFO - GPU: UNKNOWN
[task 2020-10-28T19:51:14.950Z] 19:51:14 INFO -
[task 2020-10-28T19:51:14.950Z] 19:51:14 INFO - Crash reason: EXC_BAD_ACCESS / KERN_INVALID_ADDRESS
[task 2020-10-28T19:51:14.951Z] 19:51:14 INFO - Crash address: 0x0
[task 2020-10-28T19:51:14.951Z] 19:51:14 INFO - Process uptime: 7 seconds
[task 2020-10-28T19:51:14.951Z] 19:51:14 INFO -
[task 2020-10-28T19:51:14.951Z] 19:51:14 INFO - Thread 28 (crashed)
[task 2020-10-28T19:51:14.951Z] 19:51:14 INFO - 0 XUL!mozilla::layers::WebRenderBridgeParent::RecvGetSnapshot(mozilla::layers::PTextureParent*, bool*) [WebRenderBridgeParent.cpp:11ca8e035f57725a0fc142ce856bd7bd0cc5df44 : 1609 + 0x29]
[task 2020-10-28T19:51:14.951Z] 19:51:14 INFO - rax = 0x000000011c521883 rdx = 0x0000000000000000
[task 2020-10-28T19:51:14.951Z] 19:51:14 INFO - rcx = 0x000000010737a3c0 rbx = 0x000002bc000002bc
[task 2020-10-28T19:51:14.951Z] 19:51:14 INFO - rsi = 0x00000000000120a8 rdi = 0x00007fff932d5028
[task 2020-10-28T19:51:14.951Z] 19:51:14 INFO - rbp = 0x000070000b34d810 rsp = 0x000070000b34d790
[task 2020-10-28T19:51:14.951Z] 19:51:14 INFO - r8 = 0x00000000000130a8 r9 = 0x00007fff932d5048
[task 2020-10-28T19:51:14.951Z] 19:51:14 INFO - r10 = 0x0000000000000000 r11 = 0x00007fff932d5040
[task 2020-10-28T19:51:14.951Z] 19:51:14 INFO - r12 = 0x00000001292c5e00 r13 = 0x0000000125752400
[task 2020-10-28T19:51:14.951Z] 19:51:14 INFO - r14 = 0x000000012be00000 r15 = 0x000070000b34d850
[task 2020-10-28T19:51:14.951Z] 19:51:14 INFO - rip = 0x0000000113ac7def
[task 2020-10-28T19:51:14.951Z] 19:51:14 INFO - Found by: given as instruction pointer in context
[task 2020-10-28T19:51:14.952Z] 19:51:14 INFO - 1 XUL!mozilla::layers::PWebRenderBridgeParent::OnMessageReceived(IPC::Message const&, IPC::Message*&) [PWebRenderBridgeParent.cpp: : 990 + 0x1a]
[task 2020-10-28T19:51:14.952Z] 19:51:14 INFO - rbp = 0x000070000b34d900 rsp = 0x000070000b34d820
[task 2020-10-28T19:51:14.952Z] 19:51:14 INFO - rip = 0x00000001134fc6a1
[task 2020-10-28T19:51:14.952Z] 19:51:14 INFO - Found by: previous frame's frame pointer
[task 2020-10-28T19:51:14.952Z] 19:51:14 INFO - 2 XUL!mozilla::layers::PCompositorManagerParent::OnMessageReceived(IPC::Message const&, IPC::Message*&) [PCompositorManagerParent.cpp: : 496 + 0x10]
[task 2020-10-28T19:51:14.952Z] 19:51:14 INFO - rbp = 0x000070000b34d960 rsp = 0x000070000b34d910
[task 2020-10-28T19:51:14.952Z] 19:51:14 INFO - rip = 0x00000001131fb971
[task 2020-10-28T19:51:14.952Z] 19:51:14 INFO - Found by: previous frame's frame pointer
[task 2020-10-28T19:51:14.952Z] 19:51:14 INFO - 3 XUL!mozilla::ipc::MessageChannel::DispatchSyncMessage(mozilla::ipc::ActorLifecycleProxy*, IPC::Message const&, IPC::Message*&) [MessageChannel.cpp:11ca8e035f57725a0fc142ce856bd7bd0cc5df44 : 2119 + 0x15]
[task 2020-10-28T19:51:14.952Z] 19:51:14 INFO - rbp = 0x000070000b34d9f0 rsp = 0x000070000b34d970
[task 2020-10-28T19:51:14.952Z] 19:51:14 INFO - rip = 0x000000011313b831
[task 2020-10-28T19:51:14.952Z] 19:51:14 INFO - Found by: previous frame's frame pointer
As it can be seen it fails when creating a screen capture in mozilla::layers::WebRenderBridgeParent::RecvGetSnapshot
.
Updated•4 years ago
|
Comment 3•4 years ago
|
||
It looks like we intentionally use an aligned stride on OSX - https://searchfox.org/mozilla-central/source/gfx/layers/ImageDataSerializer.cpp#27
With RGBDescriptor we just compute the stride on demand, and don't pass it around, and trust that it always computes that same value in every process.
I think there's two possible ways we could fix this:
-
Make WebRender readback take the stride as an input, and make readback handle that (or readback into a temporary and then memcpy into the final buffer if we can't support the stride directly).
-
Specify at RGBDescriptor allocation time that we really want a non-aligned stride for this usecase, and make sure all other callsites know that we've done this (probably by adding the stride as a field in RGBDescriptor and using that rather than recomputing all over the place).
Comment hidden (Intermittent Failures Robot) |
Comment 5•2 years ago
|
||
Appears fixed now.
Description
•