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 600449 - segfault in camel_msgport_destroy
segfault in camel_msgport_destroy
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Mailer
2.28.x (obsolete)
Other Linux
: Normal critical
: ---
Assigned To: Milan Crha
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2009-11-02 16:34 UTC by Brian J. Murrell
Modified: 2009-11-27 12:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed eds patch (3.17 KB, patch)
2009-11-24 12:27 UTC, Milan Crha
committed Details | Review

Description Brian J. Murrell 2009-11-02 16:34:59 UTC
This one appears similar to bug 600322 as the crash emanates from only a few lines below that one, but this one is indeed different.  Maybe it's a result of my NOOPing the earlier "g_assert(reply == msg)".

However, in the crash below, here's a small analysis of frame 6:

Thread 24 (Thread 3859)

  • #0 camel_folder_summary_check_uid
    at camel-folder-summary.c line 452
  • #1 message_info_from_uid
    at camel-vee-summary.c line 364
  • #2 camel_folder_summary_uid
    at camel-folder-summary.c line 620
  • #3 unmatched_check_uid
    at camel-vee-folder.c line 1048
  • #4 IA__g_hash_table_foreach
    at /build/buildd/glib2.0-2.22.2/glib/ghash.c line 1211
  • #5 vee_rebuild_folder
    at camel-vee-folder.c line 1260
  • #6 vee_add_folder
    at camel-vee-folder.c line 1932
  • #7 camel_vee_folder_add_folder
    at camel-vee-folder.c line 225
  • #8 vfolder_adduri_exec
    at mail-vfolder.c line 273
  • #9 mail_msg_proxy
    at mail-mt.c line 522
  • #10 g_thread_pool_thread_proxy
    at /build/buildd/glib2.0-2.22.2/glib/gthreadpool.c line 265
  • #11 g_thread_create_proxy
    at /build/buildd/glib2.0-2.22.2/glib/gthread.c line 635
  • #12 start_thread
    at pthread_create.c line 300
  • #13 clone
    at ../sysdeps/unix/sysv/linux/i386/clone.S line 130

Thread 23 (Thread 10668)

  • #0 IA__g_ascii_strncasecmp
  • #1 camel_imap_command_response
    at camel-imap-command.c line 347
  • #2 imap_rescan
    at camel-imap-folder.c line 938
  • #3 imap_refresh_info
    at camel-imap-folder.c line 799
  • #4 camel_folder_refresh_info
    at camel-folder.c line 345
  • #5 refresh_folders_exec
    at mail-send-recv.c line 831
  • #6 mail_msg_proxy
    at mail-mt.c line 522
  • #7 g_thread_pool_thread_proxy
    at /build/buildd/glib2.0-2.22.2/glib/gthreadpool.c line 265
  • #8 g_thread_create_proxy
    at /build/buildd/glib2.0-2.22.2/glib/gthread.c line 635
  • #9 start_thread
    at pthread_create.c line 300
  • #10 clone
    at ../sysdeps/unix/sysv/linux/i386/clone.S line 130

Comment 1 Brian J. Murrell 2009-11-02 17:43:48 UTC
BTW, the message that's printed when this triggers is:

GThread-ERROR **: file /build/buildd/glib2.0-2.22.2/gthread/gthread-posix.c: line 171 (g_mutex_free_posix_impl): error 'Device or resource busy' during 'pthread_mutex_destroy ((pthread_mutex_t *) mutex)'
Comment 2 Akhil Laddha 2009-11-03 03:58:00 UTC
looks related to bug 578827
Comment 3 Brian J. Murrell 2009-11-20 04:22:42 UTC
I seem to have hit this again:

Thread 2 (Thread 18978)

  • #0 g_source_list_add
    at /build/buildd/glib2.0-2.22.2/glib/gmain.c line 747
  • #1 IA__g_source_attach
    at /build/buildd/glib2.0-2.22.2/glib/gmain.c line 812
  • #2 IA__g_timeout_add_full
    at /build/buildd/glib2.0-2.22.2/glib/gmain.c line 3517
  • #3 IA__g_timeout_add
    at /build/buildd/glib2.0-2.22.2/glib/gmain.c line 3558
  • #4 ik_source_check
    at /build/buildd/glib2.0-2.22.2/gio/inotify/inotify-kernel.c line 149
  • #5 IA__g_main_context_check
    at /build/buildd/glib2.0-2.22.2/glib/gmain.c line 2469
  • #6 g_main_context_iterate
    at /build/buildd/glib2.0-2.22.2/glib/gmain.c line 2588
  • #7 IA__g_main_loop_run
    at /build/buildd/glib2.0-2.22.2/glib/gmain.c line 2799
  • #8 bonobo_main
    at bonobo-main.c line 311
  • #9 main
    at main.c line 732

Comment 4 Brian J. Murrell 2009-11-20 04:41:22 UTC
And yet again.  Notice that it's a mere 20 minutes since the last one.  And evolution was not even up fully since the last time, still setting up vfolders and whatnot.  You can imagine how frustrating it is to have evolution fall down again before it's even up.  How is a person to get any real work done when the tools are soooooo unreliable?

In this case, I was composing a reply to a message sent to me.

Thread 20 (Thread 11538)

  • #0 __pthread_mutex_lock
    at pthread_mutex_lock.c line 61
  • #1 IA__g_static_rw_lock_reader_unlock
    at /build/buildd/glib2.0-2.22.2/glib/gthread.c line 855
  • #2 IA__g_type_interface_peek
    at /build/buildd/glib2.0-2.22.2/gobject/gtype.c line 2858
  • #3 IA__g_file_read
    at /build/buildd/glib2.0-2.22.2/gio/gfile.c line 1456
  • #4 IA__g_loadable_icon_load
    at /build/buildd/glib2.0-2.22.2/gio/gloadableicon.c line 128
  • #5 icon_info_ensure_scale_and_pixbuf
    at /build/buildd/gtk+2.0-2.18.3/gtk/gtkicontheme.c line 2919
  • #6 IA__gtk_icon_info_load_icon
    at /build/buildd/gtk+2.0-2.18.3/gtk/gtkicontheme.c line 3066
  • #7 gtk_cell_renderer_pixbuf_create_themed_pixbuf
    at /build/buildd/gtk+2.0-2.18.3/gtk/gtkcellrendererpixbuf.c line 537
  • #8 gtk_cell_renderer_pixbuf_get_size
    at /build/buildd/gtk+2.0-2.18.3/gtk/gtkcellrendererpixbuf.c line 615
  • #9 gtk_cell_renderer_pixbuf_render
    at /build/buildd/gtk+2.0-2.18.3/gtk/gtkcellrendererpixbuf.c line 687
  • #10 IA__gtk_cell_renderer_render
    at /build/buildd/gtk+2.0-2.18.3/gtk/gtkcellrenderer.c line 578
  • #11 gtk_tree_view_column_cell_process_action
    at /build/buildd/gtk+2.0-2.18.3/gtk/gtktreeviewcolumn.c line 2835
  • #12 _gtk_tree_view_column_cell_render
    at /build/buildd/gtk+2.0-2.18.3/gtk/gtktreeviewcolumn.c line 3168
  • #13 gtk_tree_view_bin_expose
    at /build/buildd/gtk+2.0-2.18.3/gtk/gtktreeview.c line 4606
  • #14 gtk_tree_view_expose
    at /build/buildd/gtk+2.0-2.18.3/gtk/gtktreeview.c line 4955
  • #15 _gtk_marshal_BOOLEAN__BOXED
    at /build/buildd/gtk+2.0-2.18.3/gtk/gtkmarshalers.c line 84
  • #16 g_type_class_meta_marshal
    at /build/buildd/glib2.0-2.22.2/gobject/gclosure.c line 878
  • #17 IA__g_closure_invoke
    at /build/buildd/glib2.0-2.22.2/gobject/gclosure.c line 767
  • #18 signal_emit_unlocked_R
    at /build/buildd/glib2.0-2.22.2/gobject/gsignal.c line 3285
  • #19 IA__g_signal_emit_valist
    at /build/buildd/glib2.0-2.22.2/gobject/gsignal.c line 2990
  • #20 IA__g_signal_emit
    at /build/buildd/glib2.0-2.22.2/gobject/gsignal.c line 3037
  • #21 gtk_widget_event_internal
    at /build/buildd/gtk+2.0-2.18.3/gtk/gtkwidget.c line 4767
  • #22 IA__gtk_main_do_event
    at /build/buildd/gtk+2.0-2.18.3/gtk/gtkmain.c line 1571
  • #23 _gdk_window_process_updates_recurse
    at /build/buildd/gtk+2.0-2.18.3/gdk/gdkwindow.c line 5061
  • #24 _gdk_window_process_updates_recurse
    at /build/buildd/gtk+2.0-2.18.3/gdk/gdkwindow.c line 5034
  • #25 _gdk_window_process_updates_recurse
    at /build/buildd/gtk+2.0-2.18.3/gdk/gdkwindow.c line 5034
  • #26 _gdk_windowing_window_process_updates_recurse
    at /build/buildd/gtk+2.0-2.18.3/gdk/x11/gdkwindow-x11.c line 5566
  • #27 gdk_window_process_updates_internal
    at /build/buildd/gtk+2.0-2.18.3/gdk/gdkwindow.c line 5220
  • #28 IA__gdk_window_process_all_updates
    at /build/buildd/gtk+2.0-2.18.3/gdk/gdkwindow.c line 5328
  • #29 gtk_container_idle_sizer
    at /build/buildd/gtk+2.0-2.18.3/gtk/gtkcontainer.c line 1353
  • #30 gdk_threads_dispatch
    at /build/buildd/gtk+2.0-2.18.3/gdk/gdk.c line 506
  • #31 g_idle_dispatch
    at /build/buildd/glib2.0-2.22.2/glib/gmain.c line 4065
  • #32 g_main_dispatch
    at /build/buildd/glib2.0-2.22.2/glib/gmain.c line 1960
  • #33 IA__g_main_context_dispatch
    at /build/buildd/glib2.0-2.22.2/glib/gmain.c line 2513
  • #34 g_main_context_iterate
    at /build/buildd/glib2.0-2.22.2/glib/gmain.c line 2591
  • #35 IA__g_main_loop_run
    at /build/buildd/glib2.0-2.22.2/glib/gmain.c line 2799
  • #36 bonobo_main
    at bonobo-main.c line 311
  • #37 main
    at main.c line 732

Comment 5 Brian J. Murrell 2009-11-20 04:57:25 UTC
Grrrrrr!  And again!  I am not hitting the cancel button for any of these.  Just tell me what is happening so that I can avoid doing it and I can get evolution to stay up for more than 20 minutes.  Long enough to even finish setting up the fricken' vfolders already!  Man I soooooo want 2.24 back.  Nothing, not a thing, that has been done since that release has been at all near worth all of this instability.


Comment 6 Brian J. Murrell 2009-11-20 15:21:21 UTC
~sigh~  And yet again...

Thread 25 (Thread 18239)

  • #0 _int_malloc
    at malloc.c line 4278
  • #1 *__GI___libc_malloc
    at malloc.c line 3638
  • #2 xmlStrndup__internal_alias
    at xmlstring.c line 45
  • #3 xmlParseAttValueInternal
    at parser.c line 8565
  • #4 xmlParseAttValue__internal_alias
    at parser.c line 3861
  • #5 xmlParseAttribute__internal_alias
    at parser.c line 7975
  • #6 xmlParseStartTag__internal_alias
    at parser.c line 8077
  • #7 xmlParseTryOrFinish
    at parser.c line 10840
  • #8 xmlParseChunk__internal_alias
    at parser.c line 11602
  • #9 ??
    from /usr/lib/librsvg-2.so.2
  • #10 ??
    from /usr/lib/gtk-2.0/2.10.0/loaders/svg_loader.so
  • #11 IA__gdk_pixbuf_loader_write
    at /build/buildd/gtk+2.0-2.18.3/gdk-pixbuf/gdk-pixbuf-loader.c line 473
  • #12 load_from_stream
    at /build/buildd/gtk+2.0-2.18.3/gdk-pixbuf/gdk-pixbuf-io.c line 1526
  • #13 IA__gdk_pixbuf_new_from_stream_at_scale
    at /build/buildd/gtk+2.0-2.18.3/gdk-pixbuf/gdk-pixbuf-io.c line 1606
  • #14 icon_info_ensure_scale_and_pixbuf
    at /build/buildd/gtk+2.0-2.18.3/gtk/gtkicontheme.c line 2925
  • #15 IA__gtk_icon_info_load_icon
    at /build/buildd/gtk+2.0-2.18.3/gtk/gtkicontheme.c line 3066
  • #16 IA__gtk_icon_theme_load_icon
    at /build/buildd/gtk+2.0-2.18.3/gtk/gtkicontheme.c line 1547
  • #17 e_task_widget_construct
  • #18 e_task_widget_new_with_cancel
  • #19 task_widget_new_from_activity_info
    at e-activity-handler.c line 164
  • #20 e_activity_handler_cancelable_operation_started
  • #21 op_status_exec
    at mail-mt.c line 1000
  • #22 mail_msg_idle_cb
    at mail-mt.c line 493
  • #23 g_idle_dispatch
    at /build/buildd/glib2.0-2.22.2/glib/gmain.c line 4065
  • #24 g_main_dispatch
    at /build/buildd/glib2.0-2.22.2/glib/gmain.c line 1960
  • #25 IA__g_main_context_dispatch
    at /build/buildd/glib2.0-2.22.2/glib/gmain.c line 2513
  • #26 g_main_context_iterate
    at /build/buildd/glib2.0-2.22.2/glib/gmain.c line 2591
  • #27 IA__g_main_loop_run
    at /build/buildd/glib2.0-2.22.2/glib/gmain.c line 2799
  • #28 bonobo_main
    at bonobo-main.c line 311
  • #29 main
    at main.c line 732

Comment 7 Brian J. Murrell 2009-11-20 15:22:52 UTC
I should mention, that prior to one of these crashes, evo always prints out:

GThread-ERROR **: file /build/buildd/glib2.0-2.22.2/gthread/gthread-posix.c: line 171 (g_mutex_free_posix_impl): error 'Device or resource busy' during 'pthread_mutex_destroy ((pthread_mutex_t *) mutex)'
aborting...
Comment 8 Brian J. Murrell 2009-11-21 15:52:31 UTC
And another.  These happen while I am away from the computer even, so most definitely not driven by me canceling anything.


Comment 9 Milan Crha 2009-11-23 19:13:01 UTC
All the threads are same in one way, there is in one thread shown:
> #0  0x00c34422 in __kernel_vsyscall ()
> #1  0x002cdc0b in write ()
> #2  0x00bdc75c in camel_msgport_push (msgport=0xab92498, msg=0xa05045e0)
>          at camel-msgport.c:340
> #3  0x00bdc8eb in camel_msgport_reply (msg=0x1) at camel-msgport.c:424
> #4  0x00bdf325 in cs_getaddrinfo (data=0x1) at camel-net-utils.c:662
> #5  0x002c680e in start_thread (arg=0x863fdb70) at pthread_create.c:300
> #6  0x015f57ee in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

and then in the other thread (which has number 1 in the latest trace, thought the thread number 3 is a main thread :( ):

> #0  0x00c34422 in __kernel_vsyscall ()
> #1  0x015534d1 in *__GI_raise (sig=6)
> #2  0x01556932 in *__GI_abort () at abort.c:92
> #3  0x05540036 in IA__g_logv (...
> #4  0x05540066 in IA__g_log (log_domain=0x3d5888 "GThread", ...)
> #5  0x003d52c4 in g_mutex_free_posix_impl (mutex=0x99dd58b0)
> #6  0x055113cf in IA__g_async_queue_unref (queue=0x96c437f0)
> #7  0x00bdcad8 in camel_msgport_destroy (msgport=0xab92498)
>       at camel-msgport.c:285
> #8  0x00bded53 in cs_waitinfo (worker=<value optimized out>,
>       msg=<value optimized out>, error=0xbf7ebb "Host lookup failed",
>       ex=0x8e1fe1e8) at camel-net-utils.c:530
> #9  0x00bdf198 in camel_getaddrinfo (name=0x9aa3de0 "mail",
>       service= 0x3fa5758 "imap", hints=0x8e1fde90, ex=0x8e1fe1e8)
>       at camel-net-utils.c:706
> #10 0x03f9ddbb in connect_to_server_wrapper (service=<value optimized
>       out>, ex=<value optimized out>) at camel-imap-store.c:975
> #11 0x03f9e4d7 in imap_connect (service=0x9a93698, ex=0x8e1fe1e8)
>       at camel-imap-store.c:1412
> #12 0x008f6c47 in camel_service_connect (service=0x9a93698, ex=0x8e1fe1e8)
>       at camel-service.c:364
> #13 0x03f9a084 in camel_imap_store_connected (store=0x9a93698,
>       ex=0x8e1fe1e8) at camel-imap-store.c:3009
> #14 0x03f8f7bf in replay_offline_journal (imap_store=0x9a93698,
>       imap_folder=0xad2bb08, ex=0x8e1fe1e8) at camel-imap-folder.c:249
> #15 0x03f914b6 in imap_sync (folder=0xad2bb08, expunge=0, ex=0x8e1fe1e8)
>       at camel-imap-folder.c:1410
> #16 0x008e3ab6 in camel_folder_sync (folder=0xad2bb08, expunge=0,
>       ex=0x8e1fe1e8) at camel-folder.c:321
> #17 0x00909235 in vee_sync (folder=0x994aaf0, expunge=0, ex=0x8e1fe1e8)
>       at camel-vee-folder.c:576
> #18 0x008e3ab6 in camel_folder_sync (folder=0x994aaf0, expunge=0,
>       ex=0x8e1fe1e8) at camel-folder.c:321
> #19 0x0120b36f in refresh_folders_exec (m=0x9a814b20)
>       at mail-send-recv.c:829
> #20 0x012095d0 in mail_msg_proxy (msg=0x9a814b20) at mail-mt.c:522
> #21 0x0556199f in g_thread_pool_thread_proxy (data=0x974efa0)
> #22 0x0556036f in g_thread_create_proxy (data=0x1217cad0)
> #24 0x015f57ee in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

