tbh I was a bit sceptical about that previous patch anyways. If I read
it correctly, it only tried to not leave stale lock files in some
circumstances. Problem with our case is that it might happen while the
app is suspended and then OOM killed which means there is no chance for
the Qt code to clean it up and it will leave a stale lock file, no
matter how clever it tries to be in cleaning them up.

What I think needs to happen is that when the app starts up again (or
tries to obtain a lock) it needs to be clever enough to determine that
this lock is a stale one from a previous and ignore it.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to qtbase-opensource-src in
Ubuntu.
https://bugs.launchpad.net/bugs/1576989

Title:
  stale lock files freeze apps

Status in Canonical System Image:
  Confirmed
Status in qtbase-opensource-src package in Ubuntu:
  Confirmed
Status in qtbase-opensource-src package in Ubuntu RTM:
  New

Bug description:
  Debugging why the Notes app would freeze for some people, I found
  there were some stale .lock files around. Those .lock files are
  autocreated by QSettings (with QLockFile) when this file is edited.
  Problem is, that it sometimes seems to happen that the app is
  suspended by our lifecycle and then killed (either by closing from
  spread or OOM killed) and those .lock files stick around. I have
  implemented a workaround in the notes app[1] to clear up those stale
  locks when the app starts app, however, today I ran twice in a row
  into the issue that the very same happened to music app. It would just
  freeze on startup and never come back. Digging around a bit I found
  such a stale lock file on its config file which is created with the
  QML Settings element. This implies that every app using QSettings or
  QML Settings {} are potentially affected. I suspect many more app
  freezes can be traced down to this.

  Now, there is some code in Qt to detect stale lock files [2], however,
  not sure why it doesn't detect those lock files as stale ones and
  decides to wait on them forever though. Probably a bug in the code or
  some of the wrong #ifdefs are triggered for our package builds.

  [1] 
https://code.launchpad.net/~mzanetti/reminders-app/remove-stale-lock-files/+merge/293355
  [2] 
http://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/io/qlockfile_unix.cpp

To manage notifications about this bug go to:
https://bugs.launchpad.net/canonical-devices-system-image/+bug/1576989/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to