Closed Bug 1780569 Opened 2 years ago Closed 2 years ago

Hit MOZ_CRASH(called `Result::unwrap()` on an `Err` value: Invalid) at gfx/wgpu_bindings/src/server.rs:391

Categories

(Core :: Graphics: WebGPU, defect)

x86_64
Linux
defect

Tracking

()

RESOLVED FIXED
105 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox-esr102 --- unaffected
firefox102 --- unaffected
firefox103 --- unaffected
firefox104 --- wontfix
firefox105 --- fixed

People

(Reporter: jkratzer, Assigned: nical)

References

(Blocks 2 open bugs, Regression)

Details

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

Crash Data

Attachments

(1 file)

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

Testcase can be reproduced using the following commands:

$ pip install fuzzfetch grizzly-framework
$ python -m fuzzfetch --build 78a43d5ba28e --debug --fuzzing -n firefox
$ python -m grizzly.replay ./firefox/firefox testcase.html
Hit MOZ_CRASH(called `Result::unwrap()` on an `Err` value: Invalid) at gfx/wgpu_bindings/src/server.rs:391

    ==809405==ERROR: UndefinedBehaviorSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7f8bc96c0685 bp 0x7f8b7424eea0 sp 0x7f8b7424ee90 T809488)
    ==809405==The signal is caused by a WRITE memory access.
    ==809405==Hint: address points to the zero page.
        #0 0x7f8bc96c0685 in MOZ_Crash /builds/worker/workspace/obj-build/dist/include/mozilla/Assertions.h:261:3
        #1 0x7f8bc96c0685 in RustMozCrash /mozglue/static/rust/wrappers.cpp:18:3
        #2 0x7f8bc96c0608 in mozglue_static::panic_hook::hc73c6ec992377969 /mozglue/static/rust/lib.rs:91:9
        #3 0x7f8bc96c008b in core::ops::function::Fn::call::h3d3ab1c02c30d6c6 /rustc/a8314ef7d0ec7b75c336af2c9857bfaf43002bfc/library/core/src/ops/function.rs:77:5
        #4 0x7f8bca684d95 in std::panicking::rust_panic_with_hook::hc82286af2030e925 /rustc/a8314ef7d0ec7b75c336af2c9857bfaf43002bfc/library/std/src/panicking.rs:702:17
        #5 0x7f8bca684b96 in std::panicking::begin_panic_handler::_$u7b$$u7b$closure$u7d$$u7d$::h1c15057c2f09081f /rustc/a8314ef7d0ec7b75c336af2c9857bfaf43002bfc/library/std/src/panicking.rs:588:13
        #6 0x7f8bca681d53 in std::sys_common::backtrace::__rust_end_short_backtrace::h65de906a5330f8da /rustc/a8314ef7d0ec7b75c336af2c9857bfaf43002bfc/library/std/src/sys_common/backtrace.rs:138:18
        #7 0x7f8bca6848c8 in rust_begin_unwind /rustc/a8314ef7d0ec7b75c336af2c9857bfaf43002bfc/library/std/src/panicking.rs:584:5
        #8 0x7f8bbfde4c12 in core::panicking::panic_fmt::h741cfbfc95bc6112 /rustc/a8314ef7d0ec7b75c336af2c9857bfaf43002bfc/library/core/src/panicking.rs:142:14
        #9 0x7f8bbfde4d02 in core::result::unwrap_failed::h995262f85f9c4e2c /rustc/a8314ef7d0ec7b75c336af2c9857bfaf43002bfc/library/core/src/result.rs:1785:5
        #10 0x7f8bc89e8f17 in core::result::Result$LT$T$C$E$GT$::unwrap::h9d0843872ff75350 /rustc/a8314ef7d0ec7b75c336af2c9857bfaf43002bfc/library/core/src/result.rs:1078:23
        #11 0x7f8bc89e8f17 in wgpu_server_buffer_get_mapped_range /gfx/wgpu_bindings/src/server.rs:386:5
        #12 0x7f8bc35c8aa5 in mozilla::webgpu::WebGPUParent::RecvBufferUnmap(unsigned long, mozilla::ipc::Shmem&&, bool, bool) /dom/webgpu/ipc/WebGPUParent.cpp:416:20
        #13 0x7f8bc35e10a2 in mozilla::webgpu::PWebGPUParent::OnMessageReceived(IPC::Message const&) /builds/worker/workspace/obj-build/ipc/ipdl/PWebGPUParent.cpp:1024:80
        #14 0x7f8bc16d3ace in mozilla::gfx::PCanvasManagerParent::OnMessageReceived(IPC::Message const&) /builds/worker/workspace/obj-build/ipc/ipdl/PCanvasManagerParent.cpp:214:32
        #15 0x7f8bc0d684d1 in mozilla::ipc::MessageChannel::DispatchAsyncMessage(mozilla::ipc::ActorLifecycleProxy*, IPC::Message const&) /ipc/glue/MessageChannel.cpp:1749:25
        #16 0x7f8bc0d65025 in mozilla::ipc::MessageChannel::DispatchMessage(mozilla::ipc::ActorLifecycleProxy*, mozilla::UniquePtr<IPC::Message, mozilla::DefaultDelete<IPC::Message> >) /ipc/glue/MessageChannel.cpp:1674:9
        #17 0x7f8bc0d65bc6 in mozilla::ipc::MessageChannel::RunMessage(mozilla::ipc::ActorLifecycleProxy*, mozilla::ipc::MessageChannel::MessageTask&) /ipc/glue/MessageChannel.cpp:1474:3
        #18 0x7f8bc0d66f51 in mozilla::ipc::MessageChannel::MessageTask::Run() /ipc/glue/MessageChannel.cpp:1572:14
        #19 0x7f8bc0198067 in nsThread::ProcessNextEvent(bool, bool*) /xpcom/threads/nsThread.cpp:1199:16
        #20 0x7f8bc019e5ad in NS_ProcessNextEvent(nsIThread*, bool) /xpcom/threads/nsThreadUtils.cpp:465:10
        #21 0x7f8bc0d6f1d4 in mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) /ipc/glue/MessagePump.cpp:330:5
        #22 0x7f8bc0c94377 in MessageLoop::RunInternal() /ipc/chromium/src/base/message_loop.cc:380:10
        #23 0x7f8bc0c94282 in RunHandler /ipc/chromium/src/base/message_loop.cc:373:3
        #24 0x7f8bc0c94282 in MessageLoop::Run() /ipc/chromium/src/base/message_loop.cc:355:3
        #25 0x7f8bc0193396 in nsThread::ThreadFunc(void*) /xpcom/threads/nsThread.cpp:384:10
        #26 0x7f8bd7eb6557 in _pt_root /nsprpub/pr/src/pthreads/ptthread.c:201:5
        #27 0x7f8bd8c28608 in start_thread /build/glibc-SzIz7B/glibc-2.31/nptl/pthread_create.c:477:8
        #28 0x7f8bd87ef132 in __clone /build/glibc-SzIz7B/glibc-2.31/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:95
    
    UndefinedBehaviorSanitizer can not provide additional info.
    SUMMARY: UndefinedBehaviorSanitizer: SEGV /builds/worker/workspace/obj-build/dist/include/mozilla/Assertions.h:261:3 in MOZ_Crash
    ==809405==ABORTING