See the same msgport=0xab92498 in both threads, so there failed something with a waiting on the thread finish. What everything do you have changed exactly in camel-net-utils.c from your evolution-data-server sources of 2.28.1?
Comment 10 Brian J. Murrell 2009-11-23 19:39:11 UTC
(In reply to comment #9)
> 
> See the same msgport=0xab92498 in both threads,

Yeah.

> so there failed something with
> a waiting on the thread finish. What everything do you have changed exactly in
> camel-net-utils.c from your evolution-data-server sources of 2.28.1?

Other than bug 574940, I have a patch which is probably related to 600322:

--- ./camel/camel-net-utils.c	2009-11-16 19:13:27.000000000 -0500
+++ /tmp/camel-net-utils.c	2009-11-16 19:13:11.000000000 -0500
@@ -513,7 +513,13 @@
 		} else {
 			struct _addrinfo_msg *reply = (struct _addrinfo_msg *)camel_msgport_try_pop(reply_port);
 
+#if 0
 			g_assert(reply == msg);
+#else
+			if (reply != msg)
+				fprintf (stderr, "oh no!  the world is going to end!  "
+								 "reply(%p) != msg(%p)\n", reply, msg);
+#endif
 			d(printf("waiting for child to exit\n"));
 			pthread_join(id, NULL);
 			d(printf("child done\n"));

Of course, it's not lost on me that that g_assert is there for a reason and simply commenting it out is not a real solution it was the difference between an evolution which stays up for a while and one that crashes pretty soon right after starting it.  A better solution very warmly welcomed.  :-)

FWIW in fact, I don't seem to have failed this "reply != msg" test since my last restart of evolution.
Comment 11 Milan Crha 2009-11-24 12:27:28 UTC
Created attachment 148381 [details] [review]
proposed eds patch

for evolution-data-server;

OK, could you revert all your changes in camel-net-utils.c and apply this patch only, please? I think I got the issue, but it'll be better if you can test it too. Thanks in advance. Note, I believe it'll fix bug #600322 as well.
Comment 12 Milan Crha 2009-11-25 22:09:15 UTC
it would be nice to have this on Monday's release of 2.29.3 for wider testing. So if you'll be able to test it before it, then it'll be great.
Comment 13 Brian J. Murrell 2009-11-25 22:33:03 UTC
(In reply to comment #12)
> it would be nice to have this on Monday's release of 2.29.3 for wider testing.

Indeed.

> So if you'll be able to test it before it, then it'll be great.

It's running right now.  Installed it earlier this afternoon and (touch wood) Evolution's been up all day.  I'm not convinced that without some other/unknown external funkiness that I hit this all that often though after I went through the stdout from Evolution in the last day or two.

This one might boil down to yet another situation where if everything on the network isn't just perfect, Evolution throws a fit as I was experiencing it every few minutes when I was experiencing it.  Unfortunately, I don't know what it was that Evolution was so upset about at the time.  Everything else looked normal.

In any case, this patch doesn't seem to introduce any new and bad behavior as per the last few hours of using it.
Comment 14 Milan Crha 2009-11-26 09:41:59 UTC
(In reply to comment #13)
> In any case, this patch doesn't seem to introduce any new and bad behavior as
> per the last few hours of using it.

Good, thanks for the update. Let it run for today and if everything will go well I'll commit this to master and gnome-2-28 tomorrow.
Comment 15 Milan Crha 2009-11-27 12:16:48 UTC
Created commit 7961e6c in eds master (2.29.3+)
Created commit e6a6360 in eds gnome-2-28 (2.28.2+)