Closed
Bug 1158552
Opened 10 years ago
Closed 9 years ago
[e10s] NPP_DoNew deadlock
Categories
(Core Graveyard :: Plug-ins, defect)
Tracking
(e10s+, firefox40 affected)
RESOLVED
WORKSFORME
People
(Reporter: jimm, Unassigned)
References
Details
Attachments
(1 file)
(deleted),
text/html
|
Details |
This looks like a deadlock associated with async instantiation, but for that to happen, I would have expected the chrome main thread to be wrapped up in IPC code.
Bill, are we missing some context here on the chrome thread? Maybe the hang detector breaks us out of whatever we were hung up in?
https://developer.mozilla.org/en-US/docs/NPP_New
1924bbb7-ead9-4e0c-9ac5-c1c2c2150425
Windows 8.0, 6.2.9200
NPSWF32_17_0_0_169.dll
PLUGIN
-----------------------------------------------------------------------------------
0 KiFastSystemCallRet
1 NtWaitForMultipleObjects
2 InterlockedIncrement
3 NtUserScrollDC
4 MsgWaitForMultipleObjects
5 F_1152915508___________________________________
6 F2166389_____________________________________________________________________
7 F_917831355____________________________________________
8 F1315696776________________________________
9 F_1428703866________________________________
10 F845925699_____________________________________
11 F15952908_________________________________________________________
12 F1601322143_______________________________________________________________
13 mozilla::plugins::PluginInstanceChild::DoNPP_New() src
14 mozilla::plugins::PluginModuleChild::AnswerSyncNPP_New(mozilla::plugins::PPluginInstanceChild *,short *) src
15 mozilla::plugins::PPluginModuleChild::OnCallReceived(IPC::Message const &,IPC::Message * &) src
16 mozilla::ipc::MessageChannel::DispatchInterruptMessage(IPC::Message const &,unsigned int) src
17 mozilla::ipc::MessageChannel::OnMaybeDequeueOne() src
18 MessageLoop::DoWork() src
19 base::MessagePumpForUI::DoRunLoop() src
20 base::MessagePumpWin::RunWithDispatcher(base::MessagePump::Delegate *,base::MessagePumpWin::Dispatcher *) src
21 base::MessagePumpWin::Run(base::MessagePump::Delegate *) src
22 MessageLoop::RunInternal() src
23 MessageLoop::RunHandler() src
24 MessageLoop::Run() src
25 XRE_InitChildProcess src
26 content_process_main(int,char * * const) src
27 wmain src
28 __tmainCRTStartup
29 BaseThreadInitThunk
30 LdrpAllocateTls
31 LdrpAllocateTls
CONTENT
-----------------------------------------------------------------------------------
0 KiFastSystemCallRet
1 ZwWaitForSingleObject
2 WaitForSingleObjectEx
3 WaitForSingleObject
4 PR_WaitCondVar src
5 mozilla::CondVar::Wait(unsigned int) src
6 mozilla::ipc::MessageChannel::WaitForSyncNotify() src
7 mozilla::ipc::MessageChannel::Send(IPC::Message *,IPC::Message *) src
8 mozilla::dom::PBrowserChild::SendGetTabOffset(mozilla::gfx::IntPointTyped<mozilla::LayoutDevicePixel> *) src
9 nsPluginFrame::GetRemoteTabChromeOffset() src
10 nsPluginFrame::CallSetWindow(bool) src
11 nsPluginInstanceOwner::CallSetWindow() src
12 nsPluginHost::InstantiatePluginInstance(nsACString_internal const &,nsIURI *,nsObjectLoadingContent *,nsPluginInstanceOwner * *) src
13 nsObjectLoadingContent::InstantiatePluginInstance(bool) src
14 nsObjectLoadingContent::SyncStartPluginInstance() src
15 nsObjectLoadingContent::ScriptRequestPluginInstance(JSContext *,nsNPAPIPluginInstance * *) src
16 nsObjectLoadingContent::DoResolve(JSContext *,JS::Handle<JSObject *>,JS::Handle<jsid>,JS::MutableHandle<JSPropertyDescriptor>) src
17 mozilla::dom::HTMLObjectElementBinding::_resolve src
18 js::GetProperty(JSContext *,JS::Handle<JSObject *>,JS::Handle<JSObject *>,JS::Handle<jsid>,JS::MutableHandle<JS::Value>) src
19 GetPropertyOperation src
20 Interpret src
21 js::RunScript(JSContext *,js::RunState &) src
22 js::Invoke(JSContext *,JS::CallArgs,js::MaybeConstruct) src
23 js::fun_apply(JSContext *,unsigned int,JS::Value *) src
24 js::Invoke(JSContext *,JS::CallArgs,js::MaybeConstruct) src
25 Interpret src
26 js::RunScript(JSContext *,js::RunState &) src
27 js::Invoke(JSContext *,JS::CallArgs,js::MaybeConstruct) src
28 js::Invoke(JSContext *,JS::Value const &,JS::Value const &,unsigned int,JS::Value const *,JS::MutableHandle<JS::Value>) src
29 JS::Call(JSContext *,JS::Handle<JS::Value>,JS::Handle<JS::Value>,JS::HandleValueArray const &,JS::MutableHandle<JS::Value>) src
30 mozilla::dom::Function::Call(JSContext *,JS::Handle<JS::Value>,nsTArray<JS::Value> const &,JS::MutableHandle<JS::Value>,mozilla::ErrorResult &) src
31 mozilla::dom::Function::Call<nsCOMPtr<nsISupports> >(nsCOMPtr<nsISupports> const &,nsTArray<JS::Value> const &,JS::MutableHandle<JS::Value>,mozilla::ErrorResult &,char const *,mozilla::dom::CallbackObject::ExceptionHandling,JSCompartment *) src
32 nsGlobalWindow::RunTimeoutHandler(nsTimeout *,nsIScriptContext *) src
33 nsGlobalWindow::RunTimeout(nsTimeout *) src
34 nsGlobalWindow::TimerCallback(nsITimer *,void *) src
35 nsTimerImpl::Fire() src
36 nsTimerEvent::Run() src
37 nsThread::ProcessNextEvent(bool,bool *) src
38 mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate *) src
39 mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate *) src
40 MessageLoop::RunHandler() src
41 MessageLoop::Run() src
42 nsBaseAppShell::Run() src
43 nsAppShell::Run() src
44 XRE_RunAppShell src
45 mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate *) src
46 MessageLoop::RunHandler() src
47 MessageLoop::Run() src
48 XRE_InitChildProcess src
49 content_process_main(int,char * * const) src
50 wmain src
51 __tmainCRTStartup
52 BaseThreadInitThunk
53 LdrpAllocateTls
54 LdrpAllocateTls
BROWSER
-----------------------------------------------------------------------------------
0 google_breakpad::ExceptionHandler::WriteMinidump(std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > const &,bool (*)(wchar_t const *,wchar_t const *,void *,_EXCEPTION_POINTERS *,MDRawAssertionInfo *,bool),void *) src
1 CrashReporter::CreatePairedMinidumps(void *,unsigned long,nsIFile * *) src
2 mozilla::dom::CrashReporterParent::GeneratePairedMinidump<mozilla::plugins::PluginModuleChromeParent>(mozilla::plugins::PluginModuleChromeParent *) src
3 mozilla::plugins::PluginModuleChromeParent::TerminateChildProcess(MessageLoop *) src
4 mozilla::plugins::TerminatePlugin(unsigned int) src
5 `anonymous namespace'::HangMonitoredProcess::TerminatePlugin() src
6 NS_InvokeByIndex src
7 XPC_WN_CallMethod(JSContext *,unsigned int,JS::Value *) src
8 js::Invoke(JSContext *,JS::CallArgs,js::MaybeConstruct) src
9 Interpret src
10 js::RunScript(JSContext *,js::RunState &) src
11 js::Invoke(JSContext *,JS::CallArgs,js::MaybeConstruct) src
12 Interpret src
13 js::RunScript(JSContext *,js::RunState &) src
14 js::Invoke(JSContext *,JS::CallArgs,js::MaybeConstruct) src
15 js::CrossCompartmentWrapper::call(JSContext *,JS::Handle<JSObject *>,JS::CallArgs const &) src
16 js::Invoke(JSContext *,JS::CallArgs,js::MaybeConstruct) src
17 Interpret src
18 js::RunScript(JSContext *,js::RunState &) src
19 js::Invoke(JSContext *,JS::CallArgs,js::MaybeConstruct) src
20 js::Invoke(JSContext *,JS::Value const &,JS::Value const &,unsigned int,JS::Value const *,JS::MutableHandle<JS::Value>) src
21 mozilla::dom::EventHandlerNonNull::Call(JSContext *,JS::Handle<JS::Value>,mozilla::dom::Event &,JS::MutableHandle<JS::Value>,mozilla::ErrorResult &) src
22 mozilla::dom::EventHandlerNonNull::Call<nsISupports *>(nsISupports * const &,mozilla::dom::Event &,JS::MutableHandle<JS::Value>,mozilla::ErrorResult &,char const *,mozilla::dom::CallbackObject::ExceptionHandling,JSCompartment *) src
23 mozilla::JSEventHandler::HandleEvent(nsIDOMEvent *) src
24 mozilla::EventListenerManager::HandleEventInternal(nsPresContext *,mozilla::WidgetEvent *,nsIDOMEvent * *,mozilla::dom::EventTarget *,nsEventStatus *) src
25 mozilla::EventTargetChainItem::HandleEventTargetChain(nsTArray<mozilla::EventTargetChainItem> &,mozilla::EventChainPostVisitor &,mozilla::EventDispatchingCallback *,mozilla::ELMCreationDetector &) src
26 mozilla::EventDispatcher::Dispatch(nsISupports *,nsPresContext *,mozilla::WidgetEvent *,nsIDOMEvent *,nsEventStatus *,mozilla::EventDispatchingCallback *,nsTArray<mozilla::dom::EventTarget *> *) src
27 mozilla::EventDispatcher::DispatchDOMEvent(nsISupports *,mozilla::WidgetEvent *,nsIDOMEvent *,nsPresContext *,nsEventStatus *) src
28 PresShell::HandleDOMEventWithTarget(nsIContent *,nsIDOMEvent *,nsEventStatus *) src
29 nsContentUtils::DispatchXULCommand(nsIContent *,bool,nsIDOMEvent *,nsIPresShell *,bool,bool,bool,bool) src
30 nsXULMenuCommandEvent::Run() src
31 nsThread::ProcessNextEvent(bool,bool *) src
32 mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate *) src
33 MessageLoop::RunHandler() src
34 MessageLoop::Run() src
35 nsBaseAppShell::Run() src
36 nsAppShell::Run() src
37 nsAppStartup::Run() src
38 XREMain::XRE_mainRun() src
39 XREMain::XRE_main(int,char * * const,nsXREAppData const *) src
40 XRE_main src
41 do_main src
42 NS_internal_main(int,char * *) src
43 wmain src
44 __tmainCRTStartup
45 BaseThreadInitThunk
46 LdrpAllocateTls
47 LdrpAllocateTls
Reporter | ||
Updated•10 years ago
|
tracking-e10s:
--- → +
Reporter | ||
Comment 1•10 years ago
|
||
Another mystery: how the plugin process ended up in PluginModuleChild::AnswerSyncNPP_New() yet the content process isn't in mozilla::plugins::PPluginModuleParent::CallSyncNPP_New().
Flags: needinfo?(wmccloskey)
Sorry, nothing is popping out at me here. I'll explain the way the timeout happens in case it helps.
1. Some sync plugin message takes too long to get a response. The IPC code calls PluginModuleContentParent::ShouldContinueFromReplyTimeout, which tells the hang monitor code about the hang. We don't actually time out the IPC message though--we keep waiting.
2. The hang monitor code sends a message to the chrome process on a separate thread. The chrome process cancels any ongoing CPOW and puts up the hang UI.
3. The user selects the menu option to kill the plugin. We take minidumps of all three processes and then kill the plugin process.
To give more direct answers to Jim's questions:
- Although the hang monitor cancels CPOWs, there is a delay between then and when it kills the plugin. The delay is however long it takes the user to mouse over and select the "Terminate Plugin" menu options. Presumably that's enough time for the chrome process to respond to whatever message is deadlocking us. So the fact that we still appear to be deadlocked when we take the minidumps suggests that the hang did not involve the chrome process.
- I agree that it's strange that we don't see CallSyncNPP_New in the stacks anywhere. The hang monitor doesn't do anything to cancel IPCs except for its final act of killing the plugin process, which hasn't happened yet at the time we take the minidumps.
Flags: needinfo?(wmccloskey)
Reporter | ||
Updated•9 years ago
|
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
Updated•3 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•