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 627620 - evolution segfaults in pango_layout_clear_lines in libpango
evolution segfaults in pango_layout_clear_lines in libpango
Status: RESOLVED INCOMPLETE
Product: evolution
Classification: Applications
Component: Calendar
2.28.x (obsolete)
Other Linux
: Normal critical
: ---
Assigned To: evolution-calendar-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2010-08-22 02:35 UTC by Thomas
Modified: 2011-01-10 08:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
temporary crutch, returns if layout is NULL (693 bytes, text/plain)
2010-08-22 02:42 UTC, Thomas
  Details
Probably related to the previous "fix". See stacktrace in the comment (1020 bytes, patch)
2010-08-25 03:37 UTC, Thomas
none Details | Review
return earlier if layout is NULL (1.05 KB, patch)
2010-08-29 03:52 UTC, Thomas
none Details | Review
Got another segfault (2.56 KB, patch)
2010-08-29 05:35 UTC, Thomas
none Details | Review
another segfault (3.07 KB, patch)
2010-08-29 06:06 UTC, Thomas
none Details | Review
more checking (3.36 KB, patch)
2010-08-29 06:19 UTC, Thomas
none Details | Review
more checking (3.74 KB, patch)
2010-08-29 06:52 UTC, Thomas
rejected Details | Review
I'll try this patch for the hang in _xcb_conn_wait in libxcb1 (578 bytes, patch)
2010-09-12 02:36 UTC, Thomas
none Details | Review

Description Thomas 2010-08-22 02:35:46 UTC
I only remember having entered a search term in calendar view.

gdb shows me that layout is NULL, when calling pango_layout_context_changed
in build_layout(), evolution/widgets/table/e-cell-text.c.

Here is the stack trace:
(gdb) bt
  • #0 pango_layout_clear_lines
    at /build/buildd/pango1.0-1.26.0/pango/pango-layout.c line 2718
  • #1 pango_layout_context_changed
    at /build/buildd/pango1.0-1.26.0/pango/pango-layout.c line 1241
  • #2 build_layout
    at ../../../../evolution/widgets/table/e-cell-text.c line 583
  • #3 generate_layout
    at ../../../../evolution/widgets/table/e-cell-text.c line 647
  • #4 ect_draw
    at ../../../../evolution/widgets/table/e-cell-text.c line 779
  • #5 e_cell_draw
    at ../../../../evolution/widgets/table/e-cell.c line 275
  • #6 ecp_draw
    at ../../../../evolution/widgets/table/e-cell-popup.c line 308
  • #7 e_cell_draw
    at ../../../../evolution/widgets/table/e-cell.c line 275
  • #8 eti_draw
    at ../../../../evolution/widgets/table/e-table-item.c line 2041
  • #9 gnome_canvas_group_draw
    at gnome-canvas.c line 1676
  • #10 gnome_canvas_group_draw
    at gnome-canvas.c line 1676
  • #11 gnome_canvas_group_draw
    at gnome-canvas.c line 1676
  • #12 gnome_canvas_group_draw
    at gnome-canvas.c line 1676
  • #13 gnome_canvas_paint_rect
    at gnome-canvas.c line 2996
  • #14 gnome_canvas_expose
    at gnome-canvas.c line 3051
  • #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 /home/tom/src/glib2.0-2.22.3/gobject/gclosure.c line 878
  • #17 IA__g_closure_invoke
    at /home/tom/src/glib2.0-2.22.3/gobject/gclosure.c line 767
  • #18 signal_emit_unlocked_R
    at /home/tom/src/glib2.0-2.22.3/gobject/gsignal.c line 3285
  • #19 IA__g_signal_emit_valist
    at /home/tom/src/glib2.0-2.22.3/gobject/gsignal.c line 2990
  • #20 IA__g_signal_emit
    at /home/tom/src/glib2.0-2.22.3/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 paint
    at gnome-canvas.c line 3128
  • #23 do_update
    at gnome-canvas.c line 3194
  • #24 idle_handler
    at gnome-canvas.c line 3207
  • #25 g_idle_dispatch
    at /home/tom/src/glib2.0-2.22.3/glib/gmain.c line 4065
  • #26 g_main_dispatch
    at /home/tom/src/glib2.0-2.22.3/glib/gmain.c line 1960
  • #27 IA__g_main_context_dispatch
    at /home/tom/src/glib2.0-2.22.3/glib/gmain.c line 2513
  • #28 g_main_context_iterate
    at /home/tom/src/glib2.0-2.22.3/glib/gmain.c line 2591
  • #29 IA__g_main_loop_run
    at /home/tom/src/glib2.0-2.22.3/glib/gmain.c line 2799
  • #30 bonobo_main
    at bonobo-main.c line 311
  • #31 main
    at ../../../evolution/shell/main.c line 732
  • #0 pango_layout_clear_lines
    at /build/buildd/pango1.0-1.26.0/pango/pango-layout.c line 2718

