[Xcb] xlib / xcb deadlock/block

Francesco Abbate francesco.bbt at gmail.com
Wed Oct 13 11:42:03 PDT 2010


2010/10/13 Pevgeniev <pevgeniev at gmail.com>:
> Has anyone experience similar deadlock/block? Can this be a bug in xcb and
> is it worth trying to compile xlib without xcb?

Hi Pevgeniev,

I feel less lonely now, I've exactly the same problem!

I've also a multithreaded program (gsl-shell) that use Xlib and the
AGG library and I've experienced the same problem when I've switched
to ubuntu 10.10. In my case there is one thread that run the main X
event loop and when it is blocking by calling XNextEvent the other
thread can perform some operations of the display (nomally
XCopyImage). The problem is that when the second thread attempt to
call XSync the application hang. Actually the second thread hang only
until the first thread get any event.

This problem is definitely related to the xcb based implementation of
Xlib and so far it seems that there is no trivial solution to this
problem.

Unfortunately 99% of Linux application does not suffer of this problem
but I think it is nevertheless a major bug and I suggest that we file
a bug report to ubuntu.

I hope that we can find a solution to this problem very soon. There
isn't any doubt that the xcb developers are really competent and their
work is really impressive and remarkable in many ways but in this case
it seems that they overlooked some subtle points related to Xlib,
multithreaded applications and concurrent calls to Xlib :-)

-- 
Francesco


More information about the Xcb mailing list