If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

[e10s] <xul:browser> webNavigation and docShell properties sometimes go away

RESOLVED DUPLICATE of bug 1166351

Status

()

Firefox
Session Restore
RESOLVED DUPLICATE of bug 1166351
3 years ago
2 years ago

People

(Reporter: mconley, Unassigned)

Tracking

Trunk
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(e10sm8+)

Details

Attachments

(1 attachment)

(Reporter)

Description

3 years ago
:past reported the following:

He had several tabs open, and switched from one tab to another. He saw the big tab spinner show up after a short while, and none of his web content would show up, regardless of which tab he selected, indicating that his content process was hung.

Because the browser process wasn't hung, he was able to shut down the browser, which he did in order to get back to a working state.

However, when his browser restarted, his session was missing - he had a bunch of tabs opened, but all were set to about:blank.

I suspect that this is because, on shutdown, SessionStore attempts to dump the state of each tab to disk - but doing so is impossible if the content process is locked up. So it somehow failed out, and then quit.

I would have expected the parent process to hang on attempting to get session data from each tab, but :past says that shutdown happened properly.

:past was able to recover his session from a sessionstore backup. We might want to have the parent process revert to something like backup, or last known good data, if the content process is hung.

Updated

3 years ago
tracking-e10s: ? → m8+
Created attachment 8578719 [details]
console.log

Today I had a similar experience. I was prompted to close Firefox in order to update Adobe Flash, which I did. Once the update finished, the installer opened Nightly, presumably to show a tab with a message about successful upgrade. When the browser came up the content process seemed hang and every tab was again blank, no favicons, no URLs, nothing, and the last tab had a spinner.

Initially I thought it might be related to a similar issue when returning from sleep mode, where the browser is unresponsive, but both content and chrome are properly rendered. To remedy that I usually just click randomly on the menu bar (OS X) and that seems to make the browser responsive again. This time it didn't work and Cmd-Shift-J didn't open the Browser Console. Opening it from the toolbar however worked and I have attached the few log messages that I could find in there.

When I got tired of waiting I killed the process, so that it wouldn't store a bad session and luckily it worked: starting the browser again brought me back to where I was before, with just an empty tab to where the successful update page would presumably be.
(Reporter)

Comment 2

3 years ago
This happened to me again today.

I opened the Browser Console and Browser Content Toolbox before restarting. The Browser Content Toolbox didn't seem to have anything useful in its console, but in the Browser Console, I got this:

