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 760319 - [EEwsNotification] Abort session on idle, to avoid deadlock
[EEwsNotification] Abort session on idle, to avoid deadlock
Status: RESOLVED FIXED
Product: evolution-ews
Classification: Other
Component: Contacts (Global Address List)
3.18.x
Other Linux
: Normal normal
: ---
Assigned To: Evolution EWS maintainer(s)
Evolution EWS maintainer(s)
: 761711 766944 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2016-01-08 12:49 UTC by David Woodhouse
Modified: 2016-05-30 12:25 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description David Woodhouse 2016-01-08 12:49:18 UTC
Not quite sure how I triggered this; I was using the addressbook autocompletion from GAL... and then it stopped working. Went into the contacts view in Evolution and found that not working either.

This is the Fedora 23 3.18.3-1 build.

(gdb) t a a bt 

Thread 10 (Thread 0x7f239c967700 (LWP 19644))

  • #0 syscall
    at ../sysdeps/unix/sysv/linux/x86_64/syscall.S line 38
  • #1 g_cond_wait
    at gthread-posix.c line 1397
  • #2 soup_session_real_flush_queue
    at soup-session.c line 2524
  • #3 soup_session_abort
    at soup-session.c line 2556
  • #4 ews_notification_soup_got_chunk
    at e-ews-notification.c line 725
  • #5 g_cclosure_marshal_VOID__BOXEDv
    at gmarshal.c line 1950
  • #6 _g_closure_invoke_va
    at gclosure.c line 864
  • #7 g_signal_emit_valist
    at gsignal.c line 3292
  • #8 g_signal_emit
    at gsignal.c line 3439
  • #9 soup_message_got_chunk
    at soup-message.c line 1130
  • #10 io_read
    at soup-message-io.c line 770
  • #11 io_run_until
    at soup-message-io.c line 982
  • #12 io_run
    at soup-message-io.c line 1053
  • #13 soup_message_io_client
    at soup-message-io.c line 1233
  • #14 soup_message_send_request
    at soup-message-client-io.c line 161
  • #15 soup_connection_send_request
    at soup-connection.c line 723
  • #16 soup_session_send_queue_item
    at soup-session.c line 1342
  • #17 soup_session_process_queue_item
    at soup-session.c line 2019
  • #18 soup_session_real_send_message
    at soup-session.c line 2246
  • #19 e_ews_notification_get_events_thread
    at e-ews-notification.c line 780
  • #20 e_ews_notification_get_events_thread
    at e-ews-notification.c line 821
  • #21 g_thread_proxy
    at gthread.c line 778
  • #22 start_thread
    at pthread_create.c line 334
  • #23 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 109

Thread 8 (Thread 0x7f239bb28700 (LWP 19675))

  • #0 syscall
    at ../sysdeps/unix/sysv/linux/x86_64/syscall.S line 38
  • #1 g_cond_wait
    at gthread-posix.c line 1397
  • #2 soup_session_real_flush_queue
    at soup-session.c line 2524
  • #3 soup_session_abort
    at soup-session.c line 2556
  • #4 _g_closure_invoke_va
    at gclosure.c line 864
  • #5 g_signal_emit_valist
    at gsignal.c line 3292
  • #6 g_signal_emit
    at gsignal.c line 3439
  • #7 g_cancellable_cancel
    at gcancellable.c line 508
  • #8 e_ews_notification_stop_listening_sync
    at e-ews-notification.c line 891
  • #9 e_ews_connection_enable_notifications_sync
    at e-ews-connection.c line 9299
  • #10 handle_notifications_thread
    at e-book-backend-ews.c line 3647
  • #11 g_thread_proxy
    at gthread.c line 778
  • #12 start_thread
    at pthread_create.c line 334
  • #13 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 109

Thread 1 (Thread 0x7f23d837d840 (LWP 19568))

  • #0 __lll_lock_wait
    at ../sysdeps/unix/sysv/linux/x86_64/lowlevellock.S line 135
  • #1 __GI___pthread_mutex_lock
    at ../nptl/pthread_mutex_lock.c line 116
  • #2 e_book_backend_ews_stop_view
    at e-book-backend-ews.c line 3433
  • #3 impl_DataBookView_dispose
    at e-data-book-view.c line 303
  • #4 ffi_call_unix64
  • #5 ffi_call
  • #10 <emit signal ??? on instance 0x7f23b417d400 [EGdbusBookViewStub]>
    at gsignal.c line 3439
  • #11 e_gdbus_stub_handle_method_call
    at e-gdbus-templates.c line 677
  • #12 call_in_idle_cb
    at gdbusconnection.c line 4832
  • #13 g_main_context_dispatch
    at gmain.c line 3154
  • #14 g_main_context_dispatch
    at gmain.c line 3769
  • #15 g_main_context_iterate
    at gmain.c line 3840
  • #16 g_main_loop_run
    at gmain.c line 4034
  • #17 main
    at evolution-addressbook-factory-subprocess.c line 216

Comment 1 Milan Crha 2016-02-23 13:40:13 UTC
*** Bug 761711 has been marked as a duplicate of this bug. ***
Comment 2 Milan Crha 2016-02-23 13:43:36 UTC
This looks like ~3 years ago fixed bug #691399. I think the main issue here is that the  soup_session_abort() is called from within the  ews_notification_soup_got_chunk(), which is inside of the soup call, thus the soup session is waiting for a finish of that same soup call => starving (it's not a direct deadlock on the locks).
Comment 3 Milan Crha 2016-02-23 14:33:08 UTC
I also made a test build of the evolution-ews, here [1], which prints could interesting information. One to look for contains "this could eventually break for" from "ews_notification_soup_got_chunk". If it'll show up on the evolution console, or the address book factory console, then the bug had been triggered.
I believe the change is correct, but I'd prefer if you could verify it too.

Another approach would be to use SoupSession, instead of SoupSessionSync, but that has side effects.

Created commit d223480 in ews master (3.19.91+)

[1] http://koji.fedoraproject.org/koji/taskinfo?taskID=13107555
Comment 4 Milan Crha 2016-05-30 10:49:59 UTC
*** Bug 766944 has been marked as a duplicate of this bug. ***
Comment 5 Brian J. Murrell 2016-05-30 11:02:28 UTC
(In reply to Milan Crha from comment #3)
> I also made a test build of the evolution-ews, here [1],
> 
> [1] http://koji.fedoraproject.org/koji/taskinfo?taskID=13107555

Yes, I had that installed but unfortunately evolution-ews-3.18.5-2.fc23.x86_64 has since superseded that and so I cannot check for the interesting information.  :-(
Comment 6 Milan Crha 2016-05-30 12:25:13 UTC
Okay, in that case here's a newer scratch build for the Fedora 23:
http://koji.fedoraproject.org/koji/taskinfo?taskID=14311701