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 697710 - Going offline doesn't disconnect remote stores
Going offline doesn't disconnect remote stores
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Mailer
3.10.x (obsolete)
Other Linux
: Normal critical
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2013-04-10 13:12 UTC by Milan Crha
Modified: 2013-09-21 13:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
evo patch (1.42 KB, patch)
2013-04-10 13:14 UTC, Milan Crha
reviewed Details | Review
evo patch ][ (2.99 KB, patch)
2013-04-11 11:37 UTC, Milan Crha
committed Details | Review

Description Milan Crha 2013-04-10 13:12:24 UTC
When going to offline, by pressing the online/offline button on the left of the status bar, the remote stores are not disconnected. One can notice since a fix for bug #271262, the disconnected stores are insensitive in Send/Receive menu.

My steps:
a) evolution --offline
b) check Send/Receive menu (or toolbar popup), remote stores are insensitive
c) go Online (by clicking the online/offline button)
d) when activities in status bar settle, you can see all Send/Receive
   connected stores enabled (sensitive)
e) click Online/Offline button to go offline again
f) answer "Do not synchronize" - I rarely let it synchronize
g) when activities in status bar settle, check the Send/Receive menu,
   you'll see that for example IMAP stores are still sensitive, while store
   like POP3 is not. All remote stores should be insensitive, like
   in step b)
Comment 1 Milan Crha 2013-04-10 13:14:45 UTC
Created attachment 241148 [details] [review]
evo patch

for evolution;

This is fixing that. The reason was that the EActivity in prepare-for-offline has set its CamelOperation before a call to mail_cancel_all(), thus even this new CamelOperation was cancelled, before it got used. Moving the cancellable setup below fixes the disconnect, but...
Comment 2 Milan Crha 2013-04-10 13:17:16 UTC
...but I've got a crash on an IMAPX store disconnect finish, thus the patch cannot be committed as such:

> *** glibc detected *** evolution: double free or corruption (fasttop):
> 0x0000000002f884f0 ***

Thread 2 (Thread 0x7fd82dad9700 (LWP 10141))

  • #0 waitpid
    from /lib64/libpthread.so.0
  • #1 g_spawn_sync
    at gspawn.c line 408
  • #2 g_spawn_command_line_sync
    at gspawn.c line 737
  • #3 run_bug_buddy
    at gnome-segvhanlder.c line 240
  • #4 bugbuddy_segv_handle
    at gnome-segvhanlder.c line 191
  • #5 <signal handler called>
  • #6 raise
    from /lib64/libc.so.6
  • #7 abort
    from /lib64/libc.so.6
  • #8 __libc_message
    from /lib64/libc.so.6
  • #9 _int_free
    from /lib64/libc.so.6
  • #10 g_free
    at gmem.c line 252
  • #11 _gtk_tree_data_list_value_to_node
    at gtktreedatalist.c line 237
  • #12 gtk_list_store_real_set_value
    at gtkliststore.c line 876
  • #13 gtk_list_store_set_valist_internal
    at gtkliststore.c line 1061
  • #14 gtk_list_store_set_valist
    at gtkliststore.c line 1152
  • #15 gtk_list_store_set
    at gtkliststore.c line 1194
  • #16 mail_account_store_update_row
    at e-mail-account-store.c line 180
  • #17 mail_account_store_service_notify_cb
    at e-mail-account-store.c line 196
  • #18 g_closure_invoke
    at gclosure.c line 777
  • #19 signal_emit_unlocked_R
    at gsignal.c line 3551
  • #20 g_signal_emit_valist
    at gsignal.c line 3300
  • #21 g_signal_emit
    at gsignal.c line 3356
  • #22 g_object_dispatch_properties_changed
    at gobject.c line 1041
  • #23 g_object_notify_by_spec_internal
    at gobject.c line 1135
  • #24 g_object_notify
    at gobject.c line 1177
  • #25 camel_offline_store_set_online_sync
    at camel-offline-store.c line 222
  • #26 mail_store_go_offline_thread
    at e-mail-store-utils.c line 191
  • #27 run_in_thread
    at gsimpleasyncresult.c line 869
  • #28 io_job_thread
    at gioscheduler.c line 162
  • #29 g_thread_pool_thread_proxy
    at gthreadpool.c line 309
  • #30 g_thread_proxy
    at gthread.c line 797
  • #31 start_thread
    from /lib64/libpthread.so.0
  • #32 clone
    from /lib64/libc.so.6

Comment 3 Milan Crha 2013-04-10 13:49:46 UTC
I tried to revert change from bug #271262, and I get a similar crash, the only difference is that it crashes in the Thread 1, not in a dedicated thread like in the above bracktrace. The backtrace is also shorter.
Comment 4 Milan Crha 2013-04-10 14:04:06 UTC
I cannot reproduce the crash in 3.8.0 (I might be just lucky?), thus I'm moving this to 3.9.x.
Comment 5 Matthew Barnes 2013-04-10 14:51:11 UTC
mail_account_store_service_notify_cb() should schedule an idle callback instead of updating the tree model directly from the signal handler.  That would fix the GTK+ calls from the wrong thread.
Comment 6 Milan Crha 2013-04-11 10:59:08 UTC
(In reply to comment #5)
> mail_account_store_service_notify_cb() should schedule an idle callback instead
> of updating the tree model directly from the signal handler.  That would fix
> the GTK+ calls from the wrong thread.

Right. Weird is that I do not get the crash in 3.8. Nonetheless, I'm going to try the schedule thing.
Comment 7 Milan Crha 2013-04-11 11:37:20 UTC
Created attachment 241244 [details] [review]
evo patch ][

for evolution;

OK, this adds the schedule of the notify_cb on idle, which seems to do the trick. The only thing is that I god another crash in ews code, but it can be (also) related to bug #670939 which I had applied. An EWS provider crashed on finalize, when it tried to disconnect its service. I'll test more and update this bug with my findings.
Comment 8 Milan Crha 2013-04-11 11:54:30 UTC
Hrm, I cannot reproduce the EWS crash again, let's do this:

Created commit 765a50d in evo master (3.9.1+)