[Xcb] X server bug on BIG-REQUESTS?
jamey at minilop.net
Sun Jun 11 00:15:55 PDT 2006
On Sat, Jun 10, 2006 at 11:27:43PM -0700, Barton C Massey wrote:
> In message <20060611003721.GL4245 at id.minilop.net> you wrote:
> > I'm not sure exactly what you mean by this. We can have
> > XCBGetMaximumRequestLength divide the value returned from
> > BigRequestsEnable by four, which seems likely to work on all
> > servers.
> I think XCBGetMaximumRequestLength should return 1MB on
> servers without BIGREQUESTS, and its normal value otherwise?
> When a request of eg 1.1MB is sent, it should be sent using
> BIGREQUESTS, which is legal AFAIK.
If you replace "servers without BIGREQUESTS" with "servers *with*
BIGREQUESTS", I think you've got the right idea. The sad thing is that
it's the common case that's broken.
Without BIG-REQUESTS, the largest theoretically possible request is
256kB, and the server can advertise a limit smaller than that. That case
may or may not be broken here, but in any case is not the one in
question. (I think the fact that nobody has ever seen this problem
before suggests that the non-big case is fine.)
With BIG-REQUESTS, a request could theoretically be as big as 16GB, but
again the server can advertise a limit smaller than that, and in this
case it advertises 16MB instead. The actual value reported is in 4-byte
units, though, hence that ~4 million number we've been tossing around.
What we're seeing is that we can't hit that 16MB limit because things
fail at 4MB, which is suspicious.
> > There's a separate problem that callers, including
> > the XCBImage library, need to split large data into smaller
> > chunks.
> Won't they do this automatically if we do the above?
There's nothing to guarantee that they will. The XCBImage library may
have the machinery for it ported from the original XImage
implementation; I haven't checked. But I doubt it: the original
implementation was coded to never trigger a BIG-REQUEST at all.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
Url : http://lists.freedesktop.org/archives/xcb/attachments/20060611/96f3b295/attachment.pgp
More information about the Xcb