Closed Bug 1795977 Opened 2 years ago Closed 1 year ago

Assertion failure: mSize > 0 (invalid size), at /ipc/glue/Shmem.cpp:251

Categories

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

x86_64
Linux
defect

Tracking

()

RESOLVED FIXED
110 Branch
Tracking Status
firefox-esr102 --- disabled
firefox108 --- disabled
firefox109 --- disabled
firefox110 --- fixed

People

(Reporter: jkratzer, Assigned: nical)

References

(Depends on 1 open bug, Blocks 2 open bugs, Regression)

Details

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

Attachments

(1 file)

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

Testcase can be reproduced using the following commands:

$ pip install fuzzfetch grizzly-framework
$ python -m fuzzfetch --build ac1330b68d3e --debug --fuzzing -n firefox
$ python -m grizzly.replay ./firefox/firefox testcase.html
Assertion failure: mSize > 0 (invalid size), at /ipc/glue/Shmem.cpp:251

    ==609774==ERROR: UndefinedBehaviorSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7feff0873d23 bp 0x7ffdeab86f50 sp 0x7ffdeab86f40 T609774)
    ==609774==The signal is caused by a WRITE memory access.
    ==609774==Hint: address points to the zero page.
        #0 0x7feff0873d23 in mozilla::ipc::Shmem::AssertInvariants() const /ipc/glue/Shmem.cpp:251:3
        #1 0x7feff0874e64 in mozilla::ipc::Shmem::MkCreatedMessage(int) /ipc/glue/Shmem.cpp:411:3
        #2 0x7feff086183a in mozilla::ipc::IToplevelProtocol::CreateSharedMemory(unsigned long, bool, int*) /ipc/glue/ProtocolUtils.cpp:691:41
        #3 0x7feff08624ed in CreateSharedMemory /ipc/glue/ProtocolUtils.cpp:331:21
        #4 0x7feff08624ed in mozilla::ipc::IProtocol::AllocShmem(unsigned long, mozilla::ipc::Shmem*) /ipc/glue/ProtocolUtils.cpp:413:31
        #5 0x7feff328d522 in mozilla::webgpu::Queue::WriteTexture(mozilla::dom::GPUImageCopyTexture const&, mozilla::dom::ArrayBufferViewOrArrayBuffer const&, mozilla::dom::GPUImageDataLayout const&, mozilla::dom::RangeEnforcedUnsignedLongSequenceOrGPUExtent3DDict const&, mozilla::ErrorResult&) /dom/webgpu/Queue.cpp:150:17
        #6 0x7feff27b890e in mozilla::dom::GPUQueue_Binding::writeTexture(JSContext*, JS::Handle<JSObject*>, void*, JSJitMethodCallArgs const&) /builds/worker/workspace/obj-build/dom/bindings/WebGPUBinding.cpp:22180:24
        #7 0x7feff2e1dc7c in bool mozilla::dom::binding_detail::GenericMethod<mozilla::dom::binding_detail::NormalThisPolicy, mozilla::dom::binding_detail::ThrowExceptions>(JSContext*, unsigned int, JS::Value*) /dom/bindings/BindingUtils.cpp:3287:13
        #8 0x7feff851dc4c in CallJSNative(JSContext*, bool (*)(JSContext*, unsigned int, JS::Value*), js::CallReason, JS::CallArgs const&) /js/src/vm/Interpreter.cpp:459:13
        #9 0x7feff851d571 in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) /js/src/vm/Interpreter.cpp:547:12
        #10 0x7feff85147d8 in CallFromStack /js/src/vm/Interpreter.cpp:619:10
        #11 0x7feff85147d8 in Interpret(JSContext*, js::RunState&) /js/src/vm/Interpreter.cpp:3375:16
        #12 0x7feff850b87d in js::RunScript(JSContext*, js::RunState&) /js/src/vm/Interpreter.cpp:431:13
        #13 0x7feff851d46d in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) /js/src/vm/Interpreter.cpp:579:13
        #14 0x7feff851e9ac 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:646:8
        #15 0x7feff717aaac in JS::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::HandleValueArray const&, JS::MutableHandle<JS::Value>) /js/src/vm/CallAndConstruct.cpp:117:10
        #16 0x7feff2bcbcb0 in mozilla::dom::Function::Call(mozilla::dom::BindingCallContext&, JS::Handle<JS::Value>, nsTArray<JS::Value> const&, JS::MutableHandle<JS::Value>, mozilla::ErrorResult&) /builds/worker/workspace/obj-build/dom/bindings/FunctionBinding.cpp:50:8
        #17 0x7feff185aa92 in void mozilla::dom::Function::Call<nsCOMPtr<nsIGlobalObject> >(nsCOMPtr<nsIGlobalObject> const&, nsTArray<JS::Value> const&, JS::MutableHandle<JS::Value>, mozilla::ErrorResult&, char const*, mozilla::dom::CallbackObject::ExceptionHandling, JS::Realm*) /builds/worker/workspace/obj-build/dist/include/mozilla/dom/FunctionBinding.h:71:12
        #18 0x7feff185a834 in mozilla::dom::CallbackTimeoutHandler::Call(char const*) /dom/base/TimeoutHandler.cpp:167:29
        #19 0x7feff1522242 in nsGlobalWindowInner::RunTimeoutHandler(mozilla::dom::Timeout*, nsIScriptContext*) /dom/base/nsGlobalWindowInner.cpp:6478:38
        #20 0x7feff186bada in mozilla::dom::TimeoutManager::RunTimeout(mozilla::TimeStamp const&, mozilla::TimeStamp const&, bool) /dom/base/TimeoutManager.cpp:903:44
        #21 0x7feff1858390 in mozilla::dom::TimeoutExecutor::MaybeExecute() /dom/base/TimeoutExecutor.cpp:179:11
        #22 0x7feff1858939 in Notify /dom/base/TimeoutExecutor.cpp:246:5
        #23 0x7feff1858939 in non-virtual thunk to mozilla::dom::TimeoutExecutor::Notify(nsITimer*) /dom/base/TimeoutExecutor.cpp
        #24 0x7fefefc82bdc in operator() /xpcom/threads/nsTimerImpl.cpp:657:44
        #25 0x7fefefc82bdc in matchN<mozilla::Variant<nsTimerImpl::UnknownCallback, nsCOMPtr<nsITimerCallback>, nsCOMPtr<nsIObserver>, nsTimerImpl::FuncCallback, nsTimerImpl::ClosureCallback> &, (lambda at /xpcom/threads/nsTimerImpl.cpp:657:7), (lambda at /xpcom/threads/nsTimerImpl.cpp:658:7), (lambda at /xpcom/threads/nsTimerImpl.cpp:661:7), (lambda at /xpcom/threads/nsTimerImpl.cpp:662:7)> /builds/worker/workspace/obj-build/dist/include/mozilla/Variant.h:309:16
        #26 0x7fefefc82bdc in matchN<mozilla::Variant<nsTimerImpl::UnknownCallback, nsCOMPtr<nsITimerCallback>, nsCOMPtr<nsIObserver>, nsTimerImpl::FuncCallback, nsTimerImpl::ClosureCallback> &, (lambda at /xpcom/threads/nsTimerImpl.cpp:656:7), (lambda at /xpcom/threads/nsTimerImpl.cpp:657:7), (lambda at /xpcom/threads/nsTimerImpl.cpp:658:7), (lambda at /xpcom/threads/nsTimerImpl.cpp:661:7), (lambda at /xpcom/threads/nsTimerImpl.cpp:662:7)> /builds/worker/workspace/obj-build/dist/include/mozilla/Variant.h:318:14
        #27 0x7fefefc82bdc in matchN<mozilla::Variant<nsTimerImpl::UnknownCallback, nsCOMPtr<nsITimerCallback>, nsCOMPtr<nsIObserver>, nsTimerImpl::FuncCallback, nsTimerImpl::ClosureCallback> &, (lambda at /xpcom/threads/nsTimerImpl.cpp:656:7), (lambda at /xpcom/threads/nsTimerImpl.cpp:657:7), (lambda at /xpcom/threads/nsTimerImpl.cpp:658:7), (lambda at /xpcom/threads/nsTimerImpl.cpp:661:7), (lambda at /xpcom/threads/nsTimerImpl.cpp:662:7)> /builds/worker/workspace/obj-build/dist/include/mozilla/Variant.h:902:12
        #28 0x7fefefc82bdc in match<(lambda at /xpcom/threads/nsTimerImpl.cpp:656:7), (lambda at /xpcom/threads/nsTimerImpl.cpp:657:7), (lambda at /xpcom/threads/nsTimerImpl.cpp:658:7), (lambda at /xpcom/threads/nsTimerImpl.cpp:661:7), (lambda at /xpcom/threads/nsTimerImpl.cpp:662:7)> /builds/worker/workspace/obj-build/dist/include/mozilla/Variant.h:857:12
        #29 0x7fefefc82bdc in nsTimerImpl::Fire(int) /xpcom/threads/nsTimerImpl.cpp:655:22
        #30 0x7fefefc51e7e in nsTimerEvent::Run() /xpcom/threads/TimerThread.cpp:365:11
        #31 0x7fefefc7367d in mozilla::ThrottledEventQueue::Inner::ExecuteRunnable() /xpcom/threads/ThrottledEventQueue.cpp:254:22
        #32 0x7fefefc6dd61 in mozilla::ThrottledEventQueue::Inner::Executor::Run() /xpcom/threads/ThrottledEventQueue.cpp:81:15
        #33 0x7fefefc70e9e in mozilla::RunnableTask::Run() /xpcom/threads/TaskController.cpp:538:16
        #34 0x7fefefc493b9 in mozilla::TaskController::DoExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) /xpcom/threads/TaskController.cpp:851:26
        #35 0x7fefefc47f43 in mozilla::TaskController::ExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) /xpcom/threads/TaskController.cpp:683:15
        #36 0x7fefefc481b3 in mozilla::TaskController::ProcessPendingMTTask(bool) /xpcom/threads/TaskController.cpp:461:36
        #37 0x7fefefc747b9 in operator() /xpcom/threads/TaskController.cpp:190:37
        #38 0x7fefefc747b9 in mozilla::detail::RunnableFunction<mozilla::TaskController::InitializeInternal()::$_1>::Run() /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:531:5
        #39 0x7fefefc5e00f in nsThread::ProcessNextEvent(bool, bool*) /xpcom/threads/nsThread.cpp:1205:16
        #40 0x7fefefc6461d in NS_ProcessNextEvent(nsIThread*, bool) /xpcom/threads/nsThreadUtils.cpp:465:10
        #41 0x7feff084fdf4 in mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) /ipc/glue/MessagePump.cpp:107:5
        #42 0x7feff0773f87 in MessageLoop::RunInternal() /ipc/chromium/src/base/message_loop.cc:381:10
        #43 0x7feff0773e92 in RunHandler /ipc/chromium/src/base/message_loop.cc:374:3
        #44 0x7feff0773e92 in MessageLoop::Run() /ipc/chromium/src/base/message_loop.cc:356:3
        #45 0x7feff4ca47b8 in nsBaseAppShell::Run() /widget/nsBaseAppShell.cpp:150:27
        #46 0x7feff6eb5d9b in XRE_RunAppShell() /toolkit/xre/nsEmbedFunctions.cpp:880:20
        #47 0x7feff0850d3a in mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) /ipc/glue/MessagePump.cpp:235:9
        #48 0x7feff0773f87 in MessageLoop::RunInternal() /ipc/chromium/src/base/message_loop.cc:381:10
        #49 0x7feff0773e92 in RunHandler /ipc/chromium/src/base/message_loop.cc:374:3
        #50 0x7feff0773e92 in MessageLoop::Run() /ipc/chromium/src/base/message_loop.cc:356:3
        #51 0x7feff6eb537e in XRE_InitChildProcess(int, char**, XREChildData const*) /toolkit/xre/nsEmbedFunctions.cpp:739:34
        #52 0x558ef0f5bc19 in content_process_main /browser/app/../../ipc/contentproc/plugin-container.cpp:57:28
        #53 0x558ef0f5bc19 in main /browser/app/nsBrowserApp.cpp:357:18
        #54 0x7ff0075fdd8f in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
        #55 0x7ff0075fde3f in __libc_start_main csu/../csu/libc-start.c:392:3
        #56 0x558ef0f318dc in _start (/home/jkratzer/builds/m-c-20221017213658-fuzzing-debug/firefox-bin+0x168dc) (BuildId: e4d97be5cca191e5ece6a371c51600a45f207fb2)
    
    UndefinedBehaviorSanitizer can not provide additional info.
    SUMMARY: UndefinedBehaviorSanitizer: SEGV /ipc/glue/Shmem.cpp:251:3 in mozilla::ipc::Shmem::AssertInvariants() const
    ==609774==ABORTING