Comment 1 Thomas 2010-08-22 02:42:00 UTC
Created attachment 168484 [details]
temporary crutch, returns if layout is NULL

This code is in master, too!!
Comment 2 Thomas 2010-08-25 03:37:21 UTC
Created attachment 168697 [details] [review]
Probably related to the previous "fix". See stacktrace in the comment

(evolution:6415): calendar-gui-CRITICAL **: e_cal_model_get_component_at: assertion `row >= 0 && row < priv->objects->len' failed

(evolution:6415): calendar-gui-CRITICAL **: ecmt_value_at: assertion `row >= 0 && row < e_table_model_row_count (etm)' failed

(evolution:6415): calendar-gui-CRITICAL **: ecmt_value_at: assertion `row >= 0 && row < e_table_model_row_count (etm)' failed

(evolution:6415): calendar-gui-CRITICAL **: ecmt_value_at: assertion `row >= 0 && row < e_table_model_row_count (etm)' failed

(evolution:6415): calendar-gui-CRITICAL **: ecmt_value_at: assertion `row >= 0 && row < e_table_model_row_count (etm)' failed

(evolution:6415): calendar-gui-CRITICAL **: e_cal_model_get_component_at: assertion `row >= 0 && row < priv->objects->len' failed

(evolution:6415): Gdk-CRITICAL **: gdk_gc_set_clip_rectangle: assertion `GDK_IS_GC (gc)' failed

(evolution:6415): GLib-GObject-WARNING **: invalid unclassed pointer in cast to `ECellText'

(evolution:6415): GLib-GObject-WARNING **: invalid class cast from (NULL) pointer to `ECellText'

Program received signal SIGSEGV, Segmentation fault.
0x013d171e in e_cell_text_get_text (cell=0x90e8398, model=0x90c9840, col=12, row=3) at ../../../../evolution/widgets/table/e-cell-text.c:221
[Thread 0xae5f9b70 (LWP 9157) exited]
[Thread 0xaddf8b70 (LWP 9153) exited]
bt
  • #0 e_cell_text_get_text
    at ../../../../evolution/widgets/table/e-cell-text.c line 221
  • #1 generate_layout
    at ../../../../evolution/widgets/table/e-cell-text.c line 646
  • #2 ect_draw
    at ../../../../evolution/widgets/table/e-cell-text.c line 779
  • #3 e_cell_draw
    at ../../../../evolution/widgets/table/e-cell.c line 275
  • #4 ecp_draw
    at ../../../../evolution/widgets/table/e-cell-popup.c line 308
  • #5 e_cell_draw
    at ../../../../evolution/widgets/table/e-cell.c line 275
  • #6 eti_draw
    at ../../../../evolution/widgets/table/e-table-item.c line 2041
  • #7 gnome_canvas_group_draw
    at gnome-canvas.c line 1676
  • #8 gnome_canvas_group_draw
    at gnome-canvas.c line 1676
  • #9 gnome_canvas_group_draw
    at gnome-canvas.c line 1676
  • #10 gnome_canvas_group_draw
    at gnome-canvas.c line 1676
  • #11 gnome_canvas_paint_rect
    at gnome-canvas.c line 2996
  • #12 gnome_canvas_expose
    at gnome-canvas.c line 3051
  • #13 _gtk_marshal_BOOLEAN__BOXED
    at /build/buildd/gtk+2.0-2.18.3/gtk/gtkmarshalers.c line 84
  • #14 g_type_class_meta_marshal
    at /home/tom/src/glib2.0-2.22.3/gobject/gclosure.c line 878
  • #15 IA__g_closure_invoke
    at /home/tom/src/glib2.0-2.22.3/gobject/gclosure.c line 767
  • #16 signal_emit_unlocked_R
    at /home/tom/src/glib2.0-2.22.3/gobject/gsignal.c line 3285
  • #17 IA__g_signal_emit_valist
    at /home/tom/src/glib2.0-2.22.3/gobject/gsignal.c line 2990
  • #18 IA__g_signal_emit
    at /home/tom/src/glib2.0-2.22.3/gobject/gsignal.c line 3037
  • #19 gtk_widget_event_internal
    at /build/buildd/gtk+2.0-2.18.3/gtk/gtkwidget.c line 4767
  • #20 paint
    at gnome-canvas.c line 3128
  • #21 do_update
    at gnome-canvas.c line 3194
  • #22 idle_handler
    at gnome-canvas.c line 3207
  • #23 g_idle_dispatch
    at /home/tom/src/glib2.0-2.22.3/glib/gmain.c line 4065
  • #24 g_main_dispatch
    at /home/tom/src/glib2.0-2.22.3/glib/gmain.c line 1960
  • #25 IA__g_main_context_dispatch
    at /home/tom/src/glib2.0-2.22.3/glib/gmain.c line 2513
  • #26 g_main_context_iterate
    at /home/tom/src/glib2.0-2.22.3/glib/gmain.c line 2591
  • #27 IA__g_main_loop_run
    at /home/tom/src/glib2.0-2.22.3/glib/gmain.c line 2799
  • #28 bonobo_main
    at bonobo-main.c line 311
  • #29 main
    at ../../../evolution/shell/main.c line 732
p cell
$1 = (ECellText *) 0x90e8398
(gdb) p ($1
A syntax error in expression, near `'.
Comment 3 Thomas 2010-08-29 03:52:10 UTC
Created attachment 168980 [details] [review]
return earlier if layout is NULL
Comment 4 Thomas 2010-08-29 05:06:11 UTC
Now, trying the same sort of UI actions, I often get hangs in _xcb_conn_wait.
I found the following in the Xcb mailing list archives, http://lists.freedesktop.org/archives/xcb/2010-July/006264.html:

