Bug 24520 - New implementation of _XSend() results in Fatal IO error 11.
Summary: New implementation of _XSend() results in Fatal IO error 11.
Status: RESOLVED NOTABUG
Alias: None
Product: xorg
Classification: Unclassified
Component: Lib/Xlib (show other bugs)
Version: 7.4 (2008.09)
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-14 04:05 UTC by Alexey Smirnov
Modified: 2009-10-14 08:37 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
_XSend()/_XReply() example, that describes the problem. (1.41 KB, text/plain)
2009-10-14 04:05 UTC, Alexey Smirnov
no flags Details

Description Alexey Smirnov 2009-10-14 04:05:00 UTC
Created attachment 30383 [details]
_XSend()/_XReply() example, that describes the problem.

New implementation of _XSend() function provided in XLib 1.2.xx is not working the same style as in Xlib 1.1.xx.

Small get_version.c file attached describes the problem. The source code shown in this file tries to receive version information from any typical extension running on X Server. For example - from "DOUBLE-BUFFER" extension.

Extension is checked for availability and for Major Event Number using XQueryExtension() function.
The request is filled and is sent using _XSend() function.
The results are received using _XReply() function.
The results are printed using printf() function.

This example is definitely working in XOrg Server 7.2 with XLib 1.1.5, and is producing 'XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":0.0"' in XOrg Server 7.2 with XLib 1.2.2.

It is no matter what Extension to test. get_version.c can be modified for any other Extension that have QueryVersionReq/QueryVersionReply structures and appropriate request number published. 

The result will be the same - working with XLib 1.1.xx and IO error with XLib 1.2.xx.
Comment 1 Jamey Sharp 2009-10-14 08:37:30 UTC
There may be an Xlib bug here, but your test program is wrong, so I'm not convinced. You can't send a request without using one of the GetReq family of macros in Xlib. When I fix your test program to use GetReq instead of _XSend, it completes successfully.

Your IO error did not occur in _XSend; it occurred in _XReply, because you didn't send a valid request, so we couldn't find the reply to return. XCB is a bit stricter about correctness here than Xlib is, but I've never seen real code get this wrong.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.