QupZilla / qupzilla

Cross-platform Qt web browser
http://www.qupzilla.com
GNU General Public License v3.0
1.11k stars 349 forks source link

lockfile caused grey hairs, lost almost a day needlessly #2492

Open ethoms opened 6 years ago

ethoms commented 6 years ago

Firstly, Qupzilla is awesome, and the rate of progress is fantastic to see. I feel it's getting close to being able to be my daily driver (v2.1.2 here). I'm using KDE 5.10.5 on an up-to-date Gento on Intel x64.

So yesterday I was doing some fairly major Gentoo management in emerge, I'm just learning the ropes. And this morning my 2 y/o son restarted my machine.

So when I logged in, Qupzilla didn't start from the launcher menu. So I tried from the terminal (console), no luck, not a single output / error message to go on. Next, I rebuilt Qupzilla thinking my Gentoo emerge yesterday missed the need to rebuild Qupzilla after my changes, no luck. Then I renamed my .config/qupzilla directory so that it would use a fresh profile, no luck. So then I decided to look for log file entries for signs, no luck. After reading the Qupzilla FAQ on the website, I decided to rebuild Qupzilla with 'debug' USE flag and installed gdb. After running 'start' from the 'gdb /usr/bin/qupzilla' prompt, nothing to go on. No crashlog either. So then I decided to do an 'emerge -e www-client/qupzilla' which will reinstall all dependencies as well (HUGE amount of recompiling!).

A long time later it suddenly dawned on me that it may be something stale / corrupted in '/tmp' or '/var/tmp'. So I cleaned it out a bit and noticed a file with similar name to this: '/tmp/qtsingleapp-QupZil-b880-3e8-lockfile'. After blowing that away, Qupzilla started fine.

If I hadn't been messing with my system using emerge, I would have probably found the issue much sooner, because the possibilities of blame would be different. But an average user would really struggle to fix this.

So I see two problems here:

(i) When running qupzilla from a terminal, a message should appear stating why the application is going to close. However this will only help the advanced user that thinks to try the terminal as a form of debugging. Perhaps a system tray notification would be better.

(ii) The fact that a lockfile, which is fairly trivially left behind (after a power failure or crash) can actually block the running of the application given a healthy installation and profile.

Funny thing is, I remember having an issue like this with Firefox many years ago (perhaps around the 3.x days). But they must have resolved it because Firefox today handles recovering from crashes and power failures very well.

ghost commented 6 years ago

This is a typical „zombie“ or „orphan“ process behavior. Your system just was not restarted but only the X-server. That can never occurs if the process has been terminated!