Closed Bug 1813719 Opened 2 years ago Closed 1 year ago

Assertion failure: false (MOZ_ASSERT_UNREACHABLE: Invalid width / buffer stride!), at /dom/webgpu/ipc/WebGPUParent.cpp:693

Categories

(Core :: Graphics: WebGPU, defect)

x86_64
Linux
defect

Tracking

()

VERIFIED FIXED
111 Branch
Tracking Status
firefox-esr102 --- disabled
firefox109 --- disabled
firefox110 --- disabled
firefox111 --- verified

People

(Reporter: jkratzer, Assigned: jimb)

References

(Blocks 2 open bugs, Regression)

Details

(Keywords: regression, testcase, Whiteboard: [bugmon:bisected,confirmed][fuzzblocker])

Attachments

(2 files)

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

Testcase can be reproduced using the following commands:

$ pip install fuzzfetch grizzly-framework
$ python -m fuzzfetch --build 49ac19f1e046 --debug --fuzzing -n firefox
$ python -m grizzly.replay ./firefox/firefox testcase.html
Assertion failure: false (MOZ_ASSERT_UNREACHABLE: Invalid width / buffer stride!), at /dom/webgpu/ipc/WebGPUParent.cpp:693

    ==708636==ERROR: UndefinedBehaviorSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7fcf9a79538f bp 0x7fcf78540530 sp 0x7fcf785404d0 T708746)
    ==708636==The signal is caused by a WRITE memory access.
    ==708636==Hint: address points to the zero page.
        #0 0x7fcf9a79538f in mozilla::webgpu::WebGPUParent::RecvDeviceCreateSwapChain(unsigned long, unsigned long, mozilla::layers::RGBDescriptor const&, nsTArray<unsigned long> const&, mozilla::layers::RemoteTextureOwnerId const&) /dom/webgpu/ipc/WebGPUParent.cpp:693:5
        #1 0x7fcf9a7ae640 in mozilla::webgpu::PWebGPUParent::OnMessageReceived(IPC::Message const&) /builds/worker/workspace/obj-build/ipc/ipdl/PWebGPUParent.cpp:1820:80
        #2 0x7fcf9871e6c0 in mozilla::gfx::PCanvasManagerParent::OnMessageReceived(IPC::Message const&) /builds/worker/workspace/obj-build/ipc/ipdl/PCanvasManagerParent.cpp:214:32
        #3 0x7fcf97d3b72a in mozilla::ipc::MessageChannel::DispatchAsyncMessage(mozilla::ipc::ActorLifecycleProxy*, IPC::Message const&) /ipc/glue/MessageChannel.cpp:1800:25
        #4 0x7fcf97d383a7 in mozilla::ipc::MessageChannel::DispatchMessage(mozilla::ipc::ActorLifecycleProxy*, mozilla::UniquePtr<IPC::Message, mozilla::DefaultDelete<IPC::Message>>) /ipc/glue/MessageChannel.cpp:1725:9
        #5 0x7fcf97d38ed5 in mozilla::ipc::MessageChannel::RunMessage(mozilla::ipc::ActorLifecycleProxy*, mozilla::ipc::MessageChannel::MessageTask&) /ipc/glue/MessageChannel.cpp:1525:3
        #6 0x7fcf97d3a20f in mozilla::ipc::MessageChannel::MessageTask::Run() /ipc/glue/MessageChannel.cpp:1623:14
        #7 0x7fcf97138538 in nsThread::ProcessNextEvent(bool, bool*) /xpcom/threads/nsThread.cpp:1191:16
        #8 0x7fcf9713e79d in NS_ProcessNextEvent(nsIThread*, bool) /xpcom/threads/nsThreadUtils.cpp:477:10
        #9 0x7fcf97d42922 in mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) /ipc/glue/MessagePump.cpp:300:20
        #10 0x7fcf97c63258 in MessageLoop::RunInternal() /ipc/chromium/src/base/message_loop.cc:381:10
        #11 0x7fcf97c63161 in RunHandler /ipc/chromium/src/base/message_loop.cc:374:3
        #12 0x7fcf97c63161 in MessageLoop::Run() /ipc/chromium/src/base/message_loop.cc:356:3
        #13 0x7fcf97133a37 in nsThread::ThreadFunc(void*) /xpcom/threads/nsThread.cpp:383:10
        #14 0x7fcfaa163c86 in _pt_root /nsprpub/pr/src/pthreads/ptthread.c:201:5
        #15 0x7fcfaaa04b42 in start_thread nptl/pthread_create.c:442:8
        #16 0x7fcfaaa969ff  misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
    
    UndefinedBehaviorSanitizer can not provide additional info.
    SUMMARY: UndefinedBehaviorSanitizer: SEGV /dom/webgpu/ipc/WebGPUParent.cpp:693:5 in mozilla::webgpu::WebGPUParent::RecvDeviceCreateSwapChain(unsigned long, unsigned long, mozilla::layers::RGBDescriptor const&, nsTArray<unsigned long> const&, mozilla::layers::RemoteTextureOwnerId const&)
    ==708636==ABORTING
Attached file Testcase

Verified bug as reproducible on mozilla-central 20230130214413-8eb2c58dc415.
The bug appears to have been introduced in the following build range:

Start: 8027f6771a74487960e588a23e3eae848d5eff5c (20220517153704)
End: ecba9892a284f7d1c79c37b8fcc9342c4955e2eb (20220517141829)
Pushlog: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=8027f6771a74487960e588a23e3eae848d5eff5c&tochange=ecba9892a284f7d1c79c37b8fcc9342c4955e2eb

Keywords: regression
Whiteboard: [bugmon:confirm][fuzzblocker] → [bugmon:bisected,confirmed][fuzzblocker]

I can reproduce this locally.

Assignee: nobody → jimb

Based on comment #2, this bug contains a bisection range found by bugmon. However, the Regressed by field is still not filled.

:jimb, if possible, could you fill the Regressed by field and investigate this regression?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jimb)

In gpuweb#2826, the
size attribute was removed from GPUCanvasConfiguration. Since the
fuzzers have discovered that the size attribute is a fun toy to play
with, it's time to update Firefox to match the spec.

Pushed by jblandy@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b08dc4ed5dce
Remove `size` attribute from `GPUCanvasConfiguration`. r=jgilbert,emilio
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 111 Branch

Verified bug as fixed on rev mozilla-central 20230202041118-3387e4f266f0.
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
Regressed by: 1768337
See Also: → 1813123
See Also: → 1813107
Regressions: 1818786
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: