Closed Bug 1788241 Opened 2 years ago Closed 2 years ago

Assertion failure: !mRemoteTextureConsumer, at /gfx/layers/wr/WebRenderImageHost.cpp:37

Categories

(Core :: Graphics: Canvas2D, defect)

x86_64
Linux
defect

Tracking

()

VERIFIED FIXED
106 Branch
Tracking Status
firefox106 --- verified

People

(Reporter: jkratzer, Assigned: sotaro)

References

(Blocks 1 open bug)

Details

(Keywords: testcase, Whiteboard: [bugmon:confirm])

Attachments

(2 files)

Testcase found while fuzzing mozilla-central rev 4c76664026b5 (built with: --enable-debug --enable-fuzzing).

Testcase can be reproduced using the following commands:

$ pip install fuzzfetch grizzly-framework
$ python -m fuzzfetch --build 4c76664026b5 --debug --fuzzing -n firefox
$ python -m grizzly.replay ./firefox/firefox testcase.html
Assertion failure: !mRemoteTextureConsumer, at /gfx/layers/wr/WebRenderImageHost.cpp:37

    ==59418==ERROR: UndefinedBehaviorSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7ff67488ebd7 bp 0x7ff61a9f37a0 sp 0x7ff61a9f3780 T59523)
    ==59418==The signal is caused by a WRITE memory access.
    ==59418==Hint: address points to the zero page.
        #0 0x7ff67488ebd7 in mozilla::layers::WebRenderImageHost::~WebRenderImageHost() /gfx/layers/wr/WebRenderImageHost.cpp:37:3
        #1 0x7ff67488eccb in mozilla::layers::WebRenderImageHost::~WebRenderImageHost() /gfx/layers/wr/WebRenderImageHost.cpp:36:43
        #2 0x7ff6747cd853 in Release /builds/worker/workspace/obj-build/dist/include/CompositableHost.h:68:3
        #3 0x7ff6747cd853 in Release /builds/worker/workspace/obj-build/dist/include/mozilla/RefPtr.h:50:40
        #4 0x7ff6747cd853 in Release /builds/worker/workspace/obj-build/dist/include/mozilla/RefPtr.h:381:36
        #5 0x7ff6747cd853 in ~RefPtr /builds/worker/workspace/obj-build/dist/include/mozilla/RefPtr.h:81:7
        #6 0x7ff6747cd853 in ~pair /builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_pair.h:208:12
        #7 0x7ff6747cd853 in destroy<std::pair<const unsigned long, RefPtr<mozilla::layers::CompositableHost> > > /builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/ext/new_allocator.h:140:28
        #8 0x7ff6747cd853 in destroy<std::pair<const unsigned long, RefPtr<mozilla::layers::CompositableHost> > > /builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/alloc_traits.h:487:8
        #9 0x7ff6747cd853 in _M_destroy_node /builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_tree.h:650:2
        #10 0x7ff6747cd853 in std::_Rb_tree<unsigned long, std::pair<unsigned long const, RefPtr<mozilla::layers::CompositableHost> >, std::_Select1st<std::pair<unsigned long const, RefPtr<mozilla::layers::CompositableHost> > >, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, RefPtr<mozilla::layers::CompositableHost> > > >::_M_drop_node(std::_Rb_tree_node<std::pair<unsigned long const, RefPtr<mozilla::layers::CompositableHost> > >*) /builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_tree.h:658:2
        #11 0x7ff6747fd14d in std::_Rb_tree<unsigned long, std::pair<unsigned long const, RefPtr<mozilla::layers::CompositableHost> >, std::_Select1st<std::pair<unsigned long const, RefPtr<mozilla::layers::CompositableHost> > >, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, RefPtr<mozilla::layers::CompositableHost> > > >::_M_erase(std::_Rb_tree_node<std::pair<unsigned long const, RefPtr<mozilla::layers::CompositableHost> > >*) /builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_tree.h:1858:4
        #12 0x7ff6747e3d9c in clear /builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_tree.h:1171:9
        #13 0x7ff6747e3d9c in clear /builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_map.h:1127:14
        #14 0x7ff6747e3d9c in mozilla::layers::ImageBridgeParent::ActorDestroy(mozilla::ipc::IProtocol::ActorDestroyReason) /gfx/layers/ipc/ImageBridgeParent.cpp:147:18
        #15 0x7ff67408314a in mozilla::ipc::IProtocol::DestroySubtree(mozilla::ipc::IProtocol::ActorDestroyReason) /ipc/glue/ProtocolUtils.cpp:583:3
        #16 0x7ff6746683e0 in mozilla::layers::PImageBridgeParent::OnChannelClose() /builds/worker/workspace/obj-build/ipc/ipdl/PImageBridgeParent.cpp:706:5
        #17 0x7ff67405ee2e in mozilla::ipc::MessageChannel::OnNotifyMaybeChannelError() /ipc/glue/MessageChannel.cpp:2033:3
        #18 0x7ff67407ccbb in applyImpl<mozilla::ipc::MessageChannel, void (mozilla::ipc::MessageChannel::*)()> /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:1147:12
        #19 0x7ff67407ccbb in apply<mozilla::ipc::MessageChannel, void (mozilla::ipc::MessageChannel::*)()> /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:1153:12
        #20 0x7ff67407ccbb in mozilla::detail::RunnableMethodImpl<mozilla::ipc::MessageChannel*, void (mozilla::ipc::MessageChannel::*)(), false, (mozilla::RunnableKind)1>::Run() /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:1200:13
        #21 0x7ff673482157 in nsThread::ProcessNextEvent(bool, bool*) /xpcom/threads/nsThread.cpp:1199:16
        #22 0x7ff67348869d in NS_ProcessNextEvent(nsIThread*, bool) /xpcom/threads/nsThreadUtils.cpp:465:10
        #23 0x7ff6740644c5 in mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) /ipc/glue/MessagePump.cpp:300:20
        #24 0x7ff673f888a7 in MessageLoop::RunInternal() /ipc/chromium/src/base/message_loop.cc:381:10
        #25 0x7ff673f887b2 in RunHandler /ipc/chromium/src/base/message_loop.cc:374:3
        #26 0x7ff673f887b2 in MessageLoop::Run() /ipc/chromium/src/base/message_loop.cc:356:3
        #27 0x7ff67347d486 in nsThread::ThreadFunc(void*) /xpcom/threads/nsThread.cpp:384:10
        #28 0x7ff6895a7557 in _pt_root /nsprpub/pr/src/pthreads/ptthread.c:201:5
        #29 0x7ff689e5db42 in start_thread nptl/./nptl/pthread_create.c:442:8
        #30 0x7ff689eef9ff  misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
    
    UndefinedBehaviorSanitizer can not provide additional info.
    SUMMARY: UndefinedBehaviorSanitizer: SEGV /gfx/layers/wr/WebRenderImageHost.cpp:37:3 in mozilla::layers::WebRenderImageHost::~WebRenderImageHost()
    ==59418==ABORTING
Attached file Testcase

Lee, would this be something for you to look at? Or maybe Sotaro?

Severity: -- → S3
Flags: needinfo?(lsalzman)

I take the bug.

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

It is similar to Bug 1783923.

See Also: → 1783923
Pushed by sikeda.birchill@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d642c864b30e
Ensure WebRenderImageHost::OnReleased() is called in ImageBridgeParent::ActorDestroy() r=lsalzman
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 106 Branch

Bugmon Analysis
Verified bug as fixed on rev mozilla-central 20220901095452-9b193eeae94e.
Removing bugmon keyword as no further action possible. Please review the bug and re-add the keyword for further analysis.

Status: RESOLVED → VERIFIED
Keywords: bugmon
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: