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).
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).