GNOME Bugzilla – Bug 627620
evolution segfaults in pango_layout_clear_lines in libpango
Last modified: 2011-01-10 08:43:12 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
+ Trace 223341
Created attachment 168484 [details] temporary crutch, returns if layout is NULL This code is in master, too!!
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
+ Trace 223388
p cell $1 = (ECellText *) 0x90e8398 (gdb) p ($1 A syntax error in expression, near `'.
Created attachment 168980 [details] [review] return earlier if layout is NULL
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 --
Created attachment 168985 [details] [review] Got another segfault
(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!
Created attachment 168987 [details] [review] another segfault
Created attachment 168988 [details] [review] more checking
Created attachment 168990 [details] [review] more checking
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!!
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
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.
Please feel free to reopen the bug if the problem still occurs with a newer version of GNOME 2.32.1 or later, thanks.
(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
Backtrace from the debian bug should be fixed with patch from bug #617611