Crash in [@ mozilla::layers::CanvasTranslator::SetDataSurfaceBuffer]
Categories
(Core :: Graphics: Canvas2D, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr115 | --- | unaffected |
| firefox122 | --- | wontfix |
| firefox123 | --- | fixed |
| firefox124 | --- | fixed |
People
(Reporter: aosmond, Assigned: bobowen)
References
Details
(Keywords: crash)
Crash Data
Attachments
(1 file)
|
48 bytes,
text/x-phabricator-request
|
pascalc
:
approval-mozilla-beta+
|
Details |
Crash report: https://crash-stats.mozilla.org/report/index/2c6b44cc-8646-4639-ad91-4312e0240115
MOZ_CRASH Reason: MOZ_RELEASE_ASSERT(mHeader->readerState == State::Paused)
Top 10 frames of crashing thread:
0 libxul.so mozilla::layers::CanvasTranslator::SetDataSurfaceBuffer gfx/layers/ipc/CanvasTranslator.cpp:278
1 libxul.so mozilla::detail::RunnableMethodArguments<mozilla::UniquePtr<int, mozilla::detail::FileHandleDeleter>&&, unsigned long>::apply<mozilla::layers::CanvasTranslator, void const xpcom/threads/nsThreadUtils.h:1164
1 libxul.so std::__invoke_impl<void, mozilla::detail::RunnableMethodArguments<mozilla::UniquePtr<int, mozilla::detail::FileHandleDeleter>&&, unsigned long>::apply<mozilla::layers::CanvasTranslator, void /builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/include/c++/8/bits/invoke.h:60
1 libxul.so std::__invoke<mozilla::detail::RunnableMethodArguments<mozilla::UniquePtr<int, mozilla::detail::FileHandleDeleter>&&, unsigned long>::apply<mozilla::layers::CanvasTranslator, void /builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/include/c++/8/bits/invoke.h:95
1 libxul.so std::__apply_impl<mozilla::detail::RunnableMethodArguments<mozilla::UniquePtr<int, mozilla::detail::FileHandleDeleter>&&, unsigned long>::apply<mozilla::layers::CanvasTranslator, void /builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/include/c++/8/tuple:1678
1 libxul.so std::apply<mozilla::detail::RunnableMethodArguments<mozilla::UniquePtr<int, mozilla::detail::FileHandleDeleter>&&, unsigned long>::apply<mozilla::layers::CanvasTranslator, void /builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/include/c++/8/tuple:1687
1 libxul.so mozilla::detail::RunnableMethodArguments<mozilla::UniquePtr<int, mozilla::detail::FileHandleDeleter>&&, unsigned long>::apply<mozilla::layers::CanvasTranslator, void xpcom/threads/nsThreadUtils.h:1162
1 libxul.so mozilla::detail::RunnableMethodImpl<mozilla::layers::CanvasTranslator*, void xpcom/threads/nsThreadUtils.h:1213
2 libxul.so nsThread::ProcessNextEvent xpcom/threads/nsThread.cpp:1193
2 libxul.so NS_ProcessNextEvent xpcom/threads/nsThreadUtils.cpp:480
| Reporter | ||
Comment 1•2 years ago
|
||
This still seems to be happening....any ideas? Crashing the parent process is a bad idea. Probably better to take away accelerated canvas if we can't figure it out, and change it to a MOZ_DIAGNOSTIC_ASSERT?
| Reporter | ||
Comment 2•2 years ago
|
||
We use the parent process on Linux/OSX/Android with DrawTargetWebgl. Only seeing the crashes on Linux right now.
| Reporter | ||
Comment 3•2 years ago
|
||
https://crash-stats.mozilla.org/report/index/d3663168-d82d-423a-9073-f200d0240120
Critical log is:
"|[G0][GFX1-]: [D3D11] 2 CreateTexture2D failure Size: Size(1,1)texture11: false Code: 0x8007000e (t=87137.3) |[G1][GFX1-]: GFX: CanvasTranslator failed to get device (t=87137.3) |[G2][GFX1-]: CanvasTranslator::SetDataSurfaceBuffer bad state 0 (t=87137.3) "
which means the state is Processing
https://searchfox.org/mozilla-central/rev/85679f95a634d08307e115fb365ea287198bd4d2/gfx/layers/CanvasDrawEventRecorder.h#37
I'm not sure I believe it. Make we should add an Invalid state to occupy 0 so that we should never see it.
| Assignee | ||
Comment 4•2 years ago
|
||
(In reply to Andrew Osmond [:aosmond] (he/him) from comment #3)
https://crash-stats.mozilla.org/report/index/d3663168-d82d-423a-9073-f200d0240120
Critical log is:
"|[G0][GFX1-]: [D3D11] 2 CreateTexture2D failure Size: Size(1,1)texture11: false Code: 0x8007000e (t=87137.3) |[G1][GFX1-]: GFX: CanvasTranslator failed to get device (t=87137.3) |[G2][GFX1-]: CanvasTranslator::SetDataSurfaceBuffer bad state 0 (t=87137.3) "which means the state is
Processing
https://searchfox.org/mozilla-central/rev/85679f95a634d08307e115fb365ea287198bd4d2/gfx/layers/CanvasDrawEventRecorder.h#37I'm not sure I believe it. Make we should add an
Invalidstate to occupy0so that we should never see it.
I think this must be:
- This create texture failing apparently on OOM.
- Which is the failure to create the reference texture in this where we get the current device, because we don't have one.
- However we've already set the header and the reader state starts as
Processing
So, I think that actually we should start the reader state as Paused, because that means we won't try and start it from the writer as we know we've sent the message to start it. This is consistent with the use for SetDataSurfaceBuffer and AddBuffer.
We should also set it to Failed when the device check fails or actually probably in CreateReferenceTexture whenever we return false.
| Assignee | ||
Updated•2 years ago
|
| Assignee | ||
Comment 5•2 years ago
|
||
Depends on D199222
| Assignee | ||
Comment 6•2 years ago
|
||
Comment 8•2 years ago
|
||
| bugherder | ||
Updated•2 years ago
|
Comment 9•2 years ago
|
||
The patch landed in nightly and beta is affected.
:bobowen, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- If no, please set
status-firefox123towontfix.
For more information, please visit BugBot documentation.
| Assignee | ||
Comment 10•2 years ago
|
||
Comment on attachment 9375767 [details]
Bug 1875272: Deactivate remote canvas if reference texture create fails. r=#gfx-reviewers,aosmond
Beta/Release Uplift Approval Request
- User impact if declined: This is a diagnostic crash, but this fix not only catches the issue earlier and behaves more gracefully, it also seems to have improved the crashes for bug 1875656.
- 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): Change mainly consists of deactivating remote canvas more consistently when an unrecoverable error has occurred.
- String changes made/needed: None
- Is Android affected?: Yes
Comment 11•2 years ago
|
||
Comment on attachment 9375767 [details]
Bug 1875272: Deactivate remote canvas if reference texture create fails. r=#gfx-reviewers,aosmond
Approved for 123 beta 4, thanks.
Comment 12•2 years ago
|
||
| uplift | ||
Comment 13•2 years ago
|
||
| bugherder uplift | ||
Description
•