QLockFile won't notice if the lock pid is re-used by an unrelated process

Bug #1500444 reported by Michael Terry
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical System Image
Fix Released
High
Pat McGowan
qtbase-opensource-src (Ubuntu)
Fix Released
High
Timo Jyrinki
qtbase-opensource-src (Ubuntu RTM)
Fix Released
High
Timo Jyrinki
webbrowser-app (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

My desktop webbrowser-app instance no longer seems to be remembering the previous session tabs and opening them at startup.

I don't see any output on the console. Any tips for helping debug this?

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

There is a top-level setting that you can switch on/off to remember the last browsing session. Maybe it was turned off (it is on by default)?

If not, it could be that the serialized session file is corrupted, deleting $HOME/.local/share/webbrowser-app/session.json should help (before you do that, can you make a backup copy, and if it doesn’t contain any sensitive information send it my way for further investigation?).

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

After some digging, this is a bug in QLockFile. It doesn't take process name into account. So if the pid for the session.json lockfile is re-used (easy to do after a reboot), it will act like the session file is still valid.

Qt trunk fixes this (http://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/io/qlockfile_unix.cpp?h=dev). So it's just a matter of updating Qt (or backporting the patch).

summary: - Isn't remembering old session tabs
+ QLockFile won't notice if the lock pid is re-used by an unrelated
+ process
Revision history for this message
Michael Terry (mterry) wrote :
Changed in webbrowser-app (Ubuntu):
status: New → Invalid
Revision history for this message
Michael Terry (mterry) wrote :

I've added canonical-devices-system-image, since this bug has a real effect on the phone -- sometimes the browser will fail to restore its last session.

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

Here's a version of the upstream patch, modified to apply against wily's version of Qt.

tags: added: patch
kevin gunn (kgunn72)
Changed in canonical-devices-system-image:
assignee: nobody → Pat McGowan (pat-mcgowan)
importance: Undecided → High
Changed in qtbase-opensource-src (Ubuntu):
importance: Undecided → High
Changed in qtbase-opensource-src (Ubuntu RTM):
importance: Undecided → High
Changed in qtbase-opensource-src (Ubuntu):
assignee: nobody → Timo Jyrinki (timo-jyrinki)
Changed in qtbase-opensource-src (Ubuntu RTM):
assignee: nobody → Timo Jyrinki (timo-jyrinki)
Revision history for this message
kevin gunn (kgunn72) wrote :

@Mirv - just assigning to you for patch landing, since i figure you might have more than one to land, if it doesn't make sense, just ping us on irc

Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

Starting landing.

Changed in qtbase-opensource-src (Ubuntu RTM):
status: New → In Progress
Changed in qtbase-opensource-src (Ubuntu):
status: New → In Progress
Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :
Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

Vivid: https://launchpad.net/~ci-train-ppa-service/+archive/ubuntu/landing-041/
Wily: https://launchpad.net/~ci-train-ppa-service/+archive/ubuntu/landing-051/ (still building, ETA 2h)

Please test.

Final OTA-7 freeze is today so this won't land to it unless specifically targeted to that milestone, or if this silo is put into QA queue already today.

Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

qtbase-opensource-src (5.4.1+dfsg-2ubuntu10) vivid; urgency=medium

  * debian/patches/stale-process-lock.patch:
    - Fix QLockFile not noticing if the lock pid is re-used by unrelated
      process (LP: #1500444)

 -- Timo Jyrinki <email address hidden> Tue, 29 Sep 2015 05:11:51 +0000

Changed in canonical-devices-system-image:
milestone: none → ww40-2015
Changed in qtbase-opensource-src (Ubuntu RTM):
status: In Progress → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qtbase-opensource-src - 5.4.2+dfsg-2ubuntu6

---------------
qtbase-opensource-src (5.4.2+dfsg-2ubuntu6) wily; urgency=medium

  * debian/patches/stale-process-lock.patch:
    - Fix QLockFile not noticing if the lock pid is re-used by unrelated
      process (LP: #1500444)

 -- Timo Jyrinki <email address hidden> Tue, 29 Sep 2015 07:18:23 +0000

Changed in qtbase-opensource-src (Ubuntu):
status: In Progress → Fix Released
Michael Terry (mterry)
Changed in canonical-devices-system-image:
status: New → Fix Committed
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.