Closed Bug 1791806 Opened 2 years ago Closed 1 year ago

Hit MOZ_CRASH(attempt to add with overflow) at /third_party/rust/wgpu-core/src/command/transfer.rs:180

Categories

(Core :: Graphics: WebGPU, defect, P3)

x86_64
Linux
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: jkratzer, Assigned: nical)

References

(Blocks 2 open bugs)

Details

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

Attachments

(1 file)

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

Testcase can be reproduced using the following commands:

$ pip install fuzzfetch grizzly-framework
$ python -m fuzzfetch --build 5ad292b847e4 --debug --fuzzing -n firefox
$ python -m grizzly.replay ./firefox/firefox testcase.html
Hit MOZ_CRASH(attempt to add with overflow) at /third_party/rust/wgpu-core/src/command/transfer.rs:180

    ==2136611==ERROR: UndefinedBehaviorSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7f8a8d576ae5 bp 0x7f8a70378510 sp 0x7f8a70378500 T2136771)
    ==2136611==The signal is caused by a WRITE memory access.
    ==2136611==Hint: address points to the zero page.
        #0 0x7f8a8d576ae5 in MOZ_Crash /builds/worker/workspace/obj-build/dist/include/mozilla/Assertions.h:261:3
        #1 0x7f8a8d576ae5 in RustMozCrash /mozglue/static/rust/wrappers.cpp:18:3
        #2 0x7f8a8d576a68 in mozglue_static::panic_hook::ha654bb11f4cf491d /mozglue/static/rust/lib.rs:91:9
        #3 0x7f8a8d5764eb in core::ops::function::Fn::call::h5c66be0d65b09404 /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/ops/function.rs:77:5
        #4 0x7f8a8e52d309 in std::panicking::rust_panic_with_hook::hb0138cb6e6fea3e4 /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:702:17
        #5 0x7f8a8e52d108 in std::panicking::begin_panic_handler::_$u7b$$u7b$closure$u7d$$u7d$::h4cb67095557cd1aa /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:586:13
        #6 0x7f8a8e52a413 in std::sys_common::backtrace::__rust_end_short_backtrace::h2bfcac279dcdc911 /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/sys_common/backtrace.rs:138:18
        #7 0x7f8a8e52ce78 in rust_begin_unwind /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:584:5
        #8 0x7f8a8399aa42 in core::panicking::panic_fmt::h1de71520faaa17d3 /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/panicking.rs:142:14
        #9 0x7f8a8399a90c in core::panicking::panic::h467ee1bf554babeb /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/panicking.rs:48:5
        #10 0x7f8a8c861e17 in wgpu_core::command::transfer::extract_texture_selector::h6f3f339eada72f9e /third_party/rust/wgpu-core/src/command/transfer.rs
        #11 0x7f8a8c8bd41e in wgpu_core::command::transfer::_$LT$impl$u20$wgpu_core..hub..Global$LT$G$GT$$GT$::command_encoder_copy_texture_to_texture::h0eeccd6eff60601a /third_party/rust/wgpu-core/src/command/transfer.rs:953:13
        #12 0x7f8a8c8bd41e in wgpu_bindings::server::Global::command_encoder_action::h9573426fd4c637cd /gfx/wgpu_bindings/src/server.rs:590:21
        #13 0x7f8a8c8c5b00 in wgpu_server_command_encoder_action /gfx/wgpu_bindings/src/server.rs:709:5
        #14 0x7f8a8731adbe in mozilla::webgpu::WebGPUParent::RecvCommandEncoderAction(unsigned long, unsigned long, mozilla::ipc::ByteBuf const&) /dom/webgpu/ipc/WebGPUParent.cpp:1064:3
        #15 0x7f8a873301bc in mozilla::webgpu::PWebGPUParent::OnMessageReceived(IPC::Message const&) /builds/worker/workspace/obj-build/ipc/ipdl/PWebGPUParent.cpp:421:80
        #16 0x7f8a85312f2e in mozilla::gfx::PCanvasManagerParent::OnMessageReceived(IPC::Message const&) /builds/worker/workspace/obj-build/ipc/ipdl/PCanvasManagerParent.cpp:214:32
        #17 0x7f8a8492fe21 in mozilla::ipc::MessageChannel::DispatchAsyncMessage(mozilla::ipc::ActorLifecycleProxy*, IPC::Message const&) /ipc/glue/MessageChannel.cpp:1756:25
        #18 0x7f8a8492c975 in mozilla::ipc::MessageChannel::DispatchMessage(mozilla::ipc::ActorLifecycleProxy*, mozilla::UniquePtr<IPC::Message, mozilla::DefaultDelete<IPC::Message> >) /ipc/glue/MessageChannel.cpp:1681:9
        #19 0x7f8a8492d516 in mozilla::ipc::MessageChannel::RunMessage(mozilla::ipc::ActorLifecycleProxy*, mozilla::ipc::MessageChannel::MessageTask&) /ipc/glue/MessageChannel.cpp:1481:3
        #20 0x7f8a8492e8a1 in mozilla::ipc::MessageChannel::MessageTask::Run() /ipc/glue/MessageChannel.cpp:1579:14
        #21 0x7f8a83d4f387 in nsThread::ProcessNextEvent(bool, bool*) /xpcom/threads/nsThread.cpp:1199:16
        #22 0x7f8a83d558cd in NS_ProcessNextEvent(nsIThread*, bool) /xpcom/threads/nsThreadUtils.cpp:465:10
        #23 0x7f8a84936ba5 in mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) /ipc/glue/MessagePump.cpp:300:20
        #24 0x7f8a8485af07 in MessageLoop::RunInternal() /ipc/chromium/src/base/message_loop.cc:381:10
        #25 0x7f8a8485ae12 in RunHandler /ipc/chromium/src/base/message_loop.cc:374:3
        #26 0x7f8a8485ae12 in MessageLoop::Run() /ipc/chromium/src/base/message_loop.cc:356:3
        #27 0x7f8a83d4a6b6 in nsThread::ThreadFunc(void*) /xpcom/threads/nsThread.cpp:384:10
        #28 0x7f8a9b0c4557 in _pt_root /nsprpub/pr/src/pthreads/ptthread.c:201:5
        #29 0x7f8a9b972b42 in start_thread nptl/./nptl/pthread_create.c:442:8
        #30 0x7f8a9ba049ff  misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
    
    UndefinedBehaviorSanitizer can not provide additional info.
    SUMMARY: UndefinedBehaviorSanitizer: SEGV /builds/worker/workspace/obj-build/dist/include/mozilla/Assertions.h:261:3 in MOZ_Crash
    ==2136611==ABORTING
Attached file Testcase

Bugmon Analysis
Verified bug as reproducible on mozilla-central 20220921095211-5ad292b847e4.
Unable to bisect testcase (Testcase reproduces on start build!):

Start: b6fd434586384c1ff3e4059dee52e465e7a63d49 (20210922040913)
End: 5ad292b847e44f0f00e351a05a7a4c4935db703a (20220921095211)
BuildFlags: BuildFlags(asan=False, tsan=False, debug=True, fuzzing=True, coverage=False, valgrind=False, no_opt=False, fuzzilli=False, nyx=False)

Whiteboard: [bugmon:confirm] → [bugmon:bisected,confirmed]

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

For more information, please visit auto_nag documentation.

Flags: needinfo?(jimb)
Assignee: nobody → nical.bugzilla
Flags: needinfo?(jimb)

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

For more information, please visit auto_nag documentation.

Flags: needinfo?(jimb)
Severity: -- → S3
Flags: needinfo?(jimb)
Priority: -- → P3

Upstream fix confirmed.

Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED

Verified bug as fixed on rev mozilla-central 20221219162526-91a9bbbe6bea.
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: