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 607744 - Crash on MAPI notification close
Crash on MAPI notification close
Status: RESOLVED FIXED
Product: evolution-mapi
Classification: Applications
Component: Mail
0.29.x
Other Linux
: High blocker
: ---
Assigned To: evolution-mapi-maint
evolution-mapi-maint
Depends on:
Blocks:
 
 
Reported: 2010-01-22 09:50 UTC by Akhil Laddha
Modified: 2010-02-08 14:38 UTC
See Also:
GNOME target: ---
GNOME version: 2.27/2.28


Attachments
proposed ema patch (11.25 KB, patch)
2010-02-04 15:21 UTC, Milan Crha
reviewed Details | Review

Description Akhil Laddha 2010-01-22 09:50:33 UTC
evolution 2.29.5 
libmapi 0.9

When i logged in into the laptop after suspension, found that evolution had crashed. 

gdb traces of evolution

exchange-mapi-connection.c:2355: Entering exchange_mapi_set_flags libexchangemapi-Message: exchange-mapi-connection.c:2357: exchange_mapi_set_flags: lock(connect_lock)
libexchangemapi-Message: exchange-mapi-connection.c:2395: exchange_mapi_set_flags: unlock(connect_lock)

exchange-mapi-connection.c:2397: Leaving exchange_mapi_set_flags [Thread 0xacb91b70 (LWP 4358) exited]
evolution-shell-Message: Network disconnected.  Forced offline.
evolution-shell-Message: Preparing for offline mode...
[New Thread 0xacb91b70 (LWP 4534)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xacb91b70 (LWP 4534)]
0xb1383e21 in exchange_mapi_events_monitor_close () at exchange-mapi-connection.c:3075
3075			close (notify_ctx->fd);
(gdb) t a a bt

Thread 42 (Thread 0xacb91b70 (LWP 4534))

  • #0 exchange_mapi_events_monitor_close
    at exchange-mapi-connection.c line 3075
  • #1 mapi_disconnect
    at camel-mapi-store.c line 405
  • #2 camel_service_disconnect
    at camel-service.c line 426
  • #3 camel_offline_store_set_network_state
    at camel-offline-store.c line 163
  • #4 set_offline_exec
    at mail-ops.c line 2422
  • #5 mail_msg_proxy
    at mail-mt.c line 459
  • #6 g_thread_pool_thread_proxy
    at gthreadpool.c line 265
  • #7 g_thread_create_proxy
    at gthread.c line 635
  • #8 start_thread
    at pthread_create.c line 297
  • #9 ??
    at pthread_create.c line 216

Thread 1 (Thread 0xb6330760 (LWP 3857))

  • #0 IA__g_object_ref
    at gobject.c line 2339
  • #1 IA__g_list_foreach
    at glist.c line 789
  • #2 _gdk_window_process_updates_recurse
    at gdkwindow.c line 4999
  • #3 _gdk_windowing_window_process_updates_recurse
    at gdkwindow-x11.c line 5567
  • #4 gdk_window_process_updates_internal
    at gdkwindow.c line 5220
  • #5 IA__gdk_window_process_all_updates
    at gdkwindow.c line 5328
  • #6 gdk_window_update_idle
    at gdkwindow.c line 4954
  • #7 gdk_threads_dispatch
    at gdk.c line 506
  • #8 g_idle_dispatch
    at gmain.c line 4065
  • #9 g_main_dispatch
    at gmain.c line 1960
  • #10 IA__g_main_context_dispatch
    at gmain.c line 2513
  • #11 g_main_context_iterate
    at gmain.c line 2591
  • #12 IA__g_main_loop_run
    at gmain.c line 2799
  • #13 IA__gtk_main
    at gtkmain.c line 1216
  • #14 main
    at main.c line 609
  • #0 exchange_mapi_events_monitor_close
    at exchange-mapi-connection.c line 3075
  • #1 mapi_disconnect
    at camel-mapi-store.c line 405
  • #2 camel_service_disconnect
    at camel-service.c line 426
  • #3 camel_offline_store_set_network_state
    at camel-offline-store.c line 163
  • #4 set_offline_exec
    at mail-ops.c line 2422
  • #5 mail_msg_proxy
    at mail-mt.c line 459
  • #6 g_thread_pool_thread_proxy
    at gthreadpool.c line 265
  • #7 g_thread_create_proxy
    at gthread.c line 635
  • #8 start_thread
    at pthread_create.c line 297
  • #9 ??
    at pthread_create.c line 216
(gdb)
Comment 1 Akhil Laddha 2010-02-02 08:12:44 UTC
I got same crash when i tried to go offline and closed the dialog which asks 'do you want to synchronize or not'
Comment 2 Akhil Laddha 2010-02-04 05:56:58 UTC
I get this crash every time when i go offline.
Comment 3 Milan Crha 2010-02-04 15:19:32 UTC
I recall I saw something similar myself too, though not too often.
Comment 4 Milan Crha 2010-02-04 15:21:46 UTC
Created attachment 153014 [details] [review]
proposed ema patch

for evolution-mapi;

Please give a try to this. While I was changing the notification API there, I fixed also the notification itself, which I broke few days ago, based on investigation by Jony, whom found that the callback isn't called at all, thus newly received messages are not shown "automatically".
Comment 5 Milan Crha 2010-02-04 15:22:42 UTC
Just note that with this patch it will not crash on the same place, because I removed that function completely. Only make sure it's not more unstable than before. Thanks.
Comment 6 Akhil Laddha 2010-02-05 06:38:10 UTC
I have applied the patch. It doesn't crash as before but i get crash reported in bug 607732 often.
Comment 7 Milan Crha 2010-02-05 12:37:08 UTC
Created commit 006728d in ema master (0.29.90+)

Slightly changed patch, to adapt it to recent master changes. With respect of the other bug, let's move there, I'm not seeing the crash itself, but valgrind claims to me.
Comment 8 Jonathon Jongsma 2010-02-05 16:46:54 UTC
This change seems to be causing a crash at shutdown for me:

  • #0 free
    from /lib/ld-linux.so.2
  • #1 raise
    from /lib/libc.so.6
  • #2 abort
    from /lib/libc.so.6
  • #3 tevent_abort
  • #4 _tevent_loop_once
    at tevent.c line 469
  • #5 dcerpc_request_recv
    at librpc/rpc/dcerpc.c line 1144
  • #6 dcerpc_ndr_request_recv
    at librpc/rpc/dcerpc.c line 1459
  • #7 dcerpc_ndr_request
    at librpc/rpc/dcerpc.c line 1544
  • #8 dcerpc_EcDoRpc
    at gen_ndr/ndr_exchange_c.c line 1801
  • #9 emsmdb_transaction
    at libmapi/emsmdb.c line 337
  • #10 Release
    at libmapi/IUnknown.c line 149
  • #11 Unsubscribe
    at libmapi/IMAPISupport.c line 215
  • #12 exchange_mapi_events_unsubscribe
    at exchange-mapi-connection.c line 3162
  • #13 mapi_push_notification_listener
    at camel-mapi-notifications.c line 238
  • #14 session_thread_proxy
    at camel-session.c line 590
  • #15 g_thread_pool_thread_proxy
    at gthreadpool.c line 265
  • #16 g_thread_create_proxy
    at gthread.c line 635
  • #17 ??
    from /lib/libpthread.so.0
  • #18 clone
    from /lib/libc.so.6

Comment 9 Milan Crha 2010-02-08 13:23:59 UTC
(In reply to comment #8)
> This change seems to be causing a crash at shutdown for me

Oh, thanks, I do not see it myself. I guess the "t a a bt" would show here that the global session is doing something in some other thread, thus I added session lock to notification functions, which might ensure it'll be run only when the session is not used elsewhere. Please reopen if not. Thanks.

Created commit 68a1e00 in ema master (0.29.91+)
Comment 10 Milan Crha 2010-02-08 14:38:29 UTC
Err, and commit 35409ea, as I used session lock where I shouldn't.