Closed Bug 1175570 Opened 10 years ago Closed 10 years ago

Closing a tab with parleys.com after getting the controller on the web console will kill the child process

Categories

(Core :: DOM: Service Workers, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: bkelly, Unassigned)

References

()

Details

Here is another SW-enabled site: https://www.parleys.com Its using fetch event and Cache for offline behavior. In current nightly the tab icon continues to spin forever. The network panel shows a favicon.png HEAD be repeatedly made. I don't see any obvious cross-origin requests, so I don't think its an opaque Response issue.
Note, we won't fully support their offline implementation because they use FileSystem API. We should at least manage the SW parts correctly, though.
I get: Assertion failure: !mOnStartRequestCalled (We should not call OsStartRequest twice), at /Users/ehsan/moz/src/netwerk/protocol/http/nsHttpChannel.cpp:964 #01: mozilla::net::nsHttpChannel::CallOnStartRequest()[/Users/ehsan/moz/src/obj-ff-clang-plugin.noindex/dist/NightlyDebug.app/Contents/MacOS/XUL +0x5cc17a] #02: mozilla::net::nsHttpChannel::ContinueProcessNormal(nsresult)[/Users/ehsan/moz/src/obj-ff-clang-plugin.noindex/dist/NightlyDebug.app/Contents/MacOS/XUL +0x5d24cf] #03: mozilla::net::nsHttpChannel::ProcessNormal()[/Users/ehsan/moz/src/obj-ff-clang-plugin.noindex/dist/NightlyDebug.app/Contents/MacOS/XUL +0x5d0500] #04: mozilla::net::nsHttpChannel::ProcessResponse()[/Users/ehsan/moz/src/obj-ff-clang-plugin.noindex/dist/NightlyDebug.app/Contents/MacOS/XUL +0x5cfe44] #05: mozilla::net::nsHttpChannel::OnStartRequest(nsIRequest*, nsISupports*)[/Users/ehsan/moz/src/obj-ff-clang-plugin.noindex/dist/NightlyDebug.app/Contents/MacOS/XUL +0x5e213d] #06: non-virtual thunk to mozilla::net::nsHttpChannel::OnStartRequest(nsIRequest*, nsISupports*)[/Users/ehsan/moz/src/obj-ff-clang-plugin.noindex/dist/NightlyDebug.app/Contents/MacOS/XUL +0x5e25d7] #07: nsInputStreamPump::OnStateStart()[/Users/ehsan/moz/src/obj-ff-clang-plugin.noindex/dist/NightlyDebug.app/Contents/MacOS/XUL +0x302306] #08: nsInputStreamPump::OnInputStreamReady(nsIAsyncInputStream*)[/Users/ehsan/moz/src/obj-ff-clang-plugin.noindex/dist/NightlyDebug.app/Contents/MacOS/XUL +0x301e26] #09: non-virtual thunk to nsInputStreamPump::OnInputStreamReady(nsIAsyncInputStream*)[/Users/ehsan/moz/src/obj-ff-clang-plugin.noindex/dist/NightlyDebug.app/Contents/MacOS/XUL +0x302f9f] #10: nsInputStreamReadyEvent::Run()[/Users/ehsan/moz/src/obj-ff-clang-plugin.noindex/dist/NightlyDebug.app/Contents/MacOS/XUL +0x169f00] #11: nsThread::ProcessNextEvent(bool, bool*)[/Users/ehsan/moz/src/obj-ff-clang-plugin.noindex/dist/NightlyDebug.app/Contents/MacOS/XUL +0x19ae59] #12: NS_ProcessPendingEvents(nsIThread*, unsigned int)[/Users/ehsan/moz/src/obj-ff-clang-plugin.noindex/dist/NightlyDebug.app/Contents/MacOS/XUL +0x21028a] #13: nsBaseAppShell::NativeEventCallback()[/Users/ehsan/moz/src/obj-ff-clang-plugin.noindex/dist/NightlyDebug.app/Contents/MacOS/XUL +0x3c29be9] #14: nsAppShell::ProcessGeckoEvents(void*)[/Users/ehsan/moz/src/obj-ff-clang-plugin.noindex/dist/NightlyDebug.app/Contents/MacOS/XUL +0x3ca0c5d] #15: __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__[/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation +0x80a01] #16: __CFRunLoopDoSources0[/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation +0x72b8d] #17: __CFRunLoopRun[/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation +0x721bf] #18: CFRunLoopRunSpecific[/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation +0x71bd8] #19: RunCurrentEventLoopInMode[/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox +0x3256f] #20: ReceiveNextEventCommon[/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox +0x322ea] #21: _BlockUntilNextEventMatchingListInModeWithFilter[/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox +0x3212b] #22: _DPSNextEvent[/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit +0x919bb] #23: -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:][/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit +0x90f68] #24: -[GeckoNSApplication nextEventMatchingMask:untilDate:inMode:dequeue:][/Users/ehsan/moz/src/obj-ff-clang-plugin.noindex/dist/NightlyDebug.app/Contents/MacOS/XUL +0x3c9f777] #25: -[NSApplication run][/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit +0x86bf3] #26: nsAppShell::Run()[/Users/ehsan/moz/src/obj-ff-clang-plugin.noindex/dist/NightlyDebug.app/Contents/MacOS/XUL +0x3ca1631] #27: nsAppStartup::Run()[/Users/ehsan/moz/src/obj-ff-clang-plugin.noindex/dist/NightlyDebug.app/Contents/MacOS/XUL +0x4d17251] #28: XREMain::XRE_mainRun()[/Users/ehsan/moz/src/obj-ff-clang-plugin.noindex/dist/NightlyDebug.app/Contents/MacOS/XUL +0x4de4e3d] #29: XREMain::XRE_main(int, char**, nsXREAppData const*)[/Users/ehsan/moz/src/obj-ff-clang-plugin.noindex/dist/NightlyDebug.app/Contents/MacOS/XUL +0x4de577f] #30: XRE_main[/Users/ehsan/moz/src/obj-ff-clang-plugin.noindex/dist/NightlyDebug.app/Contents/MacOS/XUL +0x4de5c32] #31: do_main(int, char**, nsIFile*)[/Users/ehsan/moz/src/obj-ff-clang-plugin.noindex/dist/NightlyDebug.app/Contents/MacOS/firefox +0x294a] #32: main[/Users/ehsan/moz/src/obj-ff-clang-plugin.noindex/dist/NightlyDebug.app/Contents/MacOS/firefox +0x1d25]
I'm assuming you meant to CC the other Honza here.
(In reply to Josh Matthews [:jdm] from comment #3) > I'm assuming you meant to CC the other Honza here. Oops, yes!
This is working for me now.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WORKSFORME
Hmm, forget what I said! Something is not right here. When I go to parleys.com and close the tab in a debug build, the child process is aborted: [Child 75175] ###!!! ABORT: actor has been |delete|d: file ./PNeckoChild.cpp, line 4516 #01: mozilla::net::PNeckoChild::Write(mozilla::dom::PBrowserChild*, IPC::Message*, bool)[/Users/ehsan/moz/src/obj-ff-clang-plugin.noindex/dist/NightlyDebug.app/Contents/MacOS/XUL +0xac50af] #02: mozilla::net::PNeckoChild::Write(mozilla::dom::PBrowserOrId const&, IPC::Message*)[/Users/ehsan/moz/src/obj-ff-clang-plugin.noindex/dist/NightlyDebug.app/Contents/MacOS/XUL +0xab7a8b] #03: mozilla::net::PNeckoChild::SendPHttpChannelConstructor(mozilla::net::PHttpChannelChild*, mozilla::dom::PBrowserOrId const&, IPC::SerializedLoadContext const&, mozilla::net::HttpChannelCreationArgs const&)[/Users/ehsan/moz/src/obj-ff-clang-plugin.noindex/dist/NightlyDebug.app/Contents/MacOS/XUL +0xab7736] #04: mozilla::net::HttpChannelChild::ContinueAsyncOpen()[/Users/ehsan/moz/src/obj-ff-clang-plugin.noindex/dist/NightlyDebug.app/Contents/MacOS/XUL +0x57f31a] #05: mozilla::net::HttpChannelChild::AsyncOpen(nsIStreamListener*, nsISupports*)[/Users/ehsan/moz/src/obj-ff-clang-plugin.noindex/dist/NightlyDebug.app/Contents/MacOS/XUL +0x57dfbe] #06: non-virtual thunk to mozilla::net::HttpChannelChild::AsyncOpen(nsIStreamListener*, nsISupports*)[/Users/ehsan/moz/src/obj-ff-clang-plugin.noindex/dist/NightlyDebug.app/Contents/MacOS/XUL +0x57f447] #07: NS_StartCORSPreflight(nsIChannel*, nsIStreamListener*, nsIPrincipal*, bool, nsTArray<nsCString>&, nsIChannel**)[/Users/ehsan/moz/src/obj-ff-clang-plugin.noindex/dist/NightlyDebug.app/Contents/MacOS/XUL +0x35a4aaa] #08: mozilla::dom::FetchDriver::HttpFetch(bool, bool, bool)[/Users/ehsan/moz/src/obj-ff-clang-plugin.noindex/dist/NightlyDebug.app/Contents/MacOS/XUL +0x2f96cd3] #09: mozilla::dom::FetchDriver::ContinueFetch(bool)[/Users/ehsan/moz/src/obj-ff-clang-plugin.noindex/dist/NightlyDebug.app/Contents/MacOS/XUL +0x2f943b7] #10: void nsRunnableMethodArguments<bool>::apply<mozilla::dom::FetchDriver, nsresult (mozilla::dom::FetchDriver::*)(bool)>(mozilla::dom::FetchDriver*, nsresult (mozilla::dom::FetchDriver::*)(bool))[/Users/ehsan/moz/src/obj-ff-clang-plugin.noindex/dist/NightlyDebug.app/Contents/MacOS/XUL +0x2faa5e4] #11: nsRunnableMethodImpl<nsresult (mozilla::dom::FetchDriver::*)(bool), true, bool>::Run()[/Users/ehsan/moz/src/obj-ff-clang-plugin.noindex/dist/NightlyDebug.app/Contents/MacOS/XUL +0x2faa2bc] #12: nsThread::ProcessNextEvent(bool, bool*)[/Users/ehsan/moz/src/obj-ff-clang-plugin.noindex/dist/NightlyDebug.app/Contents/MacOS/XUL +0x197542] #13: NS_ProcessPendingEvents(nsIThread*, unsigned int)[/Users/ehsan/moz/src/obj-ff-clang-plugin.noindex/dist/NightlyDebug.app/Contents/MacOS/XUL +0x20bf4a] #14: nsBaseAppShell::NativeEventCallback()[/Users/ehsan/moz/src/obj-ff-clang-plugin.noindex/dist/NightlyDebug.app/Contents/MacOS/XUL +0x3d15349] #15: nsAppShell::ProcessGeckoEvents(void*)[/Users/ehsan/moz/src/obj-ff-clang-plugin.noindex/dist/NightlyDebug.app/Contents/MacOS/XUL +0x3d8c71d] #16: __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__[/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation +0x80a01] #17: __CFRunLoopDoSources0[/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation +0x72b8d] #18: __CFRunLoopRun[/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation +0x721bf] #19: CFRunLoopRunSpecific[/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation +0x71bd8] #20: RunCurrentEventLoopInMode[/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox +0x3256f] #21: ReceiveNextEventCommon[/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox +0x322ea] #22: _BlockUntilNextEventMatchingListInModeWithFilter[/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox +0x3212b] #23: _DPSNextEvent[/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit +0x918ab] #24: -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:][/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit +0x90e58] #25: -[GeckoNSApplication nextEventMatchingMask:untilDate:inMode:dequeue:][/Users/ehsan/moz/src/obj-ff-clang-plugin.noindex/dist/NightlyDebug.app/Contents/MacOS/XUL +0x3d8b237] #26: -[NSApplication run][/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit +0x86af3] #27: nsAppShell::Run()[/Users/ehsan/moz/src/obj-ff-clang-plugin.noindex/dist/NightlyDebug.app/Contents/MacOS/XUL +0x3d8d0f1] #28: XRE_RunAppShell[/Users/ehsan/moz/src/obj-ff-clang-plugin.noindex/dist/NightlyDebug.app/Contents/MacOS/XUL +0x4ee2f0b] #29: mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*)[/Users/ehsan/moz/src/obj-ff-clang-plugin.noindex/dist/NightlyDebug.app/Contents/MacOS/XUL +0x86dd56] #30: MessageLoop::RunInternal()[/Users/ehsan/moz/src/obj-ff-clang-plugin.noindex/dist/NightlyDebug.app/Contents/MacOS/XUL +0x7d9455] #31: MessageLoop::RunHandler()[/Users/ehsan/moz/src/obj-ff-clang-plugin.noindex/dist/NightlyDebug.app/Contents/MacOS/XUL +0x7d9365] #32: MessageLoop::Run()[/Users/ehsan/moz/src/obj-ff-clang-plugin.noindex/dist/NightlyDebug.app/Contents/MacOS/XUL +0x7d930d] #33: XRE_InitChildProcess[/Users/ehsan/moz/src/obj-ff-clang-plugin.noindex/dist/NightlyDebug.app/Contents/MacOS/XUL +0x4ee26a3] #34: content_process_main(int, char**)[/Users/ehsan/moz/src/obj-ff-clang-plugin.noindex/dist/NightlyDebug.app/Contents/MacOS/plugin-container.app/Contents/MacOS/plugin-container +0x1edb] #35: main[/Users/ehsan/moz/src/obj-ff-clang-plugin.noindex/dist/NightlyDebug.app/Contents/MacOS/plugin-container.app/Contents/MacOS/plugin-container +0x1fd2] [Child 75175] ###!!! ABORT: actor has been |delete|d: file ./PNeckoChild.cpp, line 4516 Hit MOZ_CRASH() at /Users/ehsan/moz/src/memory/mozalloc/mozalloc_abort.cpp:33 ###!!! [Parent][MessageChannel] Error: (msgtype=0x200081,name=PBrowser::Msg_Destroy) Channel error: cannot send/recv In a normal Nightly, when I close the tab, I get a hang in WorkerPrivateParent::Freeze, like this: * frame #0: 0x0000000101fcfe23 XUL`mozilla::dom::workers::WorkerPrivateParent<mozilla::dom::workers::WorkerPrivate>::Freeze(JSContext*, nsPIDOMWindow*) + 227 frame #1: 0x0000000101fcd2ae XUL`mozilla::dom::workers::WorkerPrivateParent<mozilla::dom::workers::WorkerPrivate>::UnregisterSharedWorker(JSContext*, mozilla::dom::workers::SharedWorker*) + 174 frame #2: 0x0000000101fb32ea XUL`mozilla::dom::workers::SharedWorker::Close() + 90 frame #3: 0x0000000101fd1f1c XUL`mozilla::dom::workers::WorkerPrivateParent<mozilla::dom::workers::WorkerPrivate>::CloseSharedWorkersForWindow(nsPIDOMWindow*) + 284 frame #4: 0x0000000101f8d81c XUL`mozilla::dom::workers::RuntimeService::CancelWorkersForWindow(nsPIDOMWindow*) + 300 frame #5: 0x00000001010add82 XUL`nsGlobalWindow::FreeInnerObjects() + 146 frame #6: 0x00000001010b2e49 XUL`nsGlobalWindow::DetachFromDocShell() + 89 frame #7: 0x00000001027ab073 XUL`nsDocShell::Destroy() + 579 frame #8: 0x00000001027be4a0 XUL`non-virtual thunk to nsDocShell::Destroy() + 16 frame #9: 0x000000010280570e XUL`nsWebBrowser::SetDocShell(nsIDocShell*) + 702 frame #10: 0x0000000102805372 XUL`nsWebBrowser::InternalDestroy() + 66 frame #11: 0x0000000102809182 XUL`nsWebBrowser::Destroy() + 18 frame #12: 0x000000010280926d XUL`non-virtual thunk to nsWebBrowser::Destroy() + 13 frame #13: 0x0000000101f6fb32 XUL`mozilla::dom::TabChild::DestroyWindow() + 66 frame #14: 0x0000000101f73ab7 XUL`mozilla::dom::TabChild::RecvDestroy() + 375 frame #15: 0x0000000101f73b8d XUL`non-virtual thunk to mozilla::dom::TabChild::RecvDestroy() + 13 frame #16: 0x0000000100a6affd XUL`mozilla::dom::PBrowserChild::OnMessageReceived(IPC::Message const&) + 24973 frame #17: 0x0000000100b04081 XUL`mozilla::dom::PContentChild::OnMessageReceived(IPC::Message const&) + 161 frame #18: 0x00000001007ac026 XUL`mozilla::ipc::MessageChannel::DispatchAsyncMessage(IPC::Message const&) + 118 frame #19: 0x00000001007ab710 XUL`mozilla::ipc::MessageChannel::DispatchMessage(IPC::Message const&) + 240 frame #20: 0x00000001007a8340 XUL`mozilla::ipc::MessageChannel::OnMaybeDequeueOne() + 160 frame #21: 0x000000010076ea54 XUL`MessageLoop::DeferOrRunPendingTask(MessageLoop::PendingTask const&) + 132 frame #22: 0x000000010076ed6a XUL`MessageLoop::DoWork() + 170 frame #23: 0x00000001007ae630 XUL`mozilla::ipc::DoWorkRunnable::Run() + 48 frame #24: 0x00000001004a51f2 XUL`nsThread::ProcessNextEvent(bool, bool*) + 1106 frame #25: 0x00000001004cc191 XUL`NS_ProcessPendingEvents(nsIThread*, unsigned int) + 81 frame #26: 0x00000001021331b7 XUL`nsBaseAppShell::NativeEventCallback() + 119 frame #27: 0x000000010217bcb2 XUL`nsAppShell::ProcessGeckoEvents(void*) + 306 frame #28: 0x00007fff8809ea01 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17 frame #29: 0x00007fff88090b8d CoreFoundation`__CFRunLoopDoSources0 + 269 frame #30: 0x00007fff880901bf CoreFoundation`__CFRunLoopRun + 927 frame #31: 0x00007fff8808fbd8 CoreFoundation`CFRunLoopRunSpecific + 296 frame #32: 0x00007fff8a0ff56f HIToolbox`RunCurrentEventLoopInMode + 235 frame #33: 0x00007fff8a0ff2ea HIToolbox`ReceiveNextEventCommon + 431 frame #34: 0x00007fff8a0ff12b HIToolbox`_BlockUntilNextEventMatchingListInModeWithFilter + 71 frame #35: 0x00007fff82afb8ab AppKit`_DPSNextEvent + 978 frame #36: 0x00007fff82afae58 AppKit`-[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 346 frame #37: 0x000000010217b2b6 XUL`-[GeckoNSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 86 frame #38: 0x00007fff82af0af3 AppKit`-[NSApplication run] + 594 frame #39: 0x000000010217c43a XUL`nsAppShell::Run() + 250 frame #40: 0x0000000102ab3c4c XUL`XRE_RunAppShell + 204 frame #41: 0x000000010076e38d XUL`MessageLoop::Run() + 77 frame #42: 0x0000000102ab38a6 XUL`XRE_InitChildProcess + 1830 frame #43: 0x00000001000012e2 plugin-container`content_process_main(int, char**) + 210 frame #44: 0x0000000100000ec4 plugin-container`start + 52 This build doesn't have source info so it's hard to tell what's going on but it seems like we're just constantly iterating over a hashtable, which seems to suggest that mSharedWorkers has too many entries in it? To reproduce this, what I do is: 1. Go to https://www.parleys.com/, wait a bit, and make sure the service worker is registered by looking at about:serviceworkers. 2. Reload or open it again in a new tab. 3. Open the Web Console and type "navigator.serviceWorker.controller" in it and press Enter. This step seems to be crucial. 4. Close the tab. The child process dies.
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Summary: ServiceWorker enabled parleys.com does not load correctly → Closing a tab with parleys.com after getting the controller on the web console will kill the child process
I can't reproduce this on Linux trunk, even when following the steps from comment 6.
Status: REOPENED → RESOLVED
Closed: 10 years ago10 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.