Open Bug 1890903 Opened 2 months ago Updated 2 months ago

Assertion failure: false (MOZ_ASSERT_UNREACHABLE: unexpected to be called), at /builds/worker/checkouts/gecko/gfx/webrender_bindings/WebRenderAPI.cpp:547

Categories

(Core :: Graphics: WebRender, defect)

defect

Tracking

()

Tracking Status
firefox126 --- affected

People

(Reporter: tsmith, Assigned: sotaro)

References

(Blocks 3 open bugs, )

Details

(Keywords: assertion, pernosco)

Found with m-c 20240327-d6ec30c068b7 (--enable-address-sanitizer --enable-fuzzing)

This was found by visiting a live website with a debug build.

STR:

  • Launch browser and visit site

This issue was triggered by visiting http://mapcarta.com/.

Assertion failure: false (MOZ_ASSERT_UNREACHABLE: unexpected to be called), at /builds/worker/checkouts/gecko/gfx/webrender_bindings/WebRenderAPI.cpp:547

#0 0x7fea8bf04118 in mozilla::wr::WebRenderAPI::CheckIsRemoteTextureReady(mozilla::layers::RemoteTextureInfoList*, mozilla::TimeStamp const&) /builds/worker/checkouts/gecko/gfx/webrender_bindings/WebRenderAPI.cpp:547:5
#1 0x7fea8bf038e9 in mozilla::wr::WebRenderAPI::HandleWrTransactionEvents(mozilla::wr::WebRenderAPI::RemoteTextureWaitType) /builds/worker/checkouts/gecko/gfx/webrender_bindings/WebRenderAPI.cpp:600:21
#2 0x7fea8bf0e5aa in operator()<StoreCopyPassByConstLRef<mozilla::wr::WebRenderAPI::RemoteTextureWaitType> &> /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:1085:18
#3 0x7fea8bf0e5aa in __invoke_impl<void, (lambda at /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:1084:9), StoreCopyPassByConstLRef<mozilla::wr::WebRenderAPI::RemoteTextureWaitType> &> /builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/invoke.h:60:14
#4 0x7fea8bf0e5aa in __invoke<(lambda at /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:1084:9), StoreCopyPassByConstLRef<mozilla::wr::WebRenderAPI::RemoteTextureWaitType> &> /builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/invoke.h:95:14
#5 0x7fea8bf0e5aa in __apply_impl<(lambda at /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:1084:9), std::tuple<StoreCopyPassByConstLRef<mozilla::wr::WebRenderAPI::RemoteTextureWaitType> > &, 0UL> /builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/tuple:1678:14
#6 0x7fea8bf0e5aa in apply<(lambda at /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:1084:9), std::tuple<StoreCopyPassByConstLRef<mozilla::wr::WebRenderAPI::RemoteTextureWaitType> > &> /builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/tuple:1687:14
#7 0x7fea8bf0e5aa in apply<mozilla::wr::WebRenderAPI, void (mozilla::wr::WebRenderAPI::*)(mozilla::wr::WebRenderAPI::RemoteTextureWaitType)> /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:1083:12
#8 0x7fea8bf0e5aa in mozilla::detail::RunnableMethodImpl<RefPtr<mozilla::wr::WebRenderAPI> const, void (mozilla::wr::WebRenderAPI::*)(mozilla::wr::WebRenderAPI::RemoteTextureWaitType), true, (mozilla::RunnableKind)0, mozilla::wr::WebRenderAPI::RemoteTextureWaitType>::Run() /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:1134:13
#9 0x7fea8a68a2d1 in nsThread::ProcessNextEvent(bool, bool*) /builds/worker/checkouts/gecko/xpcom/threads/nsThread.cpp:1193:16
#10 0x7fea8a6912ad in NS_ProcessNextEvent(nsIThread*, bool) /builds/worker/checkouts/gecko/xpcom/threads/nsThreadUtils.cpp:480:10
#11 0x7fea8b399815 in mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) /builds/worker/checkouts/gecko/ipc/glue/MessagePump.cpp:330:5
#12 0x7fea8b2ae521 in RunHandler /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:363:3
#13 0x7fea8b2ae521 in MessageLoop::Run() /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:345:3
#14 0x7fea8a6855a3 in nsThread::ThreadFunc(void*) /builds/worker/checkouts/gecko/xpcom/threads/nsThread.cpp:370:10
#15 0x7fea9f4de66f in _pt_root /builds/worker/checkouts/gecko/nsprpub/pr/src/pthreads/ptthread.c:201:5
#16 0x7fea9fd80ac2 in start_thread nptl/pthread_create.c:442:8
#17 0x7fea9fe11a03 in __clone misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:100

A Pernosco session is available here: https://pernos.co/debug/XtnGHWOosTSk_RGXzXq3hQ/index.html

Keywords: pernosco

This was also discovered by domino but I was unable to reduce the test case.

Blocks: domino

Looks like we are hitting a timeout.
Sotaro, could you take a look?

Flags: needinfo?(sotaro.ikeda.g)
Assignee: nobody → sotaro.ikeda.g
Flags: needinfo?(sotaro.ikeda.g)

With the Pernosco session, the assert failure happened when RemoteTextureInfo was {mTextureId.mId=19, mOwnerId.mId=1, mForPid=1087473}. But RemoteTextureMap::PushTexture() with {mTextureId.mId=19, mOwnerId.mId=1, mForPid=1087473} was already called. Then time out handling seemed to have a problem.

By implementation of WebRenderAPI::CheckIsRemoteTextureReady(), timeout is checked at first, then RemoteTextureMap::CheckRemoteTextureReady() is called. In debug build, processing could take longer time, then seemed to hit the first timeout check, though RemoteTextureMap already had the remote texture.

Depends on: 1891180
Blocks: wr-fuzz

:tsmith, can you check if the problem is addressed with Bug 1891180?

Flags: needinfo?(twsmith)

It was not, I see a report from earlier today: 20240418-b17b73afc2d5.

Flags: needinfo?(twsmith)

Then debug builds may require an extended timeout.

Depends on: 1892648

:tsmith, can you check again if the problem is addressed with Bug 1892648?

Flags: needinfo?(twsmith)

I am able to repro with m-c 20240423-d02a8aafb747 but it did take a couple tries.

Flags: needinfo?(twsmith)

:tsmith, thank you for the checking. Can you get a Pernosco session again with latest m-c?

Flags: needinfo?(twsmith)
Flags: needinfo?(twsmith)

The severity field is not set for this bug.
:gw, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(gwatson)
Severity: -- → S3
Flags: needinfo?(gwatson)
You need to log in before you can comment on or make changes to this bug.