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 661979 - Crash in e_ews_connection_sync_folder_items_start at e-ews-connection.c:1838
Crash in e_ews_connection_sync_folder_items_start at e-ews-connection.c:1838
Status: RESOLVED FIXED
Product: evolution-ews
Classification: Other
Component: Miscellaneous / EWS Core
3.2.x
Other Linux
: Normal critical
: ---
Assigned To: Evolution EWS maintainer(s)
Evolution EWS maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2011-10-17 10:40 UTC by Akhil Laddha
Modified: 2012-04-23 07:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed ews patch (11.99 KB, patch)
2011-12-14 16:30 UTC, Milan Crha
none Details | Review
updated ews patch (12.11 KB, patch)
2012-02-08 08:31 UTC, Milan Crha
reviewed Details | Review
ews patch ]I[ (41.49 KB, patch)
2012-03-20 09:40 UTC, Milan Crha
committed Details | Review

Description Akhil Laddha 2011-10-17 10:40:10 UTC
Evolution 3.2.1 + Exchange 2007

1. Clicked on a meeting request (itip format message)
2. It was showing 'opening a calendar ...' string in message preview
3. Waited for 30 seconds
4. Clicked on calendar in switcher
5. Clicked on contacts in switcher, quickly before it could open calendar view
6. Evolution crashed

Program received signal SIGSEGV, Segmentation fault.

Thread 4 (Thread 0xb49feb70 (LWP 28545))

  • #0 __kernel_vsyscall
  • #1 read
    at ../sysdeps/unix/syscall-template.S line 82
  • #2 unix_signal_helper_thread
    at gmain.c line 4567
  • #3 g_thread_create_proxy
    at gthread.c line 1962
  • #4 start_thread
    at pthread_create.c line 297
  • #5 clone
    at ../sysdeps/unix/sysv/linux/i386/clone.S line 130

Comment 1 Milan Crha 2011-12-14 07:26:23 UTC
Similar downstream bug report from 3.2.2:
https://bugzilla.redhat.com/show_bug.cgi?id=767437

User's steps:
My calendar has never updated since connecting to the exchange
server with evolution-ews.  I have left it open for ages.  I can send mail
using my mail account.  Three lines appear under my address heading in the
calendar view.  They say "BCX", "Calendar" and again "Calendar".  I un-ticked
the boxes, waited 5 seconds, then ticked them again.  At that moment the
calendar crash appeared.
Comment 2 Milan Crha 2011-12-14 16:30:59 UTC
Created attachment 203488 [details] [review]
proposed ews patch

for evolution-ews;

Could you try with this patch please? I wasn't able to reproduce exactly this crash, but a similar one, thus maybe this will help here too. Thanks in advance.
Comment 3 Milan Crha 2012-02-08 08:31:01 UTC
Created attachment 207063 [details] [review]
updated ews patch

for evolution-ews;

The previous patch was using uninitialized memory in ews_get_attachments_ready_callback()
Comment 4 Chenthill P 2012-03-07 04:15:19 UTC
Review of attachment 207063 [details] [review]:

Am fine with rest of the fix, except one concern. The similar fix has to be done with address-book as well which would fix this bug. While the delta thread runs in address-book the connection object seems to be null. This bug also exposes the need for input parameter checks in EwsConnection API's.

::: src/server/e-ews-connection.c
@@ +340,3 @@
 	ews_trigger_next_request(cnc);
+	/* to not have a race when this holds the last reference to cnc */
+	g_idle_add (unref_in_idle_cb, ews_node->simple);

How does this has to do with cnc ? g_object_unref (ews_node->simple); would just remove the EwsAsyncData struct isn it?
Comment 5 Milan Crha 2012-03-20 08:23:16 UTC
(In reply to comment #4)
> ::: src/server/e-ews-connection.c
> @@ +340,3 @@
>      ews_trigger_next_request(cnc);
> +    /* to not have a race when this holds the last reference to cnc */
> +    g_idle_add (unref_in_idle_cb, ews_node->simple);
> 
> How does this has to do with cnc ? g_object_unref (ews_node->simple); would
> just remove the EwsAsyncData struct isn it?

Hmm, I do not recall what made me think this change is useful, and checking now you are right, this has nothing to do with 'cnc'. I'll drop it from the patch.
Comment 6 Milan Crha 2012-03-20 09:40:34 UTC
Created attachment 210152 [details] [review]
ews patch ]I[

for evolution-ews;

Updated patch, with changes which Chen requested. It's quite boring reading, I only removed the strange chunk from e-ews-connection, and added parameter checks on cnc != NULL in the same file, then I updated the book backend, to use a global cancellable where is none provided by the API.
Comment 7 Milan Crha 2012-04-23 07:00:49 UTC
Created commit 4c27486 in ews master (3.5.1+)