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 720204 - xcb assertion error on startup in current Continuous
xcb assertion error on startup in current Continuous
Status: RESOLVED FIXED
Product: gnome-font-viewer
Classification: Core
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: gnome-font-viewer-maint
gnome-font-viewer-maint
Depends on:
Blocks:
 
 
Reported: 2013-12-10 17:08 UTC by Colin Walters
Modified: 2014-07-15 12:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
font-model: Create cairo surfaces in the main thread (3.52 KB, patch)
2014-07-10 17:37 UTC, Rui Matos
committed Details | Review

Description Colin Walters 2013-12-10 17:08:26 UTC
$ env GDK_SYNCHRONIZE=1 G_DEBUG=fatal-warnings gdb --args gnome-font-viewer
GNU gdb (GDB) 7.5.1
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-gnomeostree-linux".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/gnome-font-viewer...Reading symbols from /usr/lib/debug/.build-id/68/2ab66c86c3b4512112994aa05c2df1ca018865.debug...done.
done.
(gdb) r
Starting program: /usr/bin/gnome-font-viewer 
warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7ffff7ffa000
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".
[New Thread 0x7fffee243700 (LWP 1048)]
[New Thread 0x7fffe68ea700 (LWP 1049)]
[New Thread 0x7fffe60e9700 (LWP 1050)]
[xcb] Unknown sequence number while processing queue
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
gnome-font-viewer: ../../src/xcb_io.c:274: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed.

Program received signal SIGABRT, Aborted.
0x00007ffff4faa2e5 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
warning: Source file is more recent than executable.
56	  return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig);
(gdb) bt
  • #0 __GI_raise
    at ../nptl/sysdeps/unix/sysv/linux/raise.c line 56
  • #1 __GI_abort
    at abort.c line 90
  • #2 __assert_fail_base
    at assert.c line 92
  • #3 __GI___assert_fail
    at assert.c line 101
  • #4 poll_for_event
    at ../../src/xcb_io.c line 271
  • #5 poll_for_response
    at ../../src/xcb_io.c line 289
  • #6 _XEventsQueued
    at ../../src/xcb_io.c line 363
  • #7 XPending
    at ../../src/Pending.c line 55
  • #8 gdk_check_xpending
    at ../../../gdk/x11/gdkeventsource.c line 266
  • #9 gdk_event_source_check
    at ../../../gdk/x11/gdkeventsource.c line 303
  • #10 g_main_context_check
    at ../../glib/gmain.c line 3558
  • #11 g_main_context_iterate
    at ../../glib/gmain.c line 3711
  • #12 g_main_context_iteration
    at ../../glib/gmain.c line 3775
  • #13 g_application_run
    at ../../gio/gapplication.c line 1643
  • #14 main
    at ../../src/font-view.c line 900

Comment 1 Rui Matos 2014-07-10 17:37:59 UTC
Created attachment 280432 [details] [review]
font-model: Create cairo surfaces in the main thread

Commit b42c741768b20fb692631779eb1ec07fffaee0c1 switched from using
pixbufs to cairo surfaces so that we can scale them properly for HiDpi
displays but kept the cairo surface instantiations in the IO scheduler
job thread which means that, on X, we're using Xlib from multiple
threads.

Avoid this by only loading the pixbufs in the IO thread and then
creating the cairo surfaces on the main thread.
--

I'm not sure this really fixes the problem since I can't reproduce
myself but I've had a few reports of this in Fedora with the same
trace.

Alternatively I guess we could call XInitThreads() before initializing
gtk+ ?
Comment 2 Cosimo Cecchi 2014-07-10 17:45:50 UTC
Review of attachment 280432 [details] [review]:

Looks good to me.
Comment 3 Rui Matos 2014-07-15 12:32:55 UTC
Thanks, I'll push it even if I couldn't reproduce the crash as it
seems to work fine anyway.

Attachment 280432 [details] pushed as 5c56fcf - font-model: Create cairo surfaces in the main thread