Memory reporter can allow a child to trigger reports
Categories
(Core :: IPC, task, P3)
Tracking
()
People
(Reporter: gerard-majax, Unassigned)
References
Details
As highlighted by this autoland failure: https://treeherder.mozilla.org/jobs?repo=autoland&revision=8d5c1ea08ed032e0c24cfc134470741728001bf3&selectedTaskRun=frkhdwqBRYS3gCsa2CSU0g.0
[task 2022-02-04T17:52:51.441Z] 17:52:51 INFO - #33: js::Proxy::call(JSContext*, JS::Handle<JSObject*>, JS::CallArgs const&) [js/src/proxy/Proxy.cpp:654]
[task 2022-02-04T17:52:51.441Z] 17:52:51 INFO - #34: js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) [js/src/vm/Interpreter.cpp:492]
[task 2022-02-04T17:52:51.443Z] 17:52:51 INFO - #35: InternalCall(JSContext*, js::AnyInvokeArgs const&, js::CallReason) [js/src/vm/Interpreter.cpp:572]
[task 2022-02-04T17:52:51.444Z] 17:52:51 INFO - #36: Interpret(JSContext*, js::RunState&) [js/src/vm/Interpreter.cpp:3309]
[task 2022-02-04T17:52:51.445Z] 17:52:51 INFO - #37: js::RunScript(JSContext*, js::RunState&) [js/src/vm/Interpreter.cpp:394]
[task 2022-02-04T17:52:51.446Z] 17:52:51 INFO - #38: js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) [js/src/vm/Interpreter.cpp:544]
[task 2022-02-04T17:52:51.447Z] 17:52:51 INFO - #39: InternalCall(JSContext*, js::AnyInvokeArgs const&, js::CallReason) [js/src/vm/Interpreter.cpp:572]
[task 2022-02-04T17:52:51.448Z] 17:52:51 INFO - #40: 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:589]
[task 2022-02-04T17:52:51.451Z] 17:52:51 INFO - #41: JS::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::HandleValueArray const&, JS::MutableHandle<JS::Value>) [js/src/vm/CallAndConstruct.cpp:117]
[task 2022-02-04T17:52:51.452Z] 17:52:51 INFO - #42: 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]
[task 2022-02-04T17:52:51.453Z] 17:52:51 INFO - #43: 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]
[task 2022-02-04T17:52:51.454Z] 17:52:51 INFO - #44: mozilla::JSEventHandler::HandleEvent(mozilla::dom::Event*) [dom/events/JSEventHandler.cpp:201]
[task 2022-02-04T17:52:51.455Z] 17:52:51 INFO - #45: mozilla::EventListenerManager::HandleEventSubType(mozilla::EventListenerManager::Listener*, mozilla::dom::Event*, mozilla::dom::EventTarget*) [dom/events/EventListenerManager.cpp:1314]
[task 2022-02-04T17:52:51.459Z] 17:52:51 INFO - #46: mozilla::EventListenerManager::HandleEventInternal(nsPresContext*, mozilla::WidgetEvent*, mozilla::dom::Event**, mozilla::dom::EventTarget*, nsEventStatus*, bool) [dom/events/EventListenerManager.cpp:1505]
[task 2022-02-04T17:52:51.460Z] 17:52:51 INFO - #47: mozilla::EventTargetChainItem::HandleEvent(mozilla::EventChainPostVisitor&, mozilla::ELMCreationDetector&) [dom/events/EventDispatcher.cpp:351]
[task 2022-02-04T17:52:51.460Z] 17:52:51 INFO - #48: mozilla::EventTargetChainItem::HandleEventTargetChain(nsTArray<mozilla::EventTargetChainItem>&, mozilla::EventChainPostVisitor&, mozilla::EventDispatchingCallback*, mozilla::ELMCreationDetector&) [dom/events/EventDispatcher.cpp:550]
[task 2022-02-04T17:52:51.461Z] 17:52:51 INFO - #49: mozilla::EventDispatcher::Dispatch(nsISupports*, nsPresContext*, mozilla::WidgetEvent*, mozilla::dom::Event*, nsEventStatus*, mozilla::EventDispatchingCallback*, nsTArray<mozilla::dom::EventTarget*>*) [dom/events/EventDispatcher.cpp:1085]
[task 2022-02-04T17:52:51.462Z] 17:52:51 INFO - #50: mozilla::EventDispatcher::DispatchDOMEvent(nsISupports*, mozilla::WidgetEvent*, mozilla::dom::Event*, nsPresContext*, nsEventStatus*) [dom/events/EventDispatcher.cpp:1202]
[task 2022-02-04T17:52:51.463Z] 17:52:51 INFO - #51: mozilla::DOMEventTargetHelper::DispatchEvent(mozilla::dom::Event&, mozilla::dom::CallerType, mozilla::ErrorResult&) [dom/events/DOMEventTargetHelper.cpp:181]
[task 2022-02-04T17:52:51.463Z] 17:52:51 INFO - #52: mozilla::dom::EventTarget::DispatchEvent(mozilla::dom::Event&, mozilla::ErrorResult&) [dom/events/EventTarget.cpp:186]
[task 2022-02-04T17:52:51.464Z] 17:52:51 INFO - #53: mozilla::DOMEventTargetHelper::DispatchTrustedEvent(mozilla::dom::Event*) [dom/events/DOMEventTargetHelper.cpp:203]
[task 2022-02-04T17:52:51.467Z] 17:52:51 INFO - #54: mozilla::DOMEventTargetHelper::DispatchTrustedEvent(nsTSubstring<char16_t> const&) [dom/events/DOMEventTargetHelper.cpp:195]
[task 2022-02-04T17:52:51.468Z] 17:52:51 INFO - #55: mozilla::dom::OscillatorNode::NotifyMainThreadTrackEnded()::EndedEventDispatcher::Run() [dom/media/webaudio/OscillatorNode.cpp:525]
[task 2022-02-04T17:52:51.469Z] 17:52:51 INFO - #56: mozilla::AutoTaskDispatcher::TaskGroupRunnable::Run() [xpcom/threads/TaskDispatcher.h:233]
[task 2022-02-04T17:52:51.469Z] 17:52:51 INFO - #57: mozilla::XPCOMThreadWrapper::Runner::Run() [xpcom/threads/AbstractThread.cpp:213]
[task 2022-02-04T17:52:51.470Z] 17:52:51 INFO - #58: mozilla::RunnableTask::Run() [xpcom/threads/TaskController.cpp:468]
[task 2022-02-04T17:52:51.471Z] 17:52:51 INFO - #59: mozilla::TaskController::DoExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) [xpcom/threads/TaskController.cpp:770]
[task 2022-02-04T17:52:51.472Z] 17:52:51 INFO - #60: mozilla::TaskController::ExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) [xpcom/threads/TaskController.cpp:606]
[task 2022-02-04T17:52:51.473Z] 17:52:51 INFO - #61: mozilla::TaskController::ProcessPendingMTTask(bool) [xpcom/threads/TaskController.cpp:390]
[task 2022-02-04T17:52:51.474Z] 17:52:51 INFO - #62: mozilla::detail::RunnableFunction<mozilla::TaskController::InitializeInternal()::$_1>::Run() [xpcom/threads/nsThreadUtils.h:532]
[task 2022-02-04T17:52:51.475Z] 17:52:51 INFO - #63: nsThread::ProcessNextEvent(bool, bool*) [xpcom/threads/nsThread.cpp:1199]
[task 2022-02-04T17:52:51.475Z] 17:52:51 INFO - #64: NS_ProcessNextEvent(nsIThread*, bool) [xpcom/threads/nsThreadUtils.cpp:467]
[task 2022-02-04T17:52:51.476Z] 17:52:51 INFO - #65: nsThread::Shutdown() [xpcom/threads/nsThread.cpp:885]
[task 2022-02-04T17:52:51.477Z] 17:52:51 INFO - #66: mozilla::MediaTrackGraphShutdownThreadRunnable::Run() [dom/media/GraphDriver.cpp:87]
[task 2022-02-04T17:52:51.477Z] 17:52:51 INFO - #67: mozilla::SchedulerGroup::Runnable::Run() [xpcom/threads/SchedulerGroup.cpp:140]
[task 2022-02-04T17:52:51.478Z] 17:52:51 INFO - #68: mozilla::RunnableTask::Run() [xpcom/threads/TaskController.cpp:468]
[task 2022-02-04T17:52:51.480Z] 17:52:51 INFO - #69: mozilla::TaskController::DoExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) [xpcom/threads/TaskController.cpp:770]
[task 2022-02-04T17:52:51.481Z] 17:52:51 INFO - #70: mozilla::TaskController::ExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) [xpcom/threads/TaskController.cpp:606]
[task 2022-02-04T17:52:51.482Z] 17:52:51 INFO - #71: mozilla::TaskController::ProcessPendingMTTask(bool) [xpcom/threads/TaskController.cpp:390]
[task 2022-02-04T17:52:51.482Z] 17:52:51 INFO - #72: mozilla::detail::RunnableFunction<mozilla::TaskController::InitializeInternal()::$_0>::Run() [xpcom/threads/nsThreadUtils.h:532]
[task 2022-02-04T17:52:51.483Z] 17:52:51 INFO - #73: nsThread::ProcessNextEvent(bool, bool*) [xpcom/threads/nsThread.cpp:1199]
[task 2022-02-04T17:52:51.484Z] 17:52:51 INFO - #74: NS_ProcessNextEvent(nsIThread*, bool) [xpcom/threads/nsThreadUtils.cpp:467]
[task 2022-02-04T17:52:51.485Z] 17:52:51 INFO - #75: mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) [ipc/glue/MessagePump.cpp:85]
[task 2022-02-04T17:52:51.485Z] 17:52:51 INFO - #76: MessageLoop::RunInternal() [ipc/chromium/src/base/message_loop.cc:331]
[task 2022-02-04T17:52:51.486Z] 17:52:51 INFO - #77: MessageLoop::Run() [ipc/chromium/src/base/message_loop.cc:307]
[task 2022-02-04T17:52:51.486Z] 17:52:51 INFO - #78: nsBaseAppShell::Run() [widget/nsBaseAppShell.cpp:139]
[task 2022-02-04T17:52:51.487Z] 17:52:51 INFO - #79: XRE_RunAppShell() [toolkit/xre/nsEmbedFunctions.cpp:878]
[task 2022-02-04T17:52:51.488Z] 17:52:51 INFO - #80: mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) [ipc/glue/MessagePump.cpp:235]
[task 2022-02-04T17:52:51.489Z] 17:52:51 INFO - #81: MessageLoop::RunInternal() [ipc/chromium/src/base/message_loop.cc:331]
[task 2022-02-04T17:52:51.489Z] 17:52:51 INFO - #82: MessageLoop::Run() [ipc/chromium/src/base/message_loop.cc:307]
[task 2022-02-04T17:52:51.490Z] 17:52:51 INFO - #83: XRE_InitChildProcess(int, char**, XREChildData const*) [toolkit/xre/nsEmbedFunctions.cpp:715]
[task 2022-02-04T17:52:51.491Z] 17:52:51 INFO - #84: content_process_main(mozilla::Bootstrap*, int, char**) [ipc/contentproc/plugin-container.cpp:58]
[task 2022-02-04T17:52:51.491Z] 17:52:51 INFO - #85: main [browser/app/nsBrowserApp.cpp:327]
[task 2022-02-04T17:52:51.492Z] 17:52:51 INFO - #86: __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6 + 0x21b97]
[task 2022-02-04T17:52:51.493Z] 17:52:51 INFO - #87: ??? [/builds/worker/workspace/build/application/firefox/firefox-bin + 0x42be9]
Some tests are actually triggering memory report from the child process instead of a parent process
https://searchfox.org/mozilla-central/rev/bb14d901ac16633801b7f4adaa4fb104e6f072e4/dom/media/test/crashtests/convolver-memory-report-1.html#20
https://searchfox.org/mozilla-central/rev/bb14d901ac16633801b7f4adaa4fb104e6f072e4/dom/media/mediasource/test/test_MediaSource_memory_reporting.html#37
Comment 1•3 years ago
|
||
I don't think it is a real issue that the you can get a memory report in the child process, but in that case we should skip the chunk of code that is all about dispatching to our child processes to get memory reports from them. Nika pointed out that this probably dates to the B2G era, where there could be more complex hierarchies of processes.
Comment 2•3 years ago
|
||
(In reply to Andrew McCreight [:mccr8] from comment #1)
I don't think it is a real issue that the you can get a memory report in the child process, but in that case we should skip the chunk of code that is all about dispatching to our child processes to get memory reports from them. Nika pointed out that this probably dates to the B2G era, where there could be more complex hierarchies of processes.
For what it's worth, I don't think nested child processes ever shipped anywhere, although in the early days people might have wanted to keep it as a possibility. B2G had a single level of child processes (and setuid
ed them following the Android app convention) by the time I was dealing with it, and the XUL-Fennec era was before my time but I think that only ever had a single content process.
Updated•3 years ago
|
Description
•