After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 600861 - Backup utility should use --quit instead of --force-shutdown
Backup utility should use --quit instead of --force-shutdown
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Plugins
2.30.x (obsolete)
Other Linux
: High major
: ---
Assigned To: evolution-plugin-maintainers
Evolution QA team
evolution[kill-bonobo]
: 610583 615235 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-11-05 18:41 UTC by Tobias Mueller
Modified: 2010-04-17 17:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch which installs signal handler (1.60 KB, patch)
2009-11-05 18:51 UTC, Tobias Mueller
reviewed Details | Review

Description Tobias Mueller 2009-11-05 18:41:34 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
  • #0 __libc_waitpid
    at ../sysdeps/unix/sysv/linux/waitpid.c line 41
  • #1 do_system
    at ../sysdeps/posix/system.c line 149
  • #2 __libc_system
    at ../sysdeps/posix/system.c line 190
  • #3 run_cmd
    at backup.c line 175
  • #4 restore
    at backup.c line 251
  • #5 thread_start
    at backup.c line 349
  • #6 g_thread_create_proxy
    at gthread.c line 635
  • #7 start_thread
    at pthread_create.c line 300
  • #8 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 112
  • #9 ??


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.
Comment 1 Tobias Mueller 2009-11-05 18:51:16 UTC
Created attachment 147029 [details] [review]
Patch which installs signal handler

Compiles and works fine for me :-)
Comment 2 Matthew Barnes 2009-11-06 02:10:02 UTC
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.
Comment 3 Akhil Laddha 2010-04-09 04:57:02 UTC
*** Bug 615235 has been marked as a duplicate of this bug. ***
Comment 4 Akhil Laddha 2010-04-09 04:59:57 UTC
*** Bug 610583 has been marked as a duplicate of this bug. ***
Comment 5 Akhil Laddha 2010-04-09 11:50:27 UTC
Tobi, do you have plan to rework the patch based on Matthew's review comments ?
Comment 6 Tobias Mueller 2010-04-09 12:19:43 UTC
I'm afraid no. I have too much other stuff to do already and won't bother with this in the foreseeable future.
Comment 7 Matthew Barnes 2010-04-17 17:47:33 UTC
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.