[Xcb] Number of iovecs for xcb_send_request()
Uli Schlachter
psychon at znc.in
Sun Aug 12 06:17:24 PDT 2012
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Hi,
recently I stumbled upon a PDF which evince could not display. It would always
die with an XIO error. Through some debugging, I noticed that this was due to
some magic that cairo does to avoid having to copy data around:
http://cgit.freedesktop.org/cairo/tree/src/cairo-xcb-connection-core.c#n162
I wrote a test case for cairo which reproduces this problem. However, for this
report, I also wrote an xcb-only test case. See the attached program.
The problem is that xcb tries to write out the huge number of struct iovs in a
single call to writev(). However, there is an upper limit on the number of
iovs that are accepted. This limit causes writev() to fail with EINVAL.
So my question now is: Where is the bug? If cairo is doing something wrong, it
would have to split the PutImage up into multiple individual requests. I'd
like to avoid this, if possible (And in this case, someone should extend xcb's
documentation to explain this limit and how it should be handled). If this
problem should be handled in xcb, then... I'm not really sure how this should
be handled.
What do others think?
Cheers,
Uli
- --
Q: Because it reverses the logical flow of conversation.
A: Why is putting a reply at the top of the message frowned upon?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iQEcBAEBCAAGBQJQJ6ziAAoJECLkKOvLj8sGrxEH/2HJSEtKekA27cY+QYnqx/Xm
e6SR0I6wC1Byk38HKIzmCDe2Zu4Bo1mE3iP4svtwIU50SfMUHMI06WoXvHAqllZq
nwXI65o3i2lC3LuClP+NyCZtDlzB19ha1WSjtS2qsyBkpWyesTm4QAwBx0oZdvvb
4N75VerclEsm9wmievyOKlR8Yp1q80AVVJX/eukxJf5L2mJM8JKKVVnwf4ObTD0j
5gZxfndH8VFRRePFZjK/ZoWpU51eeKHm+PWQ+Fxs3fCafo0mo9nnriaZoamncAir
g01ydUFsIvkThqLkmglBO2rx/uTW2D6DlL9O+EXDgmVT67GZdPufvogjiDpC10c=
=f4nx
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.c
Type: text/x-csrc
Size: 1384 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/xcb/attachments/20120812/a97a7b74/attachment.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.c.sig
Type: application/pgp-signature
Size: 287 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/xcb/attachments/20120812/a97a7b74/attachment.pgp>
More information about the Xcb
mailing list