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 667281 - Deadlock on evolution start
Deadlock on evolution start
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Mailer
3.4.x (obsolete)
Other Linux
: Normal critical
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2012-01-04 18:29 UTC by Milan Crha
Modified: 2013-09-13 01:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
evo patch (477 bytes, patch)
2012-01-10 14:29 UTC, Milan Crha
committed Details | Review

Description Milan Crha 2012-01-04 18:29:00 UTC
I have configured real junk and trash folder on one of my two IMAP accounts. I have configured also exchange and mapi account. I have search folder which is using two folders from the IMAP account and one from local store (the same IMAP account as the real junk/trash folder is configured), though it's probably not related, because evolution doesn't start, it doesn't get that far to try to do anything useful with the search folder. See the below backtrace. I feel like this is a regression on "semi-recent" changes in evo/eds, because 3.2.3 starts as expected with this setup.

Thread 5 (Thread 0x7f0ed7328700 (LWP 9787))

  • #0 read
    from /lib64/libpthread.so.0
  • #1 read
    at /usr/include/bits/unistd.h line 45
  • #2 unix_signal_helper_thread
    at gmain.c line 4551
  • #3 g_thread_create_proxy
    at gthread.c line 1962
  • #4 start_thread
    from /lib64/libpthread.so.0
  • #5 clone
    from /lib64/libc.so.6

Thread 1 (Thread 0x7f0edf02d9c0 (LWP 9786))

  • #0 pthread_cond_wait
    from /lib64/libpthread.so.0
  • #1 camel_object_bag_get
    at camel-object-bag.c line 223
  • #2 camel_store_get_folder_sync
    at camel-store.c line 1863
  • #3 imap_store_get_junk_folder_sync
    at camel-imap-store.c line 1839
  • #4 camel_store_get_folder_sync
    at camel-store.c line 1849
  • #5 camel_store_get_junk_folder_sync
    at camel-store.c line 2291
  • #6 store_info_new
    at mail-folder-cache.c line 198
  • #7 mail_folder_cache_note_store
    at mail-folder-cache.c line 1598
  • #8 mail_folder_cache_service_enabled
    at mail-folder-cache.c line 1069
  • #9 g_closure_invoke
    at gclosure.c line 774
  • #10 signal_emit_unlocked_R
    at gsignal.c line 3272
  • #11 g_signal_emit_valist
    at gsignal.c line 3003
  • #12 g_signal_emit
    at gsignal.c line 3060
  • #13 e_mail_account_store_add_service
    at e-mail-account-store.c line 1093
  • #14 mail_session_add_service_cb
    at e-mail-session.c line 806
  • #15 g_main_dispatch
    at gmain.c line 2425
  • #16 g_main_context_dispatch
    at gmain.c line 2995
  • #17 g_main_context_iterate
    at gmain.c line 3073
  • #18 g_main_loop_run
    at gmain.c line 3281
  • #19 gtk_main
    at gtkmain.c line 1362
  • #20 main
    at main.c line 688

Comment 1 Milan Crha 2012-01-04 18:59:55 UTC
Tested with 3.2 and it does not open junk & trash folders like 3.3 does on start.
Comment 2 Milan Crha 2012-01-09 17:15:45 UTC
Downstream bug report about the same:
https://bugzilla.redhat.com/show_bug.cgi?id=772585
Comment 3 Milan Crha 2012-01-10 14:15:40 UTC
I'm wondering which component is proper for this issue, because changes in both evo and eds are causing it. I'm moving it to evo, because that's the place where I'll do the change, but the problem is with eds itself, and how it was "recently" changed.
Comment 4 Milan Crha 2012-01-10 14:29:54 UTC
Created attachment 204943 [details] [review]
evo patch

for evolution;

I do not like how this is done. There are couple problems here. The first one is in evolution, the code to open Junk and Trash folders had been added in commit [1]. I do not know what it has to do with drag&drop of accounts, but I pile various things in one commit sometimes too, thus OK. The only issue is that this calls synchronous camel function from the main thread, which is basically no-no.

The issue which this change uncovered dates back to commit [2], where was added imap_store_update_store_flags as a callback on notify::settings. I thought this is not called at all, but no, it is called, only the settings are not loaded yet. The best option would be to add signal handlers into the settings on notifications for the values it operates with, but I realized I cannot disconnect from them appropriately (before camel_service_set_settings changes it), thus I didn't go this way. Should I have my own copy of the settings of my parent object's property to be able to properly connect/disconnect for signal handlers on them? It can be done, but sounds rather ugly - may result in a copying in each CamelStore.

The result of the above findings is attached. I consider it a temporary solution, which, I believe, will be gone as soon as account-management branch will land master, replaced with appropriate change, which will also involve removal of the temporary camel_settings_load_from_url() function.

Thus: Just for now.

[1] http://git.gnome.org/browse/evolution/commit?id=7c0c40f833
[2] http://git.gnome.org/browse/evolution-data-server/commit/?id=ffa02a8e2
Comment 5 Milan Crha 2012-01-10 14:31:01 UTC
Created commit 11c24da in evo master (3.3.4+)