Webbrowser-app losing saved state upon restart

Bug #1531583 reported by Michael Terry
22
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Canonical System Image
Fix Released
High
Bill Filler
webbrowser-app (Ubuntu)
Fix Released
High
Olivier Tilloy

Bug Description

I've noticed that lately on my rc-proposed dogfood mako that sometimes webbrowser-app will be OOM (or crash?) and restarted but lose all its previous tabs. Which is super annoying.

I told myself I'd leave it alone next time it happened and grab the logs. Here they are. Nothing super jumped out at me.

Related branches

Revision history for this message
Michael Terry (mterry) wrote :
Revision history for this message
Olivier Tilloy (osomon) wrote :

Never seen that myself, but I think ogra mentioned this issue to me a few weeks ago.
Unfortunately the log file doesn’t reveal anything about what could have gone wrong.

Revision history for this message
Olivier Tilloy (osomon) wrote :

Michael, when the crash happens, the entire app is taken down, right? not just the renderer process for the current tab?
What happens then? Is the app automatically relaunched?
If not, can you have a look at the contents of $HOME/.local/share/webbrowser-app/session.json (and session.json.lock)? Maybe share them with me privately (they may contain sensitive data).
Also, is there a crash file under /var/crash? Can you share it here?

Revision history for this message
Michael Terry (mterry) wrote :

OK, just had this happen to me again when I was in a position to debug it. I had several tabs open. I later went back to the webbrowser-app (don't remember if it restarted or I was opening it fresh or what) and the tabs were gone, replaced by the start page.

The session files seem normal (i.e. they describe the current state of the webbrowser-app).

.local/share/webbrowser-app/session.json:
{"currentIndex":0,"tabs":[{"uniqueId":"BrowserTab_QMLTYPE_170(0xb87282a8)-1452995535081","url":"http://start.ubuntu.com/current/Google/?sourceid=hp","title":"Ubuntu Start Page","icon":"http://start.ubuntu.com/favicon.ico","preview":"","savedState":"MAMAAAUAAABveGlkZQAAAAEAAAABAAAAAAAAADMAAABodHRwOi8vc3RhcnQudWJ1bnR1LmNvbS9jdXJyZW50L0dvb2dsZS8/c291cmNlaWQ9aHAAEQAAAFUAYgB1AG4AdAB1ACAAUwB0AGEAcgB0ACAAUABhAGcAZQAAAGwCAABoAgAAFwAAAAAAAABmAAAAaAB0AHQAcAA6AC8ALwBzAHQAYQByAHQALgB1AGIAdQBuAHQAdQAuAGMAbwBtAC8AYwB1AHIAcgBlAG4AdAAvAEcAbwBvAGcAbABlAC8APwBzAG8AdQByAGMAZQBpAGQAPQBoAHAAAAD/////AAAAAAAAAAD/////FQAAAF4AAAAKAA0APwAlACAAQgBsAGkAbgBrACAAcwBlAHIAaQBhAGwAaQB6AGUAZAAgAGYAbwByAG0AIABzAHQAYQB0AGUAIAB2AGUAcgBzAGkAbwBuACAAOQAgAAoADQA9ACYAAABOAAAAaAB0AHQAcAA6AC8ALwB3AHcAdwAuAGcAbwBvAGcAbABlAC4AYwBvAG0ALwBzAGUAYQByAGMAaAAgAFsAcQAgAGkAZQAgAF0AIAAjADAAAAACAAAANgAAAAIAAABxAAAADAAAAHMAZQBhAHIAYwBoAAIAAAAwAAAADgAAAGMAaABhAG4AbgBlAGwAAAAMAAAAaABpAGQAZABlAG4AAgAAADAAAAAMAAAAYwBsAGkAZQBuAHQADAAAAGgAaQBkAGQAZQBuAAIAAAAwAAAABAAAAGgAbAAMAAAAaABpAGQAZABlAG4AAgAAADAAAAAEAAAAcwBhAAwAAABoAGkAZABkAGUAbgACAAAAMAAAAAQAAABpAGUADAAAAGgAaQBkAGQAZQBuAAIAAAAwAAAACAAAAAAAAAAAAPA/ikW+530pBQCLRb7nfSkFAAEAAAAIAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////AAAAAAEAAAAAAAAAAAAAAAEAAAAYAAAAaHR0cDovL3N0YXJ0LnVidW50dS5jb20vAAAAAPyVRDAUiC4AAAAAAMgAAAABAAAAAAAAAA=="}]}

.local/share/webbrowser-app/session.json.lock:
851
webbrowser-app
ubuntu-phablet

(851 is the current webbrowser-app instance, showing the start page)

There are several crash files, but nothing for webbrowser-app.

Anything else to try? This has happened to me several times since reporting it ten days ago. Maybe 3 or 4 in that time? Very annoying. And we're about to release OTA 9, presumably with this bug still present.

Has anyone else hit this?

Revision history for this message
Olivier Tilloy (osomon) wrote :

I’ve never hit that issue myself, but it is concerning indeed.
The state file after the app has restarted will almost always look normal and reflect the current state, so it won’t be very interesting. What would be much more interesting for debugging purposes is the state file after the app has crashed/been killed and before it is launched again.

Changed in webbrowser-app (Ubuntu):
importance: Undecided → High
status: New → Incomplete
Revision history for this message
Philippe Piquer (philippep62-e) wrote :

Browser has 2 tabs open , i go away from the the browser to use another app, when i come back the browser is blurred and reloads only the startpage.

Can be reproduced again and again.

OTA9 on BQ Aquaris 4.5

Revision history for this message
Olivier Tilloy (osomon) wrote :

A wild guess is that the browser is trying to save the current session while the app gets suspended, resulting in a corrupt session file. When the app is launched again, it tries to read the corrupt file, and falls back to not restoring anything.

I’ll see if I can add a mechanism to ensure that the session state is written to a temporary file first, and if that succeed, move that file to the browser’s data directory. This will hopefully make it more robust.

Olivier Tilloy (osomon)
Changed in webbrowser-app (Ubuntu):
assignee: nobody → Olivier Tilloy (osomon)
status: Incomplete → In Progress
Changed in canonical-devices-system-image:
status: New → In Progress
importance: Undecided → High
assignee: nobody → Bill Filler (bfiller)
milestone: none → ww08-2016
Changed in canonical-devices-system-image:
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package webbrowser-app - 0.23+16.04.20160322-0ubuntu1

---------------
webbrowser-app (0.23+16.04.20160322-0ubuntu1) xenial; urgency=medium

  * Make google maps work in complete mode on tablets. (LP: #1560079)
  * Tentative fix for a bug where the session state stored on disk is
    apparently corrupted, thus discarding the current browsing session.
    (LP: #1531583)

 -- Olivier Tilloy <email address hidden> Tue, 22 Mar 2016 06:46:57 +0000

Changed in webbrowser-app (Ubuntu):
status: In Progress → Fix Released
Changed in canonical-devices-system-image:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.