Closed Bug 1763215 Opened 3 years ago Closed 3 years ago

Assertion failure: XRE_IsParentProcess(), at /builds/worker/checkouts/gecko/xpcom/io/nsAnonymousTemporaryFile.cpp:80

Categories

(Core :: Print Preview, defect)

Unspecified
Android
defect

Tracking

()

RESOLVED DUPLICATE of bug 1762428
Tracking Status
firefox-esr91 --- unaffected
firefox99 --- unaffected
firefox100 --- affected
firefox101 --- affected

People

(Reporter: tsmith, Unassigned)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: testcase, Whiteboard: [fuzzblocker])

Attachments

(1 file)

Attached file testcase.html (deleted) —

This was first found while fuzzing m-c 20220331-260e22f03e98 (--enable-debug --enable-fuzzing). The last known good build was m-c 20220330-6cbdaf0ec974.

This is hit frequently (easily triggered by fuzzers) and is impacting the performace of fuzzing on Android.

Builds are available here: https://firefox-ci-tc.services.mozilla.com/tasks/index/gecko.v2.mozilla-central.latest.mobile/android-x86-fuzzing-debug

Assertion failure: XRE_IsParentProcess(), at /builds/worker/checkouts/gecko/xpcom/io/nsAnonymousTemporaryFile.cpp:80