Attached file Testcase

Bugmon Analysis
Verified bug as reproducible on mozilla-central 20220721154747-e4ec56a9e42a.
The bug appears to have been introduced in the following build range:

Start: 79d41dfeadc6f5ccf0431cf3813faa51a32d9d89 (20220628201013)
End: 1b9aabdf58d787249fb5d48d59c30d001e461a9a (20220628230036)
Pushlog: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=79d41dfeadc6f5ccf0431cf3813faa51a32d9d89&tochange=1b9aabdf58d787249fb5d48d59c30d001e461a9a

Keywords: regression
Whiteboard: [bugmon:confirm] → [bugmon:bisected,confirmed]
Crash Signature: [@ core::result::unwrap_failed | wgpu_bindings::server::wgpu_server_buffer_get_mapped_range ]
Has STR: --- → yes
Regressed by: 1776816

Set release status flags based on info from the regressing bug 1776816

Set release status flags based on info from the regressing bug 1776816

:jimb, since you are the author of the regressor, bug 1776816, could you take a look?
For more information, please visit auto_nag documentation.

Flags: needinfo?(jimb)
Whiteboard: [bugmon:bisected,confirmed] → [bugmon:bisected,confirmed][fuzzblocker]

Bugmon Analysis
Testcase crashes using the initial build (mozilla-central 20220721034738-78a43d5ba28e) but not with tip (mozilla-central 20220812214215-fbae7216fa06.)

The bug appears to have been fixed in the following build range:

Start: 880cac21dca544a25fa34b5d0c6599d0fd240c17 (20220810143834)
End: bdb42cfe62138374343d5be83ac208826812cd2d (20220810161147)
Pushlog: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=880cac21dca544a25fa34b5d0c6599d0fd240c17&tochange=bdb42cfe62138374343d5be83ac208826812cd2d

jkratzer, can you confirm that the above bisection range is responsible for fixing this issue?
Removing bugmon keyword as no further action possible. Please review the bug and re-add the keyword for further analysis.

Flags: needinfo?(jimb) → needinfo?(jkratzer)
Keywords: bugmon

:nical, could you confirm which bug from the bisection results in comment 7 is responsible for fixing this issue?

Flags: needinfo?(jkratzer) → needinfo?(nical.bugzilla)

It was fixed by bug 1777535.

Flags: needinfo?(nical.bugzilla)
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Depends on: 1777535
Assignee: nobody → nical.bugzilla
Target Milestone: --- → 105 Branch

Is it worth landing this testcase still?

Flags: needinfo?(nical.bugzilla)

I expect the WebGPU CTS (which we haven't hooked up yet) to cover this because it's a pretty straightfoward test, but at some point I'll review the many test cases found by the fuzzers and see if any are missing.

Flags: needinfo?(nical.bugzilla)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: