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 720197 - [IMAPx] Indefinite waiting for message download
[IMAPx] Indefinite waiting for message download
Status: RESOLVED FIXED
Product: evolution-data-server
Classification: Platform
Component: Mailer
3.12.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
: 688661 723888 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-12-10 14:47 UTC by André Klapper
Modified: 2017-07-19 20:46 UTC
See Also:
GNOME target: ---
GNOME version: 3.11/3.12



Description André Klapper 2013-12-10 14:47:37 UTC
04:45:02 <andre_>	when Evo gets stuck in my GMail IMAP account with "Retrieving message 12345 in folder 'example'" and cancelling just appends the string "(cancelling)" and closing Evo does not work so I have to kill it, how would I debug that?
04:47:04 <mbarnes>	know anything about GCancellable?
04:48:08 <andre_>	my very naive expectation is that there should be some timeout. It was displayed for more than an hour before killing evolution.
04:48:29 <mbarnes>	it's just a thing to signal operations to cancel
04:48:52 <mbarnes>	it emits a "cancelled" signal, and the operation is supposed to acknowledge that and return with a G_IO_ERROR_CANCELLED error
04:49:27 <mbarnes>	the (cancelling) message means the "cancelled" signal was fired
04:49:59 <mbarnes>	if it's stuck on that, it usually means the operation is deadlocked
04:50:24 <mbarnes>	gdb trace should be sufficient
04:50:53 <mbarnes>	look for g_mutex_lock() or g_cond_wait() at the top of one of the threads
04:51:01 <andre_>	so I'd Ctrl+C at some point after getting stuck?
04:51:01 <mbarnes>	those are the usual culprits
04:52:30 <rishi>	You could use "gstack <pid>" too.
05:05:04 <andre> as I got an Evolution being stuck with "Retrieving message" for a few years again, thread 3 and thread 2 have g_cond_wait on top:



$:andre\> gstack 13664

Comment 1 Matthew Barnes 2013-12-10 18:34:56 UTC
Try this test package:
http://koji.fedoraproject.org/koji/taskinfo?taskID=6276999

This is somewhat of a guess, but shouldn't hurt anything if I'm wrong.

The patch is against 3.10.3, which I built for Fedora yesterday, so you'll have to upgrade Evolution with this.  I don't think it's even hit updates-testing yet so you may have to download evolution-3.10.3-1.fc20 from the website.
Comment 2 André Klapper 2013-12-13 14:24:40 UTC
I've been running the test package and it seems to be slightly better, however ran into this again right now:


$:andre\> gstack 2504

Thread 1 (Thread 0xb0f04900 (LWP 2504))

  • #0 _cairo_matrix_is_identity
    at cairoint.h line 1705
  • #1 _cairo_gstate_transform_glyphs_to_backend
  • #2 _cairo_gstate_show_text_glyphs
    at cairo-gstate.c line 1981
  • #3 cairo_show_glyphs
    at cairo.c line 3317
  • #4 pango_cairo_renderer_show_text_glyphs
    at pangocairo-render.c line 500
  • #5 pango_cairo_renderer_draw_glyphs
    at pangocairo-render.c line 516
  • #6 pango_renderer_draw_glyphs
    at pango-renderer.c line 641
  • #7 pango_renderer_draw_glyph_item
    at pango-renderer.c line 705
  • #8 pango_renderer_draw_layout_line
    at pango-renderer.c line 570
  • #9 pango_renderer_draw_layout
    at pango-renderer.c line 194
  • #10 _pango_cairo_do_layout
    at pangocairo-render.c line 1010
  • #11 pango_cairo_show_layout
    at pangocairo-render.c line 1138
  • #12 gtk_theming_engine_render_layout
    at gtkthemingengine.c line 2039
  • #13 gtk_render_layout
    at gtkstylecontext.c line 4146
  • #14 gtk_label_draw
    at gtklabel.c line 4095
  • #15 _gtk_marshal_BOOLEAN__BOXEDv
    at gtkmarshalers.c line 130
  • #16 gtk_widget_draw_marshallerv
    at gtkwidget.c line 1009
  • #17 g_type_class_meta_marshalv
    at gclosure.c line 997
  • #18 _g_closure_invoke_va
    at gclosure.c line 840
  • #19 g_signal_emit_valist
    at gsignal.c line 3238
  • #20 g_signal_emit
    at gsignal.c line 3386
  • #21 _gtk_widget_draw_internal
    at gtkwidget.c line 6441
  • #22 _gtk_widget_draw_internal
    at gtkwidget.c line 6573
  • #23 _gtk_widget_draw
    at gtkwidget.c line 6619
  • #24 gtk_container_propagate_draw
    at gtkcontainer.c line 3528
  • #25 gtk_container_draw
    at gtkcontainer.c line 3363
  • #26 _gtk_marshal_BOOLEAN__BOXEDv
    at gtkmarshalers.c line 130
  • #27 gtk_widget_draw_marshallerv
    at gtkwidget.c line 1009
  • #28 g_type_class_meta_marshalv
    at gclosure.c line 997
  • #29 _g_closure_invoke_va
    at gclosure.c line 840
  • #30 g_signal_emit_valist
    at gsignal.c line 3238
  • #31 g_signal_emit
    at gsignal.c line 3386
  • #32 _gtk_widget_draw_internal
    at gtkwidget.c line 6441
  • #33 _gtk_widget_draw_internal
    at gtkwidget.c line 6573
  • #34 _gtk_widget_draw
    at gtkwidget.c line 6619
  • #35 gtk_container_propagate_draw
    at gtkcontainer.c line 3528
  • #36 gtk_container_draw
    at gtkcontainer.c line 3363
  • #37 gtk_frame_draw
    at gtkframe.c line 731
  • #38 _gtk_marshal_BOOLEAN__BOXEDv
    at gtkmarshalers.c line 130
  • #39 gtk_widget_draw_marshallerv
    at gtkwidget.c line 1009
  • #40 g_type_class_meta_marshalv
    at gclosure.c line 997
  • #41 _g_closure_invoke_va
    at gclosure.c line 840
  • #42 g_signal_emit_valist
    at gsignal.c line 3238
  • #43 g_signal_emit
    at gsignal.c line 3386
  • #44 _gtk_widget_draw_internal
    at gtkwidget.c line 6441
  • #45 _gtk_widget_draw_internal
    at gtkwidget.c line 6573
  • #46 _gtk_widget_draw
    at gtkwidget.c line 6619
  • #47 gtk_container_propagate_draw
    at gtkcontainer.c line 3528
  • #48 gtk_container_draw
    at gtkcontainer.c line 3363
  • #49 _gtk_marshal_BOOLEAN__BOXEDv
    at gtkmarshalers.c line 130
  • #50 gtk_widget_draw_marshallerv
    at gtkwidget.c line 1009
  • #51 g_type_class_meta_marshalv
    at gclosure.c line 997
  • #52 _g_closure_invoke_va
    at gclosure.c line 840
  • #53 g_signal_emit_valist
    at gsignal.c line 3238
  • #54 g_signal_emit
    at gsignal.c line 3386
  • #55 _gtk_widget_draw_internal
    at gtkwidget.c line 6441
  • #56 _gtk_widget_draw_internal
    at gtkwidget.c line 6573
  • #57 _gtk_widget_draw
    at gtkwidget.c line 6619
  • #58 gtk_container_propagate_draw
    at gtkcontainer.c line 3528
  • #59 gtk_container_draw
    at gtkcontainer.c line 3363
  • #60 _gtk_marshal_BOOLEAN__BOXEDv
    at gtkmarshalers.c line 130
  • #61 gtk_widget_draw_marshallerv
    at gtkwidget.c line 1009
  • #62 g_type_class_meta_marshalv
    at gclosure.c line 997
  • #63 _g_closure_invoke_va
    at gclosure.c line 840
  • #64 g_signal_emit_valist
    at gsignal.c line 3238
  • #65 g_signal_emit
    at gsignal.c line 3386
  • #66 _gtk_widget_draw_internal
    at gtkwidget.c line 6441
  • #67 _gtk_widget_draw_internal
    at gtkwidget.c line 6573
  • #68 _gtk_widget_draw
    at gtkwidget.c line 6619
  • #69 gtk_container_propagate_draw
    at gtkcontainer.c line 3528
  • #70 gtk_notebook_draw
    at gtknotebook.c line 2599
  • #71 _gtk_marshal_BOOLEAN__BOXEDv
    at gtkmarshalers.c line 130
  • #72 gtk_widget_draw_marshallerv
    at gtkwidget.c line 1009
  • #73 g_type_class_meta_marshalv
    at gclosure.c line 997
  • #74 _g_closure_invoke_va
    at gclosure.c line 840
  • #75 g_signal_emit_valist
    at gsignal.c line 3238
  • #76 g_signal_emit
    at gsignal.c line 3386
  • #77 _gtk_widget_draw_internal
    at gtkwidget.c line 6441
  • #78 _gtk_widget_draw_internal
    at gtkwidget.c line 6573
  • #79 _gtk_widget_draw
    at gtkwidget.c line 6619
  • #80 gtk_container_propagate_draw
    at gtkcontainer.c line 3528
  • #81 gtk_container_draw
    at gtkcontainer.c line 3363
  • #82 _gtk_marshal_BOOLEAN__BOXEDv
    at gtkmarshalers.c line 130
  • #83 gtk_widget_draw_marshallerv
    at gtkwidget.c line 1009
  • #84 g_type_class_meta_marshalv
    at gclosure.c line 997
  • #85 _g_closure_invoke_va
    at gclosure.c line 840
  • #86 g_signal_emit_valist
    at gsignal.c line 3238
  • #87 g_signal_emit
    at gsignal.c line 3386
  • #88 _gtk_widget_draw_internal
    at gtkwidget.c line 6441
  • #89 _gtk_widget_draw_internal
    at gtkwidget.c line 6573
  • #90 _gtk_widget_draw
    at gtkwidget.c line 6619
  • #91 gtk_container_propagate_draw
    at gtkcontainer.c line 3528
  • #92 gtk_container_draw
    at gtkcontainer.c line 3363
  • #93 _gtk_marshal_BOOLEAN__BOXEDv
    at gtkmarshalers.c line 130
  • #94 gtk_widget_draw_marshallerv
    at gtkwidget.c line 1009
  • #95 g_type_class_meta_marshalv
    at gclosure.c line 997
  • #96 _g_closure_invoke_va
    at gclosure.c line 840
  • #97 g_signal_emit_valist
    at gsignal.c line 3238
  • #98 g_signal_emit
    at gsignal.c line 3386
  • #99 _gtk_widget_draw_internal
    at gtkwidget.c line 6441
  • #100 _gtk_widget_draw_internal
    at gtkwidget.c line 6573
  • #101 _gtk_widget_draw
    at gtkwidget.c line 6619
  • #102 gtk_container_propagate_draw
    at gtkcontainer.c line 3528
  • #103 gtk_container_draw
    at gtkcontainer.c line 3363
  • #104 gtk_window_draw
    at gtkwindow.c line 9402
  • #105 _gtk_marshal_BOOLEAN__BOXEDv
    at gtkmarshalers.c line 130
  • #106 gtk_widget_draw_marshallerv
    at gtkwidget.c line 1009
  • #107 g_type_class_meta_marshalv
    at gclosure.c line 997
  • #108 _g_closure_invoke_va
    at gclosure.c line 840
  • #109 g_signal_emit_valist
    at gsignal.c line 3238
  • #110 g_signal_emit
    at gsignal.c line 3386
  • #111 _gtk_widget_draw_internal
    at gtkwidget.c line 6441
  • #112 _gtk_widget_draw_internal
    at gtkwidget.c line 6420
  • #113 _gtk_widget_draw_windows
    at gtkwidget.c line 6542
  • #114 _gtk_widget_draw
    at gtkwidget.c line 6613
  • #115 gtk_widget_send_expose
    at gtkwidget.c line 6998
  • #116 gtk_main_do_event
    at gtkmain.c line 1626
  • #117 _gdk_event_emit
    at gdkevents.c line 69
  • #118 _gdk_window_process_updates_recurse_helper
    at gdkwindow.c line 3382
  • #119 gdk_x11_window_process_updates_recurse
    at gdkwindow-x11.c line 5435
  • #120 gdk_window_process_updates_internal
    at gdkwindow.c line 3490
  • #121 gdk_window_process_updates_with_mode
    at gdkwindow.c line 3689
  • #122 g_cclosure_marshal_VOID__VOIDv
    at gmarshal.c line 115
  • #123 _g_closure_invoke_va
    at gclosure.c line 840
  • #124 g_signal_emit_valist
    at gsignal.c line 3238
  • #125 g_signal_emit_by_name
    at gsignal.c line 3426
  • #126 gdk_frame_clock_paint_idle
    at gdkframeclockidle.c line 430
  • #127 gdk_threads_dispatch
    at gdk.c line 804
  • #128 g_timeout_dispatch
    at gmain.c line 4451
  • #129 g_main_dispatch
    at gmain.c line 3066
  • #130 g_main_context_dispatch
    at gmain.c line 3642
  • #131 g_main_context_iterate
    at gmain.c line 3713
  • #132 g_main_loop_run
    at gmain.c line 3907
  • #133 gtk_main
    at gtkmain.c line 1158
  • #134 main
    at main.c line 683

Comment 3 Milan Crha 2014-05-06 14:18:15 UTC
This might be fixed with evolution-data-server 3.12.2+. Please try with it and report back, once it is out.
Comment 4 André Klapper 2014-06-01 14:01:54 UTC
I won't upgrade to 3.12 soon, seeing other major IMAP+ issues in 3.12 reported and having had lots of IMAP+ instability issues in 3.10 already...

For the records, the problem described in this bug report still happens in
evolution-data-server-3.10.4-3.fc20.i686
evolution-3.10.4-2.fc20.i686
Comment 5 Milan Crha 2014-06-02 10:25:07 UTC
It would worth to try 3.12.2+ in a virtual machine and see whether anything was improved for you too.
Comment 6 Jean-François Fortin Tam 2014-10-06 03:39:46 UTC
Andre, have you upgraded/tested with 3.12.5+ ?
I'm seeing such hangs still, but you seem to have a much better grasp on how to actually debug these issues...
Comment 7 André Klapper 2014-10-06 08:31:05 UTC
I don't have the time for setting up and testing stuff in virtual machines currently, and I have my doubts anyway that things have really improved.

https://wiki.gnome.org/Apps/Evolution/Debugging for debugging information.
Comment 8 André Klapper 2014-12-29 19:26:03 UTC
Problem still happens in
evolution-3.12.9-1.fc21.i686
evolution-data-server-3.12.9-2.fc21.i686

