Closed Bug 1774456 Opened 2 years ago Closed 2 years ago

Hit MOZ_CRASH(assertion failed: selector.layers.end <= full_range.layers.end) at /third_party/rust/wgpu-core/src/track/texture.rs:109

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 b1ed2fa50612 (built with: --enable-debug --enable-fuzzing).

Testcase can be reproduced using the following commands:

$ pip install fuzzfetch grizzly-framework
$ python -m fuzzfetch --build b1ed2fa50612 --debug --fuzzing -n firefox
$ python -m grizzly.replay ./firefox/firefox testcase.html
Hit MOZ_CRASH(assertion failed: selector.layers.end <= full_range.layers.end) at /third_party/rust/wgpu-core/src/track/texture.rs:109

    ==145644==ERROR: UndefinedBehaviorSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7f37377d2985 bp 0x7f36aadf3be0 sp 0x7f36aadf3bd0 T145734)
    ==145644==The signal is caused by a WRITE memory access.
    ==145644==Hint: address points to the zero page.
        #0 0x7f37377d2985 in MOZ_Crash /builds/worker/workspace/obj-build/dist/include/mozilla/Assertions.h:261:3
        #1 0x7f37377d2985 in RustMozCrash /mozglue/static/rust/wrappers.cpp:18:3
        #2 0x7f37377d2904 in mozglue_static::panic_hook::h89d5be002e13bf27 /mozglue/static/rust/lib.rs:91:9
        #3 0x7f37377d236b in core::ops::function::Fn::call::hf6aaf647c8f09bac /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/ops/function.rs:70:5
        #4 0x7f373873b14f in std::panicking::rust_panic_with_hook::habfdcc2e90f9fd4c /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/panicking.rs:702:17
        #5 0x7f373873af48 in std::panicking::begin_panic_handler::_$u7b$$u7b$closure$u7d$$u7d$::he054b2a83a51d2cd /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/panicking.rs:586:13
        #6 0x7f3738737dc3 in std::sys_common::backtrace::__rust_end_short_backtrace::ha48b94ab49b30915 /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/sys_common/backtrace.rs:138:18
        #7 0x7f373873acb8 in rust_begin_unwind /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/panicking.rs:584:5
        #8 0x7f372dfc0ec2 in core::panicking::panic_fmt::h366d3a309ae17c94 /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/panicking.rs:143:14
        #9 0x7f372dfc0d8c in core::panicking::panic::h8705e81f284be8a5 /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/panicking.rs:48:5
        #10 0x7f3736a445b1 in wgpu_core::track::texture::ComplexTextureState::from_selector_state_iter::h5ba97f3b6ffaf96b /third_party/rust/wgpu-core/src/track/texture.rs:109:13
        #11 0x7f3736a479c6 in wgpu_core::track::texture::insert::h221247b10c0658af /third_party/rust/wgpu-core/src/track/texture.rs:1033:27
        #12 0x7f3736a479c6 in wgpu_core::track::texture::insert_or_barrier_update::h226492a2c931b470 /third_party/rust/wgpu-core/src/track/texture.rs:965:9
        #13 0x7f3736a479c6 in wgpu_core::track::texture::TextureTracker$LT$A$GT$::set_single::h5c9c4de0a89f44be /third_party/rust/wgpu-core/src/track/texture.rs:537:13
        #14 0x7f3736aef67e in wgpu_core::command::transfer::_$LT$impl$u20$wgpu_core..hub..Global$LT$G$GT$$GT$::command_encoder_copy_texture_to_buffer::he90540d9c16fe239 /third_party/rust/wgpu-core/src/command/transfer.rs:780:42
        #15 0x7f3736b49b6b in wgpu_bindings::server::Global::command_encoder_action::h8b77a2ffc99a43c4 /gfx/wgpu_bindings/src/server.rs:434:21
        #16 0x7f3736b556fa in wgpu_server_command_encoder_action /gfx/wgpu_bindings/src/server.rs:560:5
        #17 0x7f37317737ee in mozilla::webgpu::WebGPUParent::RecvCommandEncoderAction(unsigned long, unsigned long, mozilla::ipc::ByteBuf const&) /dom/webgpu/ipc/WebGPUParent.cpp:927:3
        #18 0x7f373178677f in mozilla::webgpu::PWebGPUParent::OnMessageReceived(IPC::Message const&) /builds/worker/workspace/obj-build/ipc/ipdl/PWebGPUParent.cpp:420:80
        #19 0x7f372f88d70e in mozilla::gfx::PCanvasManagerParent::OnMessageReceived(IPC::Message const&) /builds/worker/workspace/obj-build/ipc/ipdl/PCanvasManagerParent.cpp:214:32
        #20 0x7f372ef3f9d1 in mozilla::ipc::MessageChannel::DispatchAsyncMessage(mozilla::ipc::ActorLifecycleProxy*, IPC::Message const&) /ipc/glue/MessageChannel.cpp:1781:25
        #21 0x7f372ef3c525 in mozilla::ipc::MessageChannel::DispatchMessage(mozilla::ipc::ActorLifecycleProxy*, mozilla::UniquePtr<IPC::Message, mozilla::DefaultDelete<IPC::Message> >) /ipc/glue/MessageChannel.cpp:1706:9
        #22 0x7f372ef3d0c6 in mozilla::ipc::MessageChannel::RunMessage(mozilla::ipc::ActorLifecycleProxy*, mozilla::ipc::MessageChannel::MessageTask&) /ipc/glue/MessageChannel.cpp:1506:3
        #23 0x7f372ef3e451 in mozilla::ipc::MessageChannel::MessageTask::Run() /ipc/glue/MessageChannel.cpp:1604:14
        #24 0x7f372e374b17 in nsThread::ProcessNextEvent(bool, bool*) /xpcom/threads/nsThread.cpp:1174:16
        #25 0x7f372e37b04d in NS_ProcessNextEvent(nsIThread*, bool) /xpcom/threads/nsThreadUtils.cpp:465:10
        #26 0x7f372ef466d4 in mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) /ipc/glue/MessagePump.cpp:330:5
        #27 0x7f372ee6c637 in MessageLoop::RunInternal() /ipc/chromium/src/base/message_loop.cc:380:10
        #28 0x7f372ee6c542 in RunHandler /ipc/chromium/src/base/message_loop.cc:373:3
        #29 0x7f372ee6c542 in MessageLoop::Run() /ipc/chromium/src/base/message_loop.cc:355:3
        #30 0x7f372e370006 in nsThread::ThreadFunc(void*) /xpcom/threads/nsThread.cpp:378:10
        #31 0x7f3744105557 in _pt_root /nsprpub/pr/src/pthreads/ptthread.c:201:5
        #32 0x7f3744e77608 in start_thread /build/glibc-SzIz7B/glibc-2.31/nptl/pthread_create.c:477:8
        #33 0x7f3744a3e132 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
    ==145644==ABORTING
Attached file Testcase

Bugmon Analysis
Verified bug as reproducible on mozilla-central 20220615214908-0e44540919cd.
Unable to bisect testcase (Testcase reproduces on start build!):

Start: b7d44f6d500311bc4f0f889dbd924f790368ca5b (20210617042731)
End: b1ed2fa50612451f8f39fc84c5f64af62cf7fe3a (20220615093700)
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
Severity: -- → S3
Flags: needinfo?(jimb)
Priority: -- → P3

Upstream fix made it to m-c.

Status: NEW → RESOLVED
Closed: 2 years 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: