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 663122 - Doesn't quit on exit with GLib's git master
Doesn't quit on exit with GLib's git master
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: general
3.4.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: Evolution Shell Maintainers Team
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2011-10-31 20:17 UTC by David Ronis
Modified: 2013-09-13 01:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed evo patch (365 bytes, patch)
2011-12-02 10:07 UTC, Milan Crha
committed Details | Review

Description David Ronis 2011-10-31 20:17:09 UTC
I just started evolution (today's git/master).   Shortly after the UI mapped, I exited it by pressing
ctrl-c.   The UI disappears, but evo still keeps running in the background (for at least 5 min, in the latest test).

I attached gdb and got the following backtrace:

(gdb) thread apply all bt full


Comment 1 David Ronis 2011-11-29 14:50:19 UTC
After upgrading to the git master,  running evolution from a console, and trying to close it by hitting "x" on the window border, evo hung.  Here's another backtrace:

(gdb) thread apply all bt full


Comment 2 Milan Crha 2011-12-01 10:07:03 UTC
Those backtraces are pretty similar. Is it possible this is about used version of glib or gtk3? The threads are mostly in idle:
Thread 1 in gtk_main() called from evolution's main.c
Thread 2 in gdbus_shared_thread_func() from GDBus
Thread 3 in dconf_context_thread() from dconfcontext
Thread 4 in glib_worker_main() from gmain.c

The last one is new to me.

Could you try whether gtk_main_quit() is called, please? I woud run evolution under gdb in offline, let it settle (no actions shown in the status bad) and then quit evolution as you usually do? I would do it with a command like this:
   $ gdb evolution --ex "b gtk_main_quit" --ex "r --offline"

Mine is called when evolution destroys its main window:
(gdb) bt
  • #0 gtk_main_quit
    at gtkmain.c line 1406
  • #1 gtk_application_window_removed
    at gtkapplication.c line 196
  • #2 g_closure_invoke
    at gclosure.c line 774
  • #3 signal_emit_unlocked_R
    at gsignal.c line 3202
  • #4 g_signal_emit_valist
    at gsignal.c line 3003
  • #5 g_signal_emit
    at gsignal.c line 3060
  • #6 gtk_window_release_application
    at gtkwindow.c line 2637
  • #7 gtk_window_destroy
    at gtkwindow.c line 4528
  • #8 g_closure_invoke
    at gclosure.c line 774
  • #9 signal_emit_unlocked_R
    at gsignal.c line 3388
  • #10 g_signal_emit_valist
    at gsignal.c line 3003
  • #11 g_signal_emit
    at gsignal.c line 3060
  • #12 gtk_widget_dispose
    at gtkwidget.c line 10666
  • #13 shell_window_dispose
    at e-shell-window.c line 329
  • #14 g_object_run_dispose
    at gobject.c line 945
  • #15 g_list_foreach
    at glist.c line 938
  • #16 shell_ready_for_quit
    at e-shell.c line 413
  • #17 mail_backend_store_operation_done_cb
    at e-mail-backend.c line 135
  • #18 g_simple_async_result_complete
    at gsimpleasyncresult.c line 749
  • #19 complete_in_idle_cb_for_thread
    at gsimpleasyncresult.c line 817
  • #20 g_main_dispatch
    at gmain.c line 2425
  • #21 g_main_context_dispatch
    at gmain.c line 2995
  • #22 g_main_context_iterate
    at gmain.c line 3073
  • #23 g_main_loop_run
    at gmain.c line 3281
  • #24 gtk_main
    at gtkmain.c line 1362
  • #25 main
    at main.c line 675

Comment 3 David Ronis 2011-12-01 17:58:22 UTC
Hi Milan,

I tried your suggestion.   Interestingly, the break in gtk_main_quit never gets triggered.  Hitting ^C gets me back to the gdb prompt and I got a backtrace.  Here's a log:

gdb evolution --ex "b gtk_main_quit" -ex "r --offline"

Starting program: /opt/garnome-svn-3.2.0/bin/evolution --offline
[Thread debugging using libthread_db enabled]
[New Thread 0xb5f97b70 (LWP 7773)]
[New Thread 0xb576fb70 (LWP 7774)]
[New Thread 0xb4dffb70 (LWP 7775)]
[New Thread 0xa511cb70 (LWP 7781)]
[Thread 0xa511cb70 (LWP 7781) exited]
[New Thread 0xa511cb70 (LWP 7782)]
[New Thread 0xa44d0b70 (LWP 7790)]
[New Thread 0xa3cd0b70 (LWP 7791)]
[Thread 0xa3cd0b70 (LWP 7791) exited]
[Thread 0xa511cb70 (LWP 7782) exited]
[New Thread 0xa511cb70 (LWP 7792)]
[New Thread 0xa3cd0b70 (LWP 7793)]
[New Thread 0xa2effb70 (LWP 7794)]
[Thread 0xa44d0b70 (LWP 7790) exited]
[Thread 0xa2effb70 (LWP 7794) exited]
[New Thread 0xa2effb70 (LWP 7801)]
[New Thread 0xa44d0b70 (LWP 7802)]
[New Thread 0xa1fffb70 (LWP 7803)]
[Thread 0xa44d0b70 (LWP 7802) exited]
[Thread 0xa511cb70 (LWP 7792) exited]
[Thread 0xa1fffb70 (LWP 7803) exited]
[Thread 0xa2effb70 (LWP 7801) exited]
[Thread 0xa3cd0b70 (LWP 7793) exited]
^C
Program received signal SIGINT, Interrupt.
0xb620977c in poll () from /lib/libc.so.6

(gdb) thread apply all bt full


Comment 4 Milan Crha 2011-12-02 09:58:53 UTC
Thanks for the update. After some investigation I realized that this is broken after (incomplete) changes in bug #658805, which touched both GLib and gtk.
Comment 5 Milan Crha 2011-12-02 10:07:15 UTC
Created attachment 202580 [details] [review]
proposed evo patch

for evolution;

Could you try with this workaround, please? It may work, but one never knows, these days.
Comment 6 David Ronis 2011-12-02 17:49:16 UTC
The patch works here too.  Thanks Milan.
Comment 7 Milan Crha 2011-12-02 18:01:06 UTC
Thanks for testing.

Created commit 217c83b in evo master (3.3.3+)