eip = 0xe03fd682   esp = 0xeba98d70   ebp = 0xeba98df8   ebx = 0xea4a3bcc
esi = 0x00000050   edi = 0xcfa5660c   eax = 0xe6b0a917   ecx = 0xeb0fac74
edx = 0x00000000   efl = 0x00210282
OS|Android|0.0.0 Linux 5.4.86-android11-2-00006-gae78026f427c-ab7595864 #1 SMP PREEMPT Thu Jul 29 20:54:47 UTC 2021 i686
CPU|x86|GenuineIntel family 6 model 6 stepping 3|4
GPU|||
Crash|SIGSEGV /SEGV_MAPERR|0x0|13
13|0|libxul.so|NS_OpenAnonymousTemporaryNsIFile(nsIFile**)|hg:hg.mozilla.org/mozilla-central:xpcom/io/nsAnonymousTemporaryFile.cpp:8d8a4fb2551795333511633583a311534272d9a1|80|0x29
13|1|libxul.so|nsDeviceContextSpecAndroid::MakePrintTarget()|hg:hg.mozilla.org/mozilla-central:widget/android/nsDeviceContextAndroid.cpp:8d8a4fb2551795333511633583a311534272d9a1|37|0x6b
13|2|libxul.so|nsDeviceContext::InitForPrinting(nsIDeviceContextSpec*)|hg:hg.mozilla.org/mozilla-central:gfx/src/nsDeviceContext.cpp:8d8a4fb2551795333511633583a311534272d9a1|268|0xd
13|3|libxul.so|nsPrintJob::DoCommonPrint(bool, nsIPrintSettings*, nsIWebProgressListener*, mozilla::dom::Document*)|hg:hg.mozilla.org/mozilla-central:layout/printing/nsPrintJob.cpp:8d8a4fb2551795333511633583a311534272d9a1|606|0x22
13|4|libxul.so|nsPrintJob::CommonPrint(bool, nsIPrintSettings*, nsIWebProgressListener*, mozilla::dom::Document*)|hg:hg.mozilla.org/mozilla-central:layout/printing/nsPrintJob.cpp:8d8a4fb2551795333511633583a311534272d9a1|457|0x17
13|5|libxul.so|nsPrintJob::PrintPreview(mozilla::dom::Document*, nsIPrintSettings*, nsIWebProgressListener*, std::__ndk1::function<void (mozilla::dom::PrintPreviewResultInfo const&)>&&)|hg:hg.mozilla.org/mozilla-central:layout/printing/nsPrintJob.cpp:8d8a4fb2551795333511633583a311534272d9a1|641|0x12
13|6|libxul.so|nsDocumentViewer::PrintPreview(nsIPrintSettings*, nsIWebProgressListener*, std::__ndk1::function<void (mozilla::dom::PrintPreviewResultInfo const&)>&&)|hg:hg.mozilla.org/mozilla-central:layout/base/nsDocumentViewer.cpp:8d8a4fb2551795333511633583a311534272d9a1|2979|0x1b
13|7|libxul.so|{virtual override thunk({offset(-12)}, nsDocumentViewer::PrintPreview(nsIPrintSettings*, nsIWebProgressListener*, std::__ndk1::function<void (mozilla::dom::PrintPreviewResultInfo const&)>&&))}|||0x28
13|8|libxul.so|nsGlobalWindowOuter::Print(nsIPrintSettings*, nsIWebProgressListener*, nsIDocShell*, nsGlobalWindowOuter::IsPreview, nsGlobalWindowOuter::IsForWindowDotPrint, std::__ndk1::function<void (mozilla::dom::PrintPreviewResultInfo const&)>&&, mozilla::ErrorResult&)|hg:hg.mozilla.org/mozilla-central:dom/base/nsGlobalWindowOuter.cpp:8d8a4fb2551795333511633583a311534272d9a1|5308|0x14
13|9|libxul.so|nsGlobalWindowInner::PrintPreview(nsIPrintSettings*, nsIWebProgressListener*, nsIDocShell*, mozilla::ErrorResult&)|hg:hg.mozilla.org/mozilla-central:dom/base/nsGlobalWindowInner.cpp:8d8a4fb2551795333511633583a311534272d9a1|3852|0x30
13|10|libxul.so|mozilla::dom::Window_Binding::printPreview(JSContext*, JS::Handle<JSObject*>, void*, JSJitMethodCallArgs const&)|s3:gecko-generated-sources:bd3f73a9296797f0346eaa2a574762b4f7fbef89db16bd226512a268f7cba78135e61262b3d77313429341bb9053742cb8c7aa7d406d27b1fd3e65f34b1a75af/dom/bindings/WindowBinding.cpp:|3216|0x1e
13|11|libxul.so|bool mozilla::dom::binding_detail::GenericMethod<mozilla::dom::binding_detail::MaybeCrossOriginObjectThisPolicy, mozilla::dom::binding_detail::ThrowExceptions>(JSContext*, unsigned int, JS::Value*)|hg:hg.mozilla.org/mozilla-central:dom/bindings/BindingUtils.cpp:8d8a4fb2551795333511633583a311534272d9a1|3303|0x22
13|12|libxul.so|CallJSNative(JSContext*, bool (*)(JSContext*, unsigned int, JS::Value*), js::CallReason, JS::CallArgs const&)|hg:hg.mozilla.org/mozilla-central:js/src/vm/Interpreter.cpp:8d8a4fb2551795333511633583a311534272d9a1|420|0x18
13|13|libxul.so|js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason)|hg:hg.mozilla.org/mozilla-central:js/src/vm/Interpreter.cpp:8d8a4fb2551795333511633583a311534272d9a1|507|0x1a
13|14|libxul.so|InternalCall(JSContext*, js::AnyInvokeArgs const&, js::CallReason)|hg:hg.mozilla.org/mozilla-central:js/src/vm/Interpreter.cpp:8d8a4fb2551795333511633583a311534272d9a1|567|0x1b
13|15|libxul.so|Interpret(JSContext*, js::RunState&)|hg:hg.mozilla.org/mozilla-central:js/src/vm/Interpreter.cpp:8d8a4fb2551795333511633583a311534272d9a1|3293|0x15
13|16|libxul.so|js::RunScript(JSContext*, js::RunState&)|hg:hg.mozilla.org/mozilla-central:js/src/vm/Interpreter.cpp:8d8a4fb2551795333511633583a311534272d9a1|389|0xb
13|17|libxul.so|js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason)|hg:hg.mozilla.org/mozilla-central:js/src/vm/Interpreter.cpp:8d8a4fb2551795333511633583a311534272d9a1|539|0xf
13|18|libxul.so|InternalCall(JSContext*, js::AnyInvokeArgs const&, js::CallReason)|hg:hg.mozilla.org/mozilla-central:js/src/vm/Interpreter.cpp:8d8a4fb2551795333511633583a311534272d9a1|567|0x1b
13|19|libxul.so|js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>, js::CallReason)|hg:hg.mozilla.org/mozilla-central:js/src/vm/Interpreter.cpp:8d8a4fb2551795333511633583a311534272d9a1|584|0xa
13|20|libxul.so|JS::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::HandleValueArray const&, JS::MutableHandle<JS::Value>)|hg:hg.mozilla.org/mozilla-central:js/src/vm/CallAndConstruct.cpp:8d8a4fb2551795333511633583a311534272d9a1|117|0x45
13|21|libxul.so|mozilla::dom::EventHandlerNonNull::Call(mozilla::dom::BindingCallContext&, JS::Handle<JS::Value>, mozilla::dom::Event&, JS::MutableHandle<JS::Value>, mozilla::ErrorResult&)|s3:gecko-generated-sources:752d510c013f184c89765d9e15bc81e3d553c1027d268c2a10b326fa0879cdc64a7b15d3ff913a629859995fbca36e2fb8e08d0ce28741172b49a4acc243af52/dom/bindings/EventHandlerBinding.cpp:|283|0x24
13|22|libxul.so|void mozilla::dom::EventHandlerNonNull::Call<nsCOMPtr<mozilla::dom::EventTarget> >(nsCOMPtr<mozilla::dom::EventTarget> const&, mozilla::dom::Event&, JS::MutableHandle<JS::Value>, mozilla::ErrorResult&, char const*, mozilla::dom::CallbackObject::ExceptionHandling, JS::Realm*)|s3:gecko-generated-sources:ea4897bded50d56f2f78694320c1b2c46f3a66f9184e8f65795c430d16250e9218d73a64d4f04ee05e45cd52108cd74904218e99eb63bfd44a4fe47fea124f96/dist/include/mozilla/dom/EventHandlerBinding.h:|365|0x40
13|23|libxul.so|mozilla::JSEventHandler::HandleEvent(mozilla::dom::Event*)|hg:hg.mozilla.org/mozilla-central:dom/events/JSEventHandler.cpp:8d8a4fb2551795333511633583a311534272d9a1|201|0x4a
13|24|libxul.so|mozilla::EventListenerManager::HandleEventSubType(mozilla::EventListenerManager::Listener*, mozilla::dom::Event*, mozilla::dom::EventTarget*)|hg:hg.mozilla.org/mozilla-central:dom/events/EventListenerManager.cpp:8d8a4fb2551795333511633583a311534272d9a1|1316|0xc
13|25|libxul.so|mozilla::EventListenerManager::HandleEventInternal(nsPresContext*, mozilla::WidgetEvent*, mozilla::dom::Event**, mozilla::dom::EventTarget*, nsEventStatus*, bool)|hg:hg.mozilla.org/mozilla-central:dom/events/EventListenerManager.cpp:8d8a4fb2551795333511633583a311534272d9a1|1507|0x1c
13|26|libxul.so|mozilla::EventTargetChainItem::HandleEvent(mozilla::EventChainPostVisitor&, mozilla::ELMCreationDetector&)|hg:hg.mozilla.org/mozilla-central:dom/events/EventDispatcher.cpp:8d8a4fb2551795333511633583a311534272d9a1|348|0x18
13|27|libxul.so|mozilla::EventTargetChainItem::HandleEventTargetChain(nsTArray<mozilla::EventTargetChainItem>&, mozilla::EventChainPostVisitor&, mozilla::EventDispatchingCallback*, mozilla::ELMCreationDetector&)|hg:hg.mozilla.org/mozilla-central:dom/events/EventDispatcher.cpp:8d8a4fb2551795333511633583a311534272d9a1|550|0x16
13|28|libxul.so|mozilla::EventDispatcher::Dispatch(nsISupports*, nsPresContext*, mozilla::WidgetEvent*, mozilla::dom::Event*, nsEventStatus*, mozilla::EventDispatchingCallback*, nsTArray<mozilla::dom::EventTarget*>*)|hg:hg.mozilla.org/mozilla-central:dom/events/EventDispatcher.cpp:8d8a4fb2551795333511633583a311534272d9a1|1119|0x23
13|29|libxul.so|mozilla::EventDispatcher::DispatchDOMEvent(nsISupports*, mozilla::WidgetEvent*, mozilla::dom::Event*, nsPresContext*, nsEventStatus*)|hg:hg.mozilla.org/mozilla-central:dom/events/EventDispatcher.cpp:8d8a4fb2551795333511633583a311534272d9a1|1236|0x17
13|30|libxul.so|nsINode::DispatchEvent(mozilla::dom::Event&, mozilla::dom::CallerType, mozilla::ErrorResult&)|hg:hg.mozilla.org/mozilla-central:dom/base/nsINode.cpp:8d8a4fb2551795333511633583a311534272d9a1|1354|0x1f
13|31|libxul.so|nsContentUtils::DispatchEvent(mozilla::dom::Document*, nsISupports*, nsTSubstring<char16_t> const&, mozilla::CanBubble, mozilla::Cancelable, mozilla::Composed, mozilla::Trusted, bool*, mozilla::ChromeOnlyDispatch)|hg:hg.mozilla.org/mozilla-central:dom/base/nsContentUtils.cpp:8d8a4fb2551795333511633583a311534272d9a1|4332|0x2d
13|32|libxul.so|nsContentUtils::DispatchTrustedEvent(mozilla::dom::Document*, nsISupports*, nsTSubstring<char16_t> const&, mozilla::CanBubble, mozilla::Cancelable, mozilla::Composed, bool*)|hg:hg.mozilla.org/mozilla-central:dom/base/nsContentUtils.cpp:8d8a4fb2551795333511633583a311534272d9a1|4302|0x1f
13|33|libxul.so|mozilla::dom::HTMLMediaElement::DispatchEvent(nsTSubstring<char16_t> const&)|hg:hg.mozilla.org/mozilla-central:dom/html/HTMLMediaElement.cpp:8d8a4fb2551795333511633583a311534272d9a1|6237|0x1f
13|34|libxul.so|mozilla::dom::nsMediaEventRunner::DispatchEvent(nsTSubstring<char16_t> const&)|hg:hg.mozilla.org/mozilla-central:dom/media/utils/MediaElementEventRunners.cpp:8d8a4fb2551795333511633583a311534272d9a1|27|0x20
13|35|libxul.so|mozilla::dom::nsAsyncEventRunner::Run()|hg:hg.mozilla.org/mozilla-central:dom/media/utils/MediaElementEventRunners.cpp:8d8a4fb2551795333511633583a311534272d9a1|41|0x1f
13|36|libxul.so|mozilla::SchedulerGroup::Runnable::Run()|hg:hg.mozilla.org/mozilla-central:xpcom/threads/SchedulerGroup.cpp:8d8a4fb2551795333511633583a311534272d9a1|140|0x10
13|37|libxul.so|mozilla::RunnableTask::Run()|hg:hg.mozilla.org/mozilla-central:xpcom/threads/TaskController.cpp:8d8a4fb2551795333511633583a311534272d9a1|467|0x10
13|38|libxul.so|mozilla::TaskController::DoExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/TaskController.cpp:8d8a4fb2551795333511633583a311534272d9a1|778|0x8
13|39|libxul.so|mozilla::TaskController::ExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/TaskController.cpp:8d8a4fb2551795333511633583a311534272d9a1|612|0xc
13|40|libxul.so|mozilla::TaskController::ProcessPendingMTTask(bool)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/TaskController.cpp:8d8a4fb2551795333511633583a311534272d9a1|390|0x12
13|41|libxul.so|mozilla::detail::RunnableFunction<mozilla::TaskController::InitializeInternal()::$_0>::Run()|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThreadUtils.h:8d8a4fb2551795333511633583a311534272d9a1|531|0x20
13|42|libxul.so|nsThread::ProcessNextEvent(bool, bool*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:8d8a4fb2551795333511633583a311534272d9a1|1187|0x10
13|43|libxul.so|NS_ProcessNextEvent(nsIThread*, bool)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThreadUtils.cpp:8d8a4fb2551795333511633583a311534272d9a1|465|0x11
13|44|libxul.so|mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessagePump.cpp:8d8a4fb2551795333511633583a311534272d9a1|85|0xd
13|45|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:8d8a4fb2551795333511633583a311534272d9a1|380|0x16
13|46|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:8d8a4fb2551795333511633583a311534272d9a1|355|0xb
13|47|libxul.so|nsBaseAppShell::Run()|hg:hg.mozilla.org/mozilla-central:widget/nsBaseAppShell.cpp:8d8a4fb2551795333511633583a311534272d9a1|137|0xe
13|48|libxul.so|XRE_RunAppShell()|hg:hg.mozilla.org/mozilla-central:toolkit/xre/nsEmbedFunctions.cpp:8d8a4fb2551795333511633583a311534272d9a1|870|0x15
13|49|libxul.so|mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessagePump.cpp:8d8a4fb2551795333511633583a311534272d9a1|235|0x5
13|50|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:8d8a4fb2551795333511633583a311534272d9a1|380|0x16
13|51|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:8d8a4fb2551795333511633583a311534272d9a1|355|0xb
13|52|libxul.so|XRE_InitChildProcess(int, char**, XREChildData const*)|hg:hg.mozilla.org/mozilla-central:toolkit/xre/nsEmbedFunctions.cpp:8d8a4fb2551795333511633583a311534272d9a1|729|0xe
13|53|libxul.so|mozilla::BootstrapImpl::XRE_InitChildProcess(int, char**, XREChildData const*)|hg:hg.mozilla.org/mozilla-central:toolkit/xre/Bootstrap.cpp:8d8a4fb2551795333511633583a311534272d9a1|67|0x11
13|54|libmozglue.so|Java_org_mozilla_gecko_mozglue_GeckoLoader_nativeRun|hg:hg.mozilla.org/mozilla-central:mozglue/android/APKOpen.cpp:8d8a4fb2551795333511633583a311534272d9a1|400|0x1c
13|55|libart.so||||0x14a633

This call to NS_OpenAnonymousTemporaryNsIFile( was added in bug 1760836:
https://searchfox.org/mozilla-central/rev/911d1ebfb02cce4ff20f7ef965def04becfee710/widget/android/nsDeviceContextAndroid.cpp#44-47

Emilio, could you take a look here? It does look like we do gracefully-handle the possibility that this call fails; so, presumably failure is ~OK here, particularly if we're not the parent process.

Maybe we can just add an explicit XRE_IsParentProcess() check before we call NS_OpenAnonymousTemporaryNsIFile here?

Flags: needinfo?(emilio)
Regressed by: 1760836

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

Status: NEW → RESOLVED
Closed: 3 years ago
Flags: needinfo?(emilio)
Resolution: --- → DUPLICATE

Emilio, maybe you fix the core issue here (move the patch from bug 1762428 which is already reviewed) and then we can re-enable the wdspec tests on bug 1762428 once your patch to fix the regression landed? That way we would have the regression handled correctly.

Flags: needinfo?(emilio)

Sure

Flags: needinfo?(emilio)
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: