[Xcb] XTS repo - where to?

Jamey Sharp jamey at minilop.net
Fri Jul 2 07:31:28 PDT 2010

On 6/30/10, Peter Hutterer <peter.hutterer at who-t.net> wrote:
> Adding xcb list, I _think_ this is an xcb issue.
> Looks like this may be some rather weird behaviour xcb doesn't cater for.
> closer() in xts5/Xlib3/XConnectionNumber.c calls close(2) on the display's
> fd. Then it calls XFlush(3).
> http://cgit.freedesktop.org/xorg/test/xts/tree/xts5/Xlib3/XConnectionNumber.m#n128
> XFlush(3) eventually calls _xcb_out_send() with has the following loop:
>     while(ret && *count)
>             ret = _xcb_conn_wait(c, &c->out.cond, vector, count);
> _xcb_conn_wait(), if built with USE_POLL gets the POLLNVAL error. It only
> checks for POLLIN and POLLOUT though, ignoring the error.
> Return value is 1, count is unmodified, leaving us with an endless loop and
> the hang you noticed.
> Now you could argue that closing the file descriptor on xcb is nasty but I
> think xcb should probably cater for this eventuality. Am I reading this
> right?

That sounds completely plausible. I'm not in a position to do anything
about it at the moment though; perhaps you could put together a patch?

I wonder if _xcb_conn_wait should return failure if poll returns an
event we don't understand?

Thanks for the careful diagnosis.


More information about the Xcb mailing list