Closed Bug 1697645 Opened 4 years ago Closed 4 years ago

Investigate hangs caused by waiting for SSTabRestored

Categories

(Firefox :: Session Restore, task)

task

Tracking

()

RESOLVED FIXED
Fission Milestone M7

People

(Reporter: annyG, Assigned: annyG)

References

Details

Tests browser/components/sessionstore/test/browser_background_tab_crash.js and browser/components/sessionstore/test/browser_revive_crashed_bg_tabs.js,

try run https://treeherder.mozilla.org/jobs?repo=try&revision=97d3d466e83018179438da782bd90781d2d435a0&selectedTaskRun=XX9YLkjoTwKh-xT-F-RUzQ.0

Investigating test browser/components/sessionstore/test/browser_background_tab_crash.js.

The test hangs here https://searchfox.org/mozilla-central/source/browser/components/sessionstore/test/browser_background_tab_crash.js#176

When I run the test in headed mode, I see that we do restore tab 2, but never get the SSTabRestoredEvent. When i'm debugging, I see that the ProgressListener we add in addProgressListenerForRestore doesn't get onStopRequest (which would result in calling _restoreTabContentComplete and emiting the SSTabRestored event), because we uninstall that listener shortly upon receiving "SessionStore:update" message.

Will investigate why we do this.

"SessionStore:update" gets called by ContentSessionStore's send, which gets called by onUnload.

This is the stack trace:

 0:22.42 GECKO(59869) send@resource:///modules/sessionstore/ContentSessionStore.jsm:494:15
 0:22.42 GECKO(59869) onUnload@resource:///modules/sessionstore/ContentSessionStore.jsm:736:23
 0:22.42 GECKO(59869) handleEvent@resource:///modules/sessionstore/ContentSessionStore.jsm:729:12
 0:22.42 GECKO(59869) updateBrowserRemoteness@chrome://browser/content/tabbrowser.js:1893:16
 0:22.42 GECKO(59869) updateBrowserRemotenessByURL@chrome://browser/content/tabbrowser.js:2008:21
 0:22.42 GECKO(59869) restoreTabContent@resource:///modules/sessionstore/SessionStore.jsm:4662:39
 0:22.42 GECKO(59869) ssi_onTabSelect@resource:///modules/sessionstore/SessionStore.jsm:2730:16
 0:22.42 GECKO(59869) ssi_handleEvent@resource:///modules/sessionstore/SessionStore.jsm:1485:14
 0:22.42 GECKO(59869) updateCurrentBrowser@chrome://browser/content/tabbrowser.js:1202:16
 0:22.42 GECKO(59869) _setupEventListeners/<@chrome://browser/content/tabbrowser.js:5500:16
 0:22.42 GECKO(59869) set selectedIndex@chrome://global/content/elements/tabbox.js:202:14
 0:22.42 GECKO(59869) set selectedPanel@chrome://global/content/elements/tabbox.js:220:7
 0:22.42 GECKO(59869) set selectedIndex@chrome://global/content/elements/tabbox.js:544:11
 0:22.42 GECKO(59869) set selectedItem@chrome://global/content/elements/tabbox.js:563:35
 0:22.42 GECKO(59869) set selectedTab@chrome://global/content/elements/tabbox.js:85:11
 0:22.42 GECKO(59869) set selectedTab@chrome://browser/content/tabbrowser.js:317:7
 0:22.42 GECKO(59869) switchTab@resource://testing-common/BrowserTestUtils.jsm:371:7

The same problem happens with:

  • browser/components/sessionstore/test/browser_background_tab_crash.js
  • browser/components/sessionstore/test/browser_revive_crashed_bg_tabs.js
  • browser/components/sessionstore/test/browser_unrestored_crashedTabs.js

Fixed by not clearing the restore progress listener after an isFinal "SessionStore:Update".

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.