[Xcb] [RFC PATCH] New XCB socket handoff mechanism for Xlib/XCB and other libraries
jamey at minilop.net
Tue Mar 18 12:34:52 PDT 2008
On Sat, Mar 15, 2008 at 09:36:37PM -0700, Jamey Sharp wrote:
> Please review and provide comments. We hope to commit these patches and
> release new versions of XCB and Xlib/XCB soon.
Here are the bugs we currently know about that are keeping us from
committing these patches as-is. We still believe they're suitable for
testing right now, as the bugs are in rarely-encountered corner cases.
In fact I'm quite pleased that our testing methodology caught these. :-)
- KDE's taskbar, "kicker", after many hours, syncs too late and hangs.
I can reliably reproduce this by leaving my desktop along for 5.5
hours or so, but Josh and I are baffled by the problem. We already
fixed a bug that looks identical, and can't see why the fix might be
failing. If somebody else could reproduce the problem and maybe spot
the cause, we'd appreciate it.
- The glue between Xlib and XCB is not 64-bit clean.
XCB uses "unsigned int" for sequence numbers, but Xlib uses "unsigned
long". These types are part of the ABI of both libraries, making them
difficult to change. There are a few ways we could address this, and
we haven't decided on one yet. Patches welcomed! :-)
One side effect of this bug: on a 64-bit system, after 2**32 requests,
if Xlib notices that 2**16 requests have passed without a response
from the server, its attempt to sync will infinitely recurse. So it
crashes when it runs out of stack space.
- Xlib has a multi-threaded race condition involving XAllocID.
This race applies with or without XCB, and with or without the new
patches. However, it can only affect applications which call Xlib from
more than one thread concurrently, and I'm aware of about a half dozen
of those worldwide. This bug is much more likely to show up when Xlib
is built using XCB. We're currently exploring ideas for fixing it.
- After running out of its initial allocation of XIDs, XCB assert-fails.
We found and fixed this bug. Our new code assert()ed something that
wasn't true. Our next patchset will have the corrected code.
Since it takes a long time to run out of two million XIDs in normal
usage, I don't feel the new patches are urgent.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 189 bytes
Desc: Digital signature
More information about the xorg