Hit MOZ_CRASH(called `Result::unwrap()` on an `Err` value: MissingBufferUsage(MissingBufferUsageError { actual: MAP_WRITE, expected: MAP_READ })) at gfx/wgpu_bindings/src/server.rs:238
Categories
(Core :: Graphics: WebGPU, defect, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox104 | --- | verified |
People
(Reporter: jkratzer, Assigned: jimb)
References
(Blocks 3 open bugs)
Details
(Keywords: testcase, Whiteboard: [bugmon:bisected,confirmed][fuzzblocker])
Crash Data
Attachments
(2 files)
Testcase found while fuzzing mozilla-central rev 41271d27d65a (built with: --enable-address-sanitizer --enable-fuzzing).
Testcase can be reproduced using the following commands:
$ pip install fuzzfetch grizzly-framework
$ python -m fuzzfetch --build 41271d27d65a --asan --fuzzing -n firefox
$ python -m grizzly.replay ./firefox/firefox testcase.html
Hit MOZ_CRASH(called `Result::unwrap()` on an `Err` value: MissingBufferUsage(MissingBufferUsageError { actual: MAP_WRITE, expected: MAP_READ })) at gfx/wgpu_bindings/src/server.rs:238
=================================================================
==1664892==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000001 (pc 0x7f72b85d1be0 bp 0x7f727d2c3550 sp 0x7f727d2c3540 T47)
==1664892==The signal is caused by a WRITE memory access.
==1664892==Hint: address points to the zero page.
#0 0x7f72b85d1be0 in MOZ_Crash /builds/worker/workspace/obj-build/dist/include/mozilla/Assertions.h:261:3
#1 0x7f72b85d1be0 in RustMozCrash /mozglue/static/rust/wrappers.cpp:18:3
#2 0x7f72b85d1206 in mozglue_static::panic_hook::h3395d9151612f644 /mozglue/static/rust/lib.rs:91:9
#3 0x7f72b85d0735 in core::ops::function::Fn::call::h123068b42f5e1fd5 /builds/worker/fetches/rust/library/core/src/ops/function.rs:70:5
#4 0x7f72bb5d11af in std::panicking::rust_panic_with_hook::hd4b01d10d132fdc5 (/home/jkratzer/builds/mc-asan/libxul.so+0x1f9c31af) (BuildId: 296feae269509c33fdba619b138afd6a0b713763)
#5 0x7f72bb5f34b6 in std::panicking::begin_panic_handler::_$u7b$$u7b$closure$u7d$$u7d$::head537b50d915cd5 std.19cbab4a-cgu.7
#6 0x7f72bb5f2ca3 in std::sys_common::backtrace::__rust_end_short_backtrace::h3809453eea6ed96e crtstuff.c
#7 0x7f72bb5d0c81 in rust_begin_unwind (/home/jkratzer/builds/mc-asan/libxul.so+0x1f9c2c81) (BuildId: 296feae269509c33fdba619b138afd6a0b713763)
#8 0x7f72a43cf642 in core::panicking::panic_fmt::heea304e80a792787 (/home/jkratzer/builds/mc-asan/libxul.so+0x87c1642) (BuildId: 296feae269509c33fdba619b138afd6a0b713763)
#9 0x7f72a43cf992 in core::result::unwrap_failed::h5673fe4f7b1d3045 (/home/jkratzer/builds/mc-asan/libxul.so+0x87c1992) (BuildId: 296feae269509c33fdba619b138afd6a0b713763)
#10 0x7f72b494044b in core::result::Result$LT$T$C$E$GT$::unwrap::h94bdc1fae9118808 /builds/worker/fetches/rust/library/core/src/result.rs:1065:23
#11 0x7f72b494044b in wgpu_server_buffer_map /gfx/wgpu_bindings/src/server.rs:233:5
#12 0x7f72aa9f9764 in mozilla::webgpu::WebGPUParent::RecvBufferMap(unsigned long, mozilla::webgpu::ffi::WGPUHostMap, unsigned long, unsigned long, std::function<void (mozilla::ipc::Shmem&&)>&&) /dom/webgpu/ipc/WebGPUParent.cpp:388:3
#13 0x7f72aaa2a839 in mozilla::webgpu::PWebGPUParent::OnMessageReceived(IPC::Message const&) /builds/worker/workspace/obj-build/ipc/ipdl/PWebGPUParent.cpp:811:80
#14 0x7f72a7b9728c in mozilla::gfx::PCanvasManagerParent::OnMessageReceived(IPC::Message const&) /builds/worker/workspace/obj-build/ipc/ipdl/PCanvasManagerParent.cpp:214:32
#15 0x7f72a69858c9 in mozilla::ipc::MessageChannel::DispatchAsyncMessage(mozilla::ipc::ActorLifecycleProxy*, IPC::Message const&) /ipc/glue/MessageChannel.cpp:1781:25
#16 0x7f72a6982937 in mozilla::ipc::MessageChannel::DispatchMessage(mozilla::ipc::ActorLifecycleProxy*, mozilla::UniquePtr<IPC::Message, mozilla::DefaultDelete<IPC::Message> >) /ipc/glue/MessageChannel.cpp:1706:9
#17 0x7f72a6983584 in mozilla::ipc::MessageChannel::RunMessage(mozilla::ipc::ActorLifecycleProxy*, mozilla::ipc::MessageChannel::MessageTask&) /ipc/glue/MessageChannel.cpp:1506:3
#18 0x7f72a6984812 in mozilla::ipc::MessageChannel::MessageTask::Run() /ipc/glue/MessageChannel.cpp:1604:14
#19 0x7f72a526d4ae in nsThread::ProcessNextEvent(bool, bool*) /xpcom/threads/nsThread.cpp:1174:16
#20 0x7f72a5276dec in NS_ProcessNextEvent(nsIThread*, bool) /xpcom/threads/nsThreadUtils.cpp:465:10
#21 0x7f72a698e96b in mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) /ipc/glue/MessagePump.cpp:300:20
#22 0x7f72a6813011 in RunInternal /ipc/chromium/src/base/message_loop.cc:380:10
#23 0x7f72a6813011 in RunHandler /ipc/chromium/src/base/message_loop.cc:373:3
#24 0x7f72a6813011 in MessageLoop::Run() /ipc/chromium/src/base/message_loop.cc:355:3
#25 0x7f72a526507b in nsThread::ThreadFunc(void*) /xpcom/threads/nsThread.cpp:378:10
#26 0x7f72cab8757e in _pt_root /nsprpub/pr/src/pthreads/ptthread.c:201:5
#27 0x7f72cb4bd608 in start_thread /build/glibc-SzIz7B/glibc-2.31/nptl/pthread_create.c:477:8
#28 0x7f72cb084132 in __clone /build/glibc-SzIz7B/glibc-2.31/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:95
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /builds/worker/workspace/obj-build/dist/include/mozilla/Assertions.h:261:3 in MOZ_Crash
Thread T47 (Compositor) created by T0 here:
#0 0x558bd4891aec in __interceptor_pthread_create /builds/worker/fetches/llvm-project/compiler-rt/lib/asan/asan_interceptors.cpp:208:3
#1 0x7f72cab7762c in _PR_CreateThread /nsprpub/pr/src/pthreads/ptthread.c:458:14
#2 0x7f72cab689ce in PR_CreateThread /nsprpub/pr/src/pthreads/ptthread.c:533:12
#3 0x7f72a5268325 in nsThread::Init(nsTSubstring<char> const&) /xpcom/threads/nsThread.cpp:604:18
#4 0x7f72a5274acf in nsThreadManager::NewNamedThread(nsTSubstring<char> const&, unsigned int, nsIThread**) /xpcom/threads/nsThreadManager.cpp:534:12
#5 0x7f72a52808a1 in NS_NewNamedThread(nsTSubstring<char> const&, nsIThread**, already_AddRefed<nsIRunnable>, unsigned int) /xpcom/threads/nsThreadUtils.cpp:161:57
#6 0x7f72a779a302 in NS_NewNamedThread<11UL> /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:74:10
#7 0x7f72a779a302 in mozilla::layers::CompositorThreadHolder::CreateCompositorThread() /gfx/layers/ipc/CompositorThread.cpp:66:17
#8 0x7f72a779a6f1 in CompositorThreadHolder /gfx/layers/ipc/CompositorThread.cpp:40:25
#9 0x7f72a779a6f1 in mozilla::layers::CompositorThreadHolder::Start() /gfx/layers/ipc/CompositorThread.cpp:109:33
#10 0x7f72a79f3b9b in gfxPlatform::Init() /gfx/thebes/gfxPlatform.cpp:956:3
#11 0x7f72a79f7506 in GetPlatform /gfx/thebes/gfxPlatform.cpp:466:5
#12 0x7f72a79f7506 in gfxPlatform::InitializeCMS() /gfx/thebes/gfxPlatform.cpp:2089:9
#13 0x7f72ad78ecf4 in EnsureCMSInitialized /builds/worker/workspace/obj-build/dist/include/gfxPlatform.h:982:7
#14 0x7f72ad78ecf4 in gfxPlatform::GetCMSMode() /builds/worker/workspace/obj-build/dist/include/gfxPlatform.h:526:5
#15 0x7f72ad78e55d in nsXPLookAndFeel::GetColorValue(mozilla::StyleSystemColor, mozilla::ColorScheme, mozilla::LookAndFeel::UseStandins, unsigned int&) /widget/nsXPLookAndFeel.cpp:879:9
#16 0x7f72ad7926be in mozilla::LookAndFeel::GetColor(mozilla::StyleSystemColor, mozilla::ColorScheme, mozilla::LookAndFeel::UseStandins) /widget/nsXPLookAndFeel.cpp:1279:47
#17 0x7f72ad6ffb4c in Color /builds/worker/workspace/obj-build/dist/include/mozilla/LookAndFeel.h:444:12
#18 0x7f72ad6ffb4c in ThemedAccentColor /widget/ThemeColors.cpp:88:37
#19 0x7f72ad6ffb4c in mozilla::widget::ThemeColors::RecomputeAccentColors() /widget/ThemeColors.cpp:197:20
#20 0x7f72ad6ff795 in mozilla::widget::Theme::LookAndFeelChanged() /widget/Theme.cpp:180:3
#21 0x7f72ad78c936 in nsXPLookAndFeel::GetInstance() /widget/nsXPLookAndFeel.cpp:361:3
#22 0x7f72ad79305d in mozilla::LookAndFeel::GetThemeInfo(nsTSubstring<char>&) /widget/nsXPLookAndFeel.cpp:1392:3
#23 0x7f72a50cb99a in nsSystemInfo::Init() /xpcom/base/nsSystemInfo.cpp:1047:5
#24 0x7f72a51dc517 in mozilla::xpcom::CreateInstanceImpl(mozilla::xpcom::ModuleID, nsID const&, void**) /builds/worker/workspace/obj-build/xpcom/components/StaticComponents.cpp:8912:7
#25 0x7f72a5219670 in CreateInstance /xpcom/components/nsComponentManager.cpp:185:46
#26 0x7f72a5219670 in nsComponentManagerImpl::GetServiceLocked(mozilla::Maybe<mozilla::detail::BaseMonitorAutoLock<mozilla::Monitor> >&, (anonymous namespace)::EntryWrapper&, nsID const&, void**) /xpcom/components/nsComponentManager.cpp:1283:17
#27 0x7f72a521a118 in nsComponentManagerImpl::GetService(mozilla::xpcom::ModuleID, nsID const&, void**) /xpcom/components/nsComponentManager.cpp:1373:10
#28 0x7f72a51efa7d in mozilla::xpcom::GetServiceHelper::operator()(nsID const&, void**) const /builds/worker/workspace/obj-build/xpcom/components/StaticComponents.cpp:12207:50
#29 0x7f72a5083071 in nsCOMPtr_base::assign_from_helper(nsCOMPtr_helper const&, nsID const&) /xpcom/base/nsCOMPtr.cpp:109:7
#30 0x7f72a6c891af in nsCOMPtr /builds/worker/workspace/obj-build/dist/include/nsCOMPtr.h:999:5
#31 0x7f72a6c891af in GetServiceImpl /js/xpconnect/src/JSServices.cpp:83:32
#32 0x7f72a6c891af in GetService /js/xpconnect/src/JSServices.cpp:130:8
#33 0x7f72a6c891af in xpc::Services_Resolve(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::PropertyKey>, bool*) /js/xpconnect/src/JSServices.cpp:153:25
#34 0x7f72b2c6e4a7 in CallResolveOp /js/src/vm/NativeObject-inl.h:640:8
#35 0x7f72b2c6e4a7 in NativeLookupOwnPropertyInline<js::CanGC, js::LookupResolveMode::CheckResolve> /js/src/vm/NativeObject-inl.h:760:14
#36 0x7f72b2c6e4a7 in NativeGetPropertyInline<js::CanGC> /js/src/vm/NativeObject.cpp:2136:10
#37 0x7f72b2c6e4a7 in js::NativeGetProperty(JSContext*, JS::Handle<js::NativeObject*>, JS::Handle<JS::Value>, JS::Handle<JS::PropertyKey>, JS::MutableHandle<JS::Value>) /js/src/vm/NativeObject.cpp:2184:10
#38 0x7f72b2987df9 in GetProperty /js/src/vm/ObjectOperations-inl.h:120:10
#39 0x7f72b2987df9 in js::GetProperty(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::Value>, js::PropertyName*, JS::MutableHandle<JS::Value>) /js/src/vm/ObjectOperations-inl.h:127:10
#40 0x7f72b435eebb in js::GetProperty(JSContext*, JS::Handle<JS::Value>, JS::Handle<js::PropertyName*>, JS::MutableHandle<JS::Value>) /js/src/vm/Interpreter.cpp:4668:10
#41 0x7f72b43377c4 in GetPropertyOperation /js/src/vm/Interpreter.cpp:203:10
#42 0x7f72b43377c4 in Interpret(JSContext*, js::RunState&) /js/src/vm/Interpreter.cpp:2984:12
#43 0x7f72b4329b61 in js::RunScript(JSContext*, js::RunState&) /js/src/vm/Interpreter.cpp:389:13
#44 0x7f72b4357e2f in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) /js/src/vm/Interpreter.cpp:539:13
#45 0x7f72b43599ba in InternalCall /js/src/vm/Interpreter.cpp:574:10
#46 0x7f72b43599ba in js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>, js::CallReason) /js/src/vm/Interpreter.cpp:605:8
#47 0x7f72b2a8c4fc in JS_CallFunctionValue(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::Value>, JS::HandleValueArray const&, JS::MutableHandle<JS::Value>) /js/src/vm/CallAndConstruct.cpp:53:10
#48 0x7f72a6cceda5 in nsXPCWrappedJS::CallMethod(unsigned short, nsXPTMethodInfo const*, nsXPTCMiniVariant*) /js/xpconnect/src/XPCWrappedJSClass.cpp:981:17
#49 0x7f72a52bd772 in PrepareAndDispatch /xpcom/reflect/xptcall/md/unix/xptcstubs_x86_64_linux.cpp:115:37
#50 0x7f72a52bc4ca in SharedStub xptcstubs_x86_64_linux.cpp
#51 0x7f72a520fbdd in NS_CreateServicesFromCategory(char const*, nsISupports*, char const*, char16_t const*) /xpcom/components/nsCategoryManager.cpp:682:19
#52 0x7f72b2653b79 in nsXREDirProvider::DoStartup() /toolkit/xre/nsXREDirProvider.cpp:936:11
#53 0x7f72b2630dc0 in XREMain::XRE_mainRun() /toolkit/xre/nsAppRunner.cpp:5474:18
#54 0x7f72b2633675 in XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&) /toolkit/xre/nsAppRunner.cpp:5916:8
#55 0x7f72b26343b3 in XRE_main(int, char**, mozilla::BootstrapConfig const&) /toolkit/xre/nsAppRunner.cpp:5983:21
#56 0x558bd48e674d in do_main /browser/app/nsBrowserApp.cpp:227:22
#57 0x558bd48e674d in main /browser/app/nsBrowserApp.cpp:406:16
#58 0x7f72caf89082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
==1664892==ABORTING
Reporter | ||
Comment 1•10 months ago
|
||
Comment 2•10 months ago
|
||
Comment 3•10 months ago
|
||
Bugmon Analysis
Verified bug as reproducible on mozilla-central 20220525150600-41271d27d65a.
Unable to bisect testcase (Testcase reproduces on start build!):
Start: 257c3c51ab2338a35634610b9d3c6c4c305e6005 (20210527031253)
End: 41271d27d65a17e29ea8cfeacc2bbaf9ddd43975 (20220525150600)
BuildFlags: BuildFlags(asan=True, tsan=False, debug=False, fuzzing=True, coverage=False, valgrind=False, no_opt=False, fuzzilli=False)
Comment 4•10 months ago
|
||
The severity field is not set for this bug.
:jimb, could you have a look please?
For more information, please visit auto_nag documentation.
Reporter | ||
Updated•9 months ago
|
Assignee | ||
Updated•9 months ago
|
Assignee | ||
Updated•9 months ago
|
Assignee | ||
Comment 5•9 months ago
|
||
I can reproduce this locally in changeset 41271d27d65a.
Assignee | ||
Comment 6•9 months ago
|
||
I also get a crash on today's mozilla-central (3a227a2156b9), but it's a different crash.
Assignee | ||
Comment 7•9 months ago
|
||
I can reproduce the original crash on today's mozilla-central in a non-asan build.
Assignee | ||
Comment 8•9 months ago
|
||
Pushed by jblandy@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/586b60886029 Check GPUBuffer.mapAsync 'mode' argument against buffer's usage. r=nical
Comment 10•9 months ago
|
||
bugherder |
Comment 11•9 months ago
|
||
Bugmon Analysis
Verified bug as fixed on rev mozilla-central 20220629215821-401c2d7e80fb.
Removing bugmon keyword as no further action possible. Please review the bug and re-add the keyword for further analysis.
Description
•