[comp.windows.x] Problem with X11R3 running on SPARCstation1.

jg1217@athsys.uucp (Jeff Gaiser) (07/08/89)

This is my first posting so please bear with me.

We are having some difficulty with the X11R3 server running on a Sun
SPARC station.  When we try activating our menus the server sometimes
returns an XIOError:
    XIO: Fatal IO error 32 (Broken pipe) on X server.
    The connection was probably broken by a server shutdown or KillClient.

We used to have a similar problem when we were using X11R2, but some of the
patches made the problem disappear (I do not know which set of patches).
We are running the X11R3 server compiled using the Sun supplied c compiler
on the SPARC station.  The X11R3 patchlevel.h file says we are at level 12.
The X11R2 patchlevel.h file says we are at level 9.

We wrote our own menu package which among other things calls XGetImage
on the part of the root window which will be obscured by the menu so
that after the menu is removed we can restore that section of the root
window. It is during this call that the XIOError function gets called.
We also know that the XRead function is getting 0 bytes read returned
from the function, ReadFromServer.  Since the number of bytes read is 0
and the errno is 0, we move into the section of code within the function
XRead, which sets errno = EPIPE and then calls XIOErrorFunction.

We used dbx to determine that the file descriptor for the X window
display was 3, and when we received the pipe broken message we forced
a close on this file descriptor and this succeeded, which implies that
we did NOT inadvertantly close this file.

The following is a list of machines and scenarios in which we have
attempted to force this problem to occur:
   XVersion  Synch      Server Machine    Client Machine      Status (*)
      R3      NO        SPARC (Color)         SPARC             BAD
      R3      NO        SPARC (Color)         Sun 4             BAD
      R3      NO        SPARC (Color)         Sun 3             BAD
      R3      NO        Sun 3 (BW)            SPARC              OK
      R3      NO        Sun 3 (Color)         SPARC             BAD
      R3      YES       SPARC/Sun 3/4     SPARC/Sun 3/4          OK
      R2      NO        Sun 3 (BW)            Sun 3              OK

    * A bad status means we received the XIOError described above.

From this table it appears that the combination of XGetImage, X11R3, and
a color display results in the broken pipe problem.  Lastly, this problem
is easiest to produce on the SPARC station.

Any help supplied is greatly appreciated and thanx in advance.
I am not sure this is of interest to all so all replies should
probably be emailed to me directly.