12:30:57.385 TypeError: this.docShell is null browser.xml:668:16
12:30:57.767 TypeError: browser.currentURI is null ReaderParent.jsm:131:0
12:30:57.783 TypeError: this.webNavigation is null browser.xml:452:0
12:30:57.841 TypeError: this.docShell is null browser.xml:668:16
12:30:58.087 TypeError: this.webNavigation is null browser.xml:452:0
12:30:58.477 TypeError: this.webNavigation is null browser.xml:452:0
12:30:58.815 TypeError: this.docShell is null browser.xml:668:16
12:30:58.911 The character encoding of a framed document was not declared. The document may appear different if viewed without the document framing it. adpage.html
12:30:59.301 TypeError: this.docShell is null browser.xml:668:16
12:30:59.697 Use of getPreventDefault() is deprecated.  Use defaultPrevented instead. grv-jquery-1.8.2.min.446a642fc8237b3799365aee82b1db0c.js:4:0
12:31:00.154 TypeError: this.docShell is null browser.xml:668:16
12:31:00.467 Use of getPreventDefault() is deprecated.  Use defaultPrevented instead. grv-jquery-1.8.2.min.446a642fc8237b3799365aee82b1db0c.js:4:0
12:31:00.738 TypeError: this.webNavigation is null browser.xml:452:0
12:31:00.739 RemoteWebProgress failed to call onStateChange: [Exception... "[JavaScript Error: "this.webNavigation is null" {file: "chrome://global/content/bindings/browser.xml" line: 452}]'[JavaScript Error: "this.webNavigation is null" {file: "chrome://global/content/bindings/browser.xml" line: 452}]' when calling method: [nsIWebProgressListener::onStateChange]"  nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"  location: "JS frame :: resource://gre/modules/RemoteWebProgress.jsm :: RemoteWebProgressManager.prototype._callProgressListeners :: line 140"  data: yes]
 RemoteWebProgress.jsm:142:0
12:31:00.761 TypeError: this.webNavigation is null browser.xml:452:0
12:31:00.761 RemoteWebProgress failed to call onStateChange: [Exception... "[JavaScript Error: "this.webNavigation is null" {file: "chrome://global/content/bindings/browser.xml" line: 452}]'[JavaScript Error: "this.webNavigation is null" {file: "chrome://global/content/bindings/browser.xml" line: 452}]' when calling method: [nsIWebProgressListener::onStateChange]"  nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"  location: "JS frame :: resource://gre/modules/RemoteWebProgress.jsm :: RemoteWebProgressManager.prototype._callProgressListeners :: line 140"  data: yes]
 RemoteWebProgress.jsm:142:0
12:31:00.782 TypeError: this.webNavigation is null browser.xml:452:0
12:31:00.782 RemoteWebProgress failed to call onStateChange: [Exception... "[JavaScript Error: "this.webNavigation is null" {file: "chrome://global/content/bindings/browser.xml" line: 452}]'[JavaScript Error: "this.webNavigation is null" {file: "chrome://global/content/bindings/browser.xml" line: 452}]' when calling method: [nsIWebProgressListener::onStateChange]"  nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"  location: "JS frame :: resource://gre/modules/RemoteWebProgress.jsm :: RemoteWebProgressManager.prototype._callProgressListeners :: line 140"  data: yes]
 RemoteWebProgress.jsm:142:0
12:31:00.821 TypeError: this.docShell is null browser.xml:668:16
12:31:00.823 TypeError: this.webNavigation is null browser.xml:452:0
12:31:00.823 RemoteWebProgress failed to call onStateChange: [Exception... "[JavaScript Error: "this.webNavigation is null" {file: "chrome://global/content/bindings/browser.xml" line: 452}]'[JavaScript Error: "this.webNavigation is null" {file: "chrome://global/content/bindings/browser.xml" line: 452}]' when calling method: [nsIWebProgressListener::onStateChange]"  nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"  location: "JS frame :: resource://gre/modules/RemoteWebProgress.jsm :: RemoteWebProgressManager.prototype._callProgressListeners :: line 140"  data: yes]
 RemoteWebProgress.jsm:142:0
12:31:00.823 TypeError: this.docShell is null browser.xml:668:16
12:31:00.824 TypeError: this.webNavigation is null browser.xml:452:0
12:31:00.824 RemoteWebProgress failed to call onStateChange: [Exception... "[JavaScript Error: "this.webNavigation is null" {file: "chrome://global/content/bindings/browser.xml" line: 452}]'[JavaScript Error: "this.webNavigation is null" {file: "chrome://global/content/bindings/browser.xml" line: 452}]' when calling method: [nsIWebProgressListener::onStateChange]"  nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"  location: "JS frame :: resource://gre/modules/RemoteWebProgress.jsm :: RemoteWebProgressManager.prototype._callProgressListeners :: line 140"  data: yes]
 RemoteWebProgress.jsm:142:0
12:31:00.841 TypeError: this.docShell is null browser.xml:668:16
12:31:00.843 TypeError: this.webNavigation is null browser.xml:452:0
12:31:00.843 RemoteWebProgress failed to call onStateChange: [Exception... "[JavaScript Error: "this.webNavigation is null" {file: "chrome://global/content/bindings/browser.xml" line: 452}]'[JavaScript Error: "this.webNavigation is null" {file: "chrome://global/content/bindings/browser.xml" line: 452}]' when calling method: [nsIWebProgressListener::onStateChange]"  nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"  location: "JS frame :: resource://gre/modules/RemoteWebProgress.jsm :: RemoteWebProgressManager.prototype._callProgressListeners :: line 140"  data: yes]
 RemoteWebProgress.jsm:142:0
12:31:00.848 TypeError: this.docShell is null browser.xml:668:16
12:31:00.849 TypeError: this.webNavigation is null browser.xml:452:0
12:31:00.849 RemoteWebProgress failed to call onStateChange: [Exception... "[JavaScript Error: "this.webNavigation is null" {file: "chrome://global/content/bindings/browser.xml" line: 452}]'[JavaScript Error: "this.webNavigation is null" {file: "chrome://global/content/bindings/browser.xml" line: 452}]' when calling method: [nsIWebProgressListener::onStateChange]"  nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"  location: "JS frame :: resource://gre/modules/RemoteWebProgress.jsm :: RemoteWebProgressManager.prototype._callProgressListeners :: line 140"  data: yes]
 RemoteWebProgress.jsm:142:0
12:31:00.911 TypeError: this.docShell is null browser.xml:668:16
12:31:01.092 TypeError: this._browser.webNavigation is null RemoteWebProgress.jsm:190:6
12:31:01.346 TypeError: this.webNavigation is null browser.xml:452:0
12:31:01.346 RemoteWebProgress failed to call onStateChange: [Exception... "[JavaScript Error: "this.webNavigation is null" {file: "chrome://global/content/bindings/browser.xml" line: 452}]'[JavaScript Error: "this.webNavigation is null" {file: "chrome://global/content/bindings/browser.xml" line: 452}]' when calling method: [nsIWebProgressListener::onStateChange]"  nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"  location: "JS frame :: resource://gre/modules/RemoteWebProgress.jsm :: RemoteWebProgressManager.prototype._callProgressListeners :: line 140"  data: yes]
 RemoteWebProgress.jsm:142:0
12:31:04.560 TypeError: this._browser.webNavigation is null RemoteWebProgress.jsm:190:6
12:31:04.565 TypeError: this.docShell is null browser.xml:668:16
12:31:04.618 The character encoding of a framed document was not declared. The document may appear different if viewed without the document framing it. adpage.html
12:31:04.642 TypeError: this.webNavigation is null browser.xml:452:0
12:31:04.642 RemoteWebProgress failed to call onStateChange: [Exception... "[JavaScript Error: "this.webNavigation is null" {file: "chrome://global/content/bindings/browser.xml" line: 452}]'[JavaScript Error: "this.webNavigation is null" {file: "chrome://global/content/bindings/browser.xml" line: 452}]' when calling method: [nsIWebProgressListener::onStateChange]"  nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"  location: "JS frame :: resource://gre/modules/RemoteWebProgress.jsm :: RemoteWebProgressManager.prototype._callProgressListeners :: line 140"  data: yes]
 RemoteWebProgress.jsm:142:0
12:34:34.467 A promise chain failed to handle a rejection. Did you forget to '.catch', or did you forget to 'return'?
See https://developer.mozilla.org/Mozilla/JavaScript_code_modules/Promise.jsm/Promise

Date: Wed Mar 25 2015 12:34:23 GMT-0400 (EDT)
Full Message: 
Full Stack: JS frame :: resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js :: PendingErrors.register :: line 162
JS frame :: resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js :: this.PromiseWalker.completePromise :: line 675
JS frame :: resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js :: Handler.prototype.process :: line 903
JS frame :: resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js :: this.PromiseWalker.walkerLoop :: line 746
JS frame :: resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js :: this.PromiseWalker.scheduleWalkerLoop/< :: line 688
native frame :: <unknown filename> :: <TOP_LEVEL> :: line 0 <unknown>
12:35:49.029 TypeError: this.webNavigation is null browser.xml:691:14
12:36:01.450 unsafe CPOW usage TabState.jsm:96:0
12:36:01.460 TypeError: this.docShell is null browser.xml:422:0
12:36:13.851 couldn't look up addon: fx-devtools nsBrowserGlue.js:571:0
12:37:07.896 error occurred while processing 'attach: TypeError: this.sources is undefined
Stack: ThreadActor.prototype.onAttach@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/script.js:663:5
DSC_onPacket@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/main.js:1459:15
ChildDebuggerTransport.prototype.receiveMessage@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/transport/transport.js:734:5
Line: 663, column: 4 main.js:1331:0
12:37:07.897 onPacket threw an exception: Error: Server did not specify an actor, dropping packet: {"error":"unknownError","message":"error occurred while processing 'attach: TypeError: this.sources is undefined\nStack: ThreadActor.prototype.onAttach@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/script.js:663:5\nDSC_onPacket@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/main.js:1459:15\nChildDebuggerTransport.prototype.receiveMessage@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/transport/transport.js:734:5\nLine: 663, column: 4"}
Stack: DebuggerClient.prototype.onPacket@resource://gre/modules/devtools/dbg-client.jsm:941:1
LocalDebuggerTransport.prototype.send/<@resource://gre/modules/devtools/dbg-client.jsm -> resource://gre/modules/devtools/transport/transport.js:561:11
makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/DevToolsUtils.js:82:14
makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/DevToolsUtils.js:82:14
Line: 941, column: 0 DevToolsUtils.js:58:0
12:37:13.954 couldn't look up addon: fx-devtools

Those nulls for docshell and webnavigation don't look good...
FWIW, I hit something like this today. (In my case, Firefox was behaving oddly -- as I recall, my tabstrip wasn't responding to clicks on the tab-close-buttons, though I could still interact with the browser menus. So I did File|Quit, and then started Firefox up again. All my tabs were restored as about:blank, and my sessionstore.js file was much smaller than it should've been (26K instead of  ~265K).

I was able to recover by quitting and copying an intact (~265K) sessionstore file from sessionstore-backups into $PROFILE/sessionstore.js.

Also: I'm running with e10s *turned off*. That may mean the bug I hit was different than this one, though the symptoms seem similar.
(I was using yesterday's 64-bit Linux nightly when I hit this, FWIW.)
My bogus small (26K) sessionstore file starts out like this:
{"windows":[{"tabs":[{"entries":[],"lastAccessed":1427479784859,"hidden":false,"attributes":{},"image":null},{"entries":[],"lastAccessed":1427479786048,"hidden":false,"attributes":{},"image":null},{"entries":[],"lastAccessed":1427479636479,"hidden":false,"attributes":{},

...whereas my "real" sessionstore file has actual real data with "url" fields & actual URLs.
Looking at those empty tab states in Daniel's file, the only way to end up with those is if we bail out here:

https://mxr.mozilla.org/mozilla-central/source/browser/components/sessionstore/TabState.jsm#164

Looks like when trying to collect data |browser.currentURI| isn't there anymore. Possibly the XBL binding is gone by that point, for yet unknown reasons?
Currently wondering if we can't just remove this condition. It's around from the days where we synchronously accessed content windows and documents and collected data. Nowadays we just send it when the frame script is ready and loaded.
Yeah, seems like we can just get rid of the condition. Unfortunately though that won't solve the problem. If the XBL binding is gone we'll not be able to access |browser.permanentKey| and retrieve any data previously sent by the frame script. SessionStore listens for window close events and quit-application notifications to never collect data when it shouldn't.
(Reporter)

Comment 9

2 years ago
So I'm starting to be less convinced that this has something to do with hung content processes...

I think it's possible that some of our <xul:browser>'s can just get into a really weird state sometimes. I just found a tab that had no title, and when I clicked on it, nothing happened. And I can't seem to switch to some other tabs. And I get the following in the Browser Console:

14:40:11.431 TypeError: this.webNavigation is null browser.xml:691:14
14:40:14.326 TypeError: tab.linkedBrowser.currentURI is null tabbrowser.xml:3418:16
14:40:16.187 TelemetryStopwatch: key "FX_TAB_CLICK_MS" was already initialized TelemetryStopwatch.jsm:52:0
14:40:16.200 TypeError: this.webNavigation is null browser.xml:691:14
14:40:17.332 TypeError: tab.linkedBrowser.currentURI is null tabbrowser.xml:3418:16
14:40:21.307 TelemetryStopwatch: key "FX_TAB_CLICK_MS" was already initialized TelemetryStopwatch.jsm:52:0
14:40:21.317 TypeError: this.webNavigation is null browser.xml:691:14
14:40:22.300 TypeError: tab.linkedBrowser.currentURI is null tabbrowser.xml:3418:16
14:40:22.993 TypeError: this.webNavigation is null browser.xml:691:14
(Reporter)

Comment 10

2 years ago
And, just now when I restarted my browser to try to get back into a good state, all of my tabs were blank.

Re-nomming for triage, since I don't think that the work that was expected to fix this (bug 1109875) will actually fix this.
tracking-e10s: m8+ → ?
Summary: Shutting down the browser with a hung content process can lose session data → [e10s] <xul:browser> webNavigation and docShell properties sometimes go away
tracking-e10s: ? → m8+
(Reporter)

Comment 11

2 years ago
I just hit this again on my Windows machine - I hit Ctrl-W to close a tab, and then hit that key combo again quickly to close the tab just before.

The second-last tab didn't close, and now that last browser is in a really weird state - almost like closing tab got aborted somehow.
(Reporter)

Comment 12

2 years ago
Pretty sure this is a dupe of bug 1166351.
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1166351
You need to log in before you can comment on or make changes to this bug.