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 699553 - Crash in xmlOutputBufferClose when called from ews_client_autodiscover_data_free()
Crash in xmlOutputBufferClose when called from ews_client_autodiscover_data_f...
Status: RESOLVED FIXED
Product: gnome-online-accounts
Classification: Core
Component: Exchange
3.8.x
Other All
: Normal critical
: ---
Assigned To: GNOME Online Accounts maintainer(s)
GNOME Online Accounts maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2013-05-03 06:44 UTC by Milan Crha
Modified: 2014-09-18 11:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
ewsclient: Correctly cancel pending messages on success (4.30 KB, patch)
2014-06-02 13:36 UTC, Debarshi Ray
none Details | Review
ewsclient: Correctly cancel pending messages on success (4.30 KB, patch)
2014-06-02 14:13 UTC, Debarshi Ray
committed Details | Review

Description Milan Crha 2013-05-03 06:44:17 UTC
Moving this from a downstream bug report:
https://bugzilla.redhat.com/show_bug.cgi?id=958336

Description of problem:
Seems to be related to an exchange account. I added one, and then it crashed. Seems to work okay if I remove this account from goa.

Version-Release number of selected component:
gnome-online-accounts-3.8.1-1.fc19

Additional info:
backtrace_rating: 4
cmdline:        /usr/libexec/goa-daemon
crash_function: xmlOutputBufferClose__internal_alias
executable:     /usr/libexec/goa-daemon
kernel:         3.9.0-301.fc19.x86_64

Core was generated by `/usr/libexec/goa-daemon'.
Program terminated with signal 6, Aborted.

Thread 1 (Thread 0x7fdd4bf8fa40 (LWP 3412))

  • #0 __GI_raise
    at ../nptl/sysdeps/unix/sysv/linux/raise.c line 56
  • #1 __GI_abort
    at abort.c line 90
  • #2 __libc_message
    at ../sysdeps/unix/sysv/linux/libc_fatal.c line 196
  • #3 malloc_printerr
  • #4 _int_free
    at malloc.c line 3768
  • #5 xmlOutputBufferClose__internal_alias
    at xmlIO.c line 2609
  • #6 ews_client_autodiscover_data_free
    at goaewsclient.c line 105
  • #7 g_main_dispatch
    at gmain.c line 3054
  • #8 g_main_context_dispatch
    at gmain.c line 3630
  • #9 g_main_context_iterate
    at gmain.c line 3701
  • #10 g_main_loop_run
    at gmain.c line 3895
  • #11 main
    at main.c line 135

Comment 1 Debarshi Ray 2013-06-11 13:09:10 UTC
Ankur,

Can you find out if ews_client_autodiscover_data_free (goaewsclient.c) is getting called twice? If that is the case, then I am curious about what is going on inside ews_client_autodiscover_response_cb.

You should be able to kill your existing goa-daemon and run it from the command line.

Thanks!
Comment 2 Ankur Sinha (FranciscoD) 2013-06-12 07:20:59 UTC
Hi Debarshi,

Can you please tell me how to check this for you, i.e., what steps are required? 

Thanks,
Ankur
Comment 3 Debarshi Ray 2013-06-12 13:33:17 UTC
Download the sources for 3.8.1 or the gnome-3-8 branch and put a "g_message" call. Configure, build and install. Just make sure that you use --enable-kerberos, and kill the existing goa-daemon process before running your own.
Comment 4 Debarshi Ray 2014-06-02 12:59:03 UTC
(In reply to comment #1)

> Can you find out if ews_client_autodiscover_data_free (goaewsclient.c) is
> getting called twice? If that is the case, then I am curious about what is
> going on inside ews_client_autodiscover_response_cb.

Yes, indeed, that is what is happening here. It happens when the messages from the Exchange server arrive in a particular order. When the first response is successful, it tries to cancel the other messages that are in flight, and this is when the crash occurs. Passing SOUP_STATUS_NONE to soup_session_cancel_message does not work as intended and this was broken by the following commit:

commit 27e86279bbaff430fe0757f97c97c44d190b7da6
Author: Debarshi Ray <debarshir@gnome.org>
Date:   Wed Dec 5 15:26:09 2012 +0100

    ewsclient: Differentiate between short-circuited and cancelled messages
    
    Since more than one message is queued, we cancel the rest if any one
    of them is successful. This short-circuiting is different from cases
    where all messages are cancelled because of a soup_session_abort
    triggered by a GCancellable.
    
    Fixes: https://bugzilla.gnome.org/689642

Unfortunately, against all my three test servers the successful message usually arrives last, which made it hard for me to reproduce the problem.
Comment 5 Debarshi Ray 2014-06-02 13:36:21 UTC
Created attachment 277722 [details] [review]
ewsclient: Correctly cancel pending messages on success
Comment 6 Debarshi Ray 2014-06-02 14:13:41 UTC
Created attachment 277725 [details] [review]
ewsclient: Correctly cancel pending messages on success
Comment 7 Debarshi Ray 2014-06-03 10:06:57 UTC
Review of attachment 277725 [details] [review]:

Tested it for a couple of days and I think this crash is fixed.
Comment 8 Debarshi Ray 2014-06-03 10:10:51 UTC
Pushed to master, gnome-3-12 and gnome-3-10.