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 671969 - Crash in g_thread_join, e_ews_connection_dispose
Crash in g_thread_join, e_ews_connection_dispose
Status: RESOLVED FIXED
Product: evolution-ews
Classification: Other
Component: Mail
3.4.x
Other Linux
: Normal critical
: ---
Assigned To: Evolution EWS maintainer(s)
Evolution EWS maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2012-03-13 09:34 UTC by Milan Crha
Modified: 2012-04-03 09:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
ews patch (1.13 KB, patch)
2012-04-03 09:08 UTC, Milan Crha
committed Details | Review

Description Milan Crha 2012-03-13 09:34:50 UTC
Moving this from a downstream bug report:
https://bugzilla.redhat.com/show_bug.cgi?id=802411

[abrt] evolution-3.3.91-1.fc17: g_logv: Process /usr/bin/evolution was killed by signal 5 (SIGTRAP)

libreport version: 2.0.8
abrt_version:   2.0.7
backtrace_rating: 4
cmdline:        evolution
comment:        Died just after starting with newly configured EWS account. 
crash_function: g_logv
executable:     /usr/bin/evolution
kernel:         3.3.0-0.rc6.git0.2.fc17.x86_64
reason:         Process /usr/bin/evolution was killed by signal 5 (SIGTRAP)
time:           Mon 12 Mar 2012 02:46:21 PM CET
xsession_errors: evolution-mail-CRITICAL **: e_mail_account_store_add_service:
assertion `account != NULL' failed


Thread 1 (Thread 0x7f88277fe700 (LWP 1665))

  • #0 g_logv
  • #1 g_log
  • #2 g_system_thread_wait
    at gthread-posix.c line 1158
  • #3 g_thread_join
    at gthread.c line 966
  • #4 e_ews_connection_dispose
    at e-ews-connection.c line 882
  • #5 g_object_unref
    at gobject.c line 2981
  • #6 g_simple_async_result_finalize
    at gsimpleasyncresult.c line 269
  • #7 g_object_unref
    at gobject.c line 3018
  • #8 ews_active_job_done
    at e-ews-connection.c line 339
  • #9 ews_response_cb
    at e-ews-connection.c line 500
  • #10 process_queue_item
    at soup-session-async.c line 432
  • #11 run_queue
    at soup-session-async.c line 467
  • #12 idle_run_queue
    at soup-session-async.c line 494
  • #13 g_main_dispatch
    at gmain.c line 2510
  • #14 g_main_context_dispatch
    at gmain.c line 3047
  • #15 g_main_context_iterate
    at gmain.c line 3118
  • #16 g_main_loop_run
    at gmain.c line 3312
  • #17 e_ews_soup_thread
    at e-ews-connection.c line 974
  • #18 g_thread_proxy
    at gthread.c line 801
  • #19 start_thread
    at pthread_create.c line 309
  • #20 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 115

Comment 1 Milan Crha 2012-04-03 09:08:41 UTC
Created attachment 211206 [details] [review]
ews patch

for evolution-ews;

This should fix it. The reason basically is that the 'simple' holds reference on 'cnc' and ews_active_job_done() function is called in a dedicated thread, which 'cnc' joins on dispose, thus to avoid race condition, unref the object in its own thread. I do not think there is anything better here and checking for cnc->ref_count whether it makes sense to run unref in the dedicated thread or not seems to me incorrect.
Comment 2 Milan Crha 2012-04-03 09:20:14 UTC
Created commit 6ee9d80 in ews master (3.5.1+)
Created commit 49771be in ews gnome-3-4 (3.4.1+)