diff --git a/src/xcb_conn.c b/src/xcb_conn.c
index 7e18891..04e0430 100644
--- a/src/xcb_conn.c
+++ b/src/xcb_conn.c
@@ -311,6 +311,10 @@ int _xcb_conn_wait(xcb_connection_t *c, pthread_cond_t *cond, struct iovec **vec
     do {
 #if USE_POLL
         ret = poll(&fd, 1, -1);
+        /* If poll() returns an event we didn't expect, such as
+         * POLLNVAL, treat it as if it failed. */
+        if(ret >= 0 && (fd.revents & ~fd.events))
+            ret = -1;
 #else
         ret = select(c->fd + 1, &rfds, &wfds, 0, 0);
 #endif
--
Comment 5 Thomas 2010-08-29 05:35:44 UTC
Created attachment 168985 [details] [review]
Got another segfault
Comment 6 Thomas 2010-08-29 05:55:09 UTC
(In reply to comment #4)
> Now, trying the same sort of UI actions, I often get hangs in _xcb_conn_wait.
> I found the following in the Xcb mailing list archives,
> http://lists.freedesktop.org/archives/xcb/2010-July/006264.html:
> 
> diff --git a/src/xcb_conn.c b/src/xcb_conn.c
> index 7e18891..04e0430 100644
> --- a/src/xcb_conn.c
> +++ b/src/xcb_conn.c
> @@ -311,6 +311,10 @@ int _xcb_conn_wait(xcb_connection_t *c, pthread_cond_t
> *cond, struct iovec **vec
>      do {
>  #if USE_POLL
>          ret = poll(&fd, 1, -1);
> +        /* If poll() returns an event we didn't expect, such as
> +         * POLLNVAL, treat it as if it failed. */
> +        if(ret >= 0 && (fd.revents & ~fd.events))
> +            ret = -1;
>  #else
>          ret = select(c->fd + 1, &rfds, &wfds, 0, 0);
>  #endif
> --

Forget this. That wasn't the problem. That hang still occurs!
Comment 7 Thomas 2010-08-29 06:06:04 UTC
Created attachment 168987 [details] [review]
another segfault
Comment 8 Thomas 2010-08-29 06:19:36 UTC
Created attachment 168988 [details] [review]
more checking
Comment 9 Thomas 2010-08-29 06:52:37 UTC
Created attachment 168990 [details] [review]
more checking
Comment 10 Thomas 2010-08-29 20:17:56 UTC
Review of attachment 168990 [details] [review]:

Somehow, these changes didn't do any good, but rather caused more assertions and xcb hangs and stuff like that. So, I reverted the whole thing!!
Comment 11 Thomas 2010-09-12 02:36:51 UTC
Created attachment 170054 [details] [review]
I'll try this patch for the hang in _xcb_conn_wait in libxcb1

This hang happens sometimes when I enter a search term in calendar view.

See also:
http://old.nabble.com/-PATCH--_xcb_conn_wait%3A-Shut-down-the-connection-on-unexpected-poll%28%29-events.-td29548248.html
Comment 12 Milan Crha 2010-09-20 06:39:20 UTC
Please revert all the changes and get the full backtrace. I recall a scenario where X hang because was called from other than main thread. Maybe this is the same issue. If you are trying on 2.28, then please do not do that, it's really ancient. Please try with 2.31.92+. Thanks in advance.
Comment 13 Akhil Laddha 2010-12-24 10:11:42 UTC
Please feel free to reopen the bug if the problem still occurs with a newer
version of GNOME 2.32.1 or later, thanks.
Comment 14 Thomas 2011-01-08 04:59:44 UTC
(In reply to comment #11)
> Created an attachment (id=170054) [details] [review]
> I'll try this patch for the hang in _xcb_conn_wait in libxcb1
> 
> This hang happens sometimes when I enter a search term in calendar view.
> 
> See also:
> http://old.nabble.com/-PATCH--_xcb_conn_wait%3A-Shut-down-the-connection-on-unexpected-poll%28%29-events.-td29548248.html

Somebody just filed a bug report, which might be connected: 
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=609229
http://mail.gnome.org/archives/evolution-list/2011-January/msg00128.html
Comment 15 Milan Crha 2011-01-10 08:43:12 UTC
Backtrace from the debian bug should be fixed with patch from bug #617611