[Xcb] [Bug 9528] client hangs when using xcb-enabled libX11 locally

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Nov 22 09:40:41 PST 2011


--- Comment #15 from Uli Schlachter <psychon at znc.in> 2011-11-22 09:40:41 PST ---
This isn't an xcb bug, but rather a bug in libX11. gdb says:

(gdb) thread apply all bt

Thread 2 (Thread 0x7ffff3bf2700 (LWP 32070)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at
#1  0x00007ffff7ae6795 in _XReply (dpy=0x605070, rep=0x7ffff3bf1c90, extra=0,
discard=0) at xcb_io.c:623
#2  0x00007ffff788a712 in ?? () from /usr/lib/x86_64-linux-gnu/libGL.so.1
#3  0x00007ffff788866c in ?? () from /usr/lib/x86_64-linux-gnu/libGL.so.1
#4  0x00007ffff4ef8987 in ?? () from /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
#5  0x00007ffff4ef9705 in ?? () from /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
#6  0x00007ffff4ef7c95 in ?? () from /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
#7  0x0000000000401b11 in draw_loop (wt=0x6033c0) at glthreads.c:186
#8  0x0000000000402198 in thread_function (p=0x6033c0) at glthreads.c:384
#9  0x00007ffff7633b40 in start_thread (arg=<optimized out>) at
#10 0x00007ffff737e36d in clone () at
#11 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7ffff7fd7720 (LWP 32067)):
#0  0x00007ffff7373723 in *__GI___poll (fds=<optimized out>, nfds=<optimized
out>, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007ffff7094fa2 in _xcb_conn_wait (c=0x606780, cond=<optimized out>,
vector=0x0, count=0x0) at xcb_conn.c:369
#2  0x00007ffff70966ef in xcb_wait_for_event (c=0x606780) at xcb_in.c:522
#3  0x00007ffff7ae6328 in _XReadEvents (dpy=0x605070) at xcb_io.c:400
#4  0x00007ffff7ad5688 in XNextEvent (dpy=0x605070, event=0x7fffffffe0c0) at
#5  0x0000000000401cae in event_loop (dpy=0x605070) at glthreads.c:238
#6  0x000000000040278d in main (argc=3, argv=0x7fffffffe2c8) at glthreads.c:527

Now if we look at xcb_io.c, shortly before line 623:

    /* FIXME: That event might be after this reply,
     * and might never even come--or there might be
     * multiple threads trying to get events. */

I think we are hitting the "might never come"-case and I also think that there
are other bug reports which hit that case, so this might be a dupe now.

"Patch" which "fixes" this issue for me is attached, but I guess there is a
reason why Xlib tries to do what it is doing, so just removing this code won't
help. (What is that reason? How badly would stuff break? Which stuff would
break? Could that other stuff be fixed so that this code can be removed?)

BTW this hangs in libxcb if I use the libxcb version from debian instead of the
current git version, so there really was a bug in xcb, but that one definitely
was already fixed.

Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.

More information about the Xcb mailing list