GNOME Bugzilla – Bug 600861
Backup utility should use --quit instead of --force-shutdown
Last modified: 2010-04-17 17:47:33 UTC
This is a follow up on bug 540516. The backup-restore tool just quits while backin up or restoring a file. At first I thought this is due to the file containing a space, but I am now convinced that it happens regardless that fact. Executing new program: /opt/gnome2/libexec/evolution/2.30/evolution-backup [Thread debugging using libthread_db enabled] [New Thread 0x7f6c6dc62910 (LWP 7230)] Program received signal SIGTERM, Terminated. 0x00007f6c78ea4373 in *__GI___poll (fds=<value optimised out>, nfds=<value optimised out>, timeout=49) at ../sysdeps/unix/sysv/linux/poll.c:87 87 ../sysdeps/unix/sysv/linux/poll.c: No such file or directory. in ../sysdeps/unix/sysv/linux/poll.c (gdb) thread 9 (gdb) bt
+ Trace 218838
What I think happens is, that evolution --force-shutdown call to pkill quits the restore program itself. Since pkill kills the processes that match pgrep, a simple "pgrep evolution" confirmed that it shows up the PID of the backup tool. So in order to get that backup tool working, we probably need either a good evolution --shutdown implementation or just get rid of that. A quick fix could be to install a TERM signal handler, so that the backup-tool just continues. With that, the backup-tool successfully runs and backups/recovers the data.
Created attachment 147029 [details] [review] Patch which installs signal handler Compiles and works fine for me :-)
Two thoughts: 1) We already keep an ~/.evolution/.running file around for the duration of the session. We should write Evolution's process ID to that file so we don't have to use 'pkill' at all. The backup program can just learn the exact process ID from there. 2) Given that Evolution 2.29 is now a single-instance application under libunique, I would prefer --force-shutdown first send a "shutdown" command to the main evolution process (via libunique) so it has a chance to shutdown cleanly if it's still alive and responsive. Then, if it hasn't responded after a sufficient timeout, kill the process. I described a similar protocol (with more details) for E-D-S in bug #590245.
*** Bug 615235 has been marked as a duplicate of this bug. ***
*** Bug 610583 has been marked as a duplicate of this bug. ***
Tobi, do you have plan to rework the patch based on Matthew's review comments ?
I'm afraid no. I have too much other stuff to do already and won't bother with this in the foreseeable future.
Fixed in: http://git.gnome.org/browse/evolution/commit/?id=8bce26958ff1dddadfeeeba9475239473fc71a94 The backup utility now passes --quit instead of --force-shutdown to Evolution, which initiates a graceful shutdown and doesn't use pkill.