Tried to close Evolution via the "X" button which disables the UI but never ever ever ends the application. Status bar shows the line:
   Retrieving message '2464' in gerrit-notifications (cancelling)

$:andre\> gstack 21890

Comment 9 André Klapper 2014-12-29 19:27:55 UTC
See Thread 8 in that stacktrace.
Comment 10 Milan Crha 2015-01-06 10:25:31 UTC
Okay, so it's not fixed. I'd like to know how to reproduce this reliably, to be able to debug it locally.
Comment 11 André Klapper 2015-01-12 14:09:37 UTC
> I'd like to know how to reproduce this reliably

Milan: Well, get a crappy internet provider with a flaky connection and run "ping" against imap.gmail.com so you realize that some packages get lost? :)

I don't think you can easily reproduce this if you don't have a "flaky connection" emulator somewhere...
Instead feel free to tell me which further information I can offer. Or take a bus/car/train and be my guest for a few days. :P

Stacktrace while running Evo with that stuck message in the status bar:

$:andre\> gstack 2456

Comment 12 André Klapper 2015-01-12 14:13:50 UTC
Garr. Stacktrace parser hides the fact that the previous comment includes a second stacktrace, after clicking the "X" icon to close Evolution so Evolution has become greyed out but never closes.
Comment 13 Milan Crha 2015-03-03 11:54:25 UTC
I think I found out what the problem is, finally. The thing is that the message download can be done by two ways: a) true download of the message through the network/connection; b) if there is an ongoing download job, then wait for its completion and decide what to do only after it's done. The problem is that if there was two concurrent message download requests, and the second was waiting for the first completion and the first failed early, then the second was waiting for the completion indefinitely, because the now-done job wasn't unregistered properly. The relevant backtrace part is below.

Created commit e3aa112 in eds master (3.15.92+)

$3  0xae8bd47c in camel_imapx_job_wait (job=job@entry=0xf227680, error=error@entry=0x0) at camel-imapx-job.c:194
$4  0xae8d491c in imapx_server_get_message
Comment 14 Milan Crha 2015-03-03 11:55:51 UTC
*** Bug 723888 has been marked as a duplicate of this bug. ***
Comment 15 André Klapper 2015-03-03 13:24:39 UTC
♥! Looking forward to trying 3.16 soon.
Comment 16 Jean-François Fortin Tam 2015-03-03 22:48:04 UTC
Aaah, a true oldschool deadlock!
Thanks for this, Milan. Hoping it's squashed for good—time will tell I guess!
Comment 17 Milan Crha 2015-05-26 20:33:57 UTC
*** Bug 688661 has been marked as a duplicate of this bug. ***
Comment 18 Milan Crha 2015-05-26 20:43:54 UTC
I just managed to reproduce another variant of this bug. The symptoms were slightly different. When there were ongoing multiple command, and the active command failed with some error, only the pending command and the active one were cancelled, but there could be also scheduled a job, which didn't have set any commands yet, which was not cancelled too, thus it was waiting for the stopped server to be served. (The "description" probably doesn't make sense.)
The fix is to cancel any leftover jobs after cancelled commands.

Created commit 565ba6c in eds master (3.17.3+)
Created commit b425140 in eds gnome-3-16 (3.16.3+)
Comment 19 Milan Crha 2015-05-26 20:56:34 UTC
*** Bug 733775 has been marked as a duplicate of this bug. ***
Comment 20 Milan Crha 2017-05-09 14:09:09 UTC
Downstream bug report claims similar issue:
https://bugzilla.redhat.com/show_bug.cgi?id=1440734

This time the message list with mail reader prevent message download due to often cancel of an ongoing message download (from mail_reader_message_selected_cb()) possibly due to message list regeneration (non-threaded view in this case). There had been offered a patch for it (which I extended with a change in e-table-selection-model.c to make the call order consistent) and committed it to sources:

Created commit_80c5a32 in evo master (3.25.2+) [1]
Created commit_1b3d8b0 in evo gnome-3-24 (3.24.3+)

[1] https://git.gnome.org/browse/evolution/commit/?id=80c5a32