Attached file Testcase

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

Start: 0274cb297f00e9163de83c2d4c02ac935e90e88d (20220120141258)
End: 2c37aa3ea90beb833b3779e935131922245899fd (20220120164800)
Pushlog: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=0274cb297f00e9163de83c2d4c02ac935e90e88d&tochange=2c37aa3ea90beb833b3779e935131922245899fd

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

A pernosco session for this bug can be found here

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)

I suspect that this is fixed now.

Flags: needinfo?(jimb)
Severity: -- → S3
Priority: -- → P3
Whiteboard: [bugmon:bisected,confirmed] → [bugmon:bisected,confirm]

Verified bug as reproducible on mozilla-central 20221118154632-3b5a8f67189b.
The bug appears to have been introduced in the following build range:

Start: 0274cb297f00e9163de83c2d4c02ac935e90e88d (20220120141258)
End: 2c37aa3ea90beb833b3779e935131922245899fd (20220120164800)
Pushlog: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=0274cb297f00e9163de83c2d4c02ac935e90e88d&tochange=2c37aa3ea90beb833b3779e935131922245899fd

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

Testcase crashes using the initial build (mozilla-central 20221017213658-ac1330b68d3e) but not with tip (mozilla-central 20221231091949-81f62de2d85e.)

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

Start: 7fd7ff625ea039d48869cc6a3d015e561da0bb64 (20221220091236)
End: 6a46ccc50745ad60fac15bd5279824136588026a (20221220111709)
Pushlog: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=7fd7ff625ea039d48869cc6a3d015e561da0bb64&tochange=6a46ccc50745ad60fac15bd5279824136588026a

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?(jkratzer)
Keywords: bugmon

:nical, can you confirm that this was fixed via bug 1800430?

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

Yes, that would make most sense.

Flags: needinfo?(nical.bugzilla)
Assignee: nobody → nical.bugzilla
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED

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

:nical, if possible, could you fill the Regressed by field?

For more information, please visit auto_nag documentation.

Flags: needinfo?(nical.bugzilla)

bug 1750866 is the only likely cause in that range although it is not obvious why it caused the regression.

Flags: needinfo?(nical.bugzilla)
Regressed by: 1750866

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

QA Whiteboard: [qa-110b-p2]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: