[comp.windows.x] SUN select error

tek@CS.UCLA.EDU (10/05/88)

Every now and then the server stops responding for a while and gives
me a whole bunch (like a screen full) of these error messages:

	WaitForSomething(): select: errno=22

Usually, this happens just after (within a second) of moving the
mouse. Eventually, the server recovers and all is fine. After a while
though this gets annoying.

	The scene of the crime:
VERSION: 			X11 release 2 (with FIXES 1-33 applied)
CLIENT MACHINE:			SUN-3/60
CLIENT OPERATING SYSTEM:	SUN OS 3.5
DISPLAY: 			CG4 

I dutifully reported this to MIT many months ago, but never got
anything back. Anyway, I seem to remember someone on the net had this
problem and eventually traced it to a SUNOS bug and got a patch from
SUN. 

Is that person still out there?
Does anyone else know anything about this bug?






-ted		ARPAnet: tek@penzance.cs.ucla.edu 
		UUCP:    ...!ucbvax!ucla-cs!tek

dheller@cory.Berkeley.EDU (Dan Heller) (10/06/88)

    n article <16520@shemp.CS.UCLA.EDU> tek@CS.UCLA.EDU () writes:
    Every now and then the server stops responding for a while and gives
    me a whole bunch (like a screen full) of these error messages:

    WaitForSomething(): select: errno=22

Turn off your screen saver: "xset s off".

This bug can get pretty bad.  It crashed my sun once.
Dan Heller	<island!argv@sun.com>

john@acorn.UUCP (John Bowler) (10/21/88)

In article <16520@shemp.CS.UCLA.EDU>, tek@CS.UCLA.EDU writes:
> Every now and then the server stops responding for a while and gives
> me a whole bunch (like a screen full) of these error messages:
> 
> 	WaitForSomething(): select: errno=22
> 
> Usually, this happens just after (within a second) of moving the
> mouse. Eventually, the server recovers and all is fine. After a while
> though this gets annoying.

The problem also occurs in BSD43 based servers typically when the ``logo''
screen saver is switched on and the timeout is relatively short - colour
servers are particularly prone.  It is caused by ``timeout'' remaining
negative in the following piece of code in WaitFor() (from WaitFor.c)

/*-------- WaitFor.c -- Waitfor() --------*/
if (timeout < 0) /* may be forced by AutoResetServer() */
{
    if (clientsDoomed)
    {
	*nnew = *nready = 0;
	break;
    }
    if (timeout < intervalCount)
    {
/*-- SaveScreens can take a very long time!! --*/
	SaveScreens(SCREEN_SAVER_ON, ScreenSaverActive);
	if (intervalCount)
	    intervalCount -= ScreenSaverInterval;
	else
	    intervalCount = 
			-(ScreenSaverInterval + ScreenSaverTime);
    }
    timeout -= intervalCount;
/*-- timeout may still be <0 fix by adding the following line:- --*/
    if (timeout < 0)					/* BUG FIX */
    {							/* BUG FIX */
	intervalCount = timeout-ScreenSaverInterval;	/* BUG FIX */
	timeout = 0;					/* BUG FIX */
    }							/* BUG FIX */
}
/*------------------------------------------*/

John Bowler (jbowler@acorn.co.uk)

guy@auspex.UUCP (Guy Harris) (10/29/88)

>> Every now and then the server stops responding for a while and gives
>> me a whole bunch (like a screen full) of these error messages:
>> 
>> 	WaitForSomething(): select: errno=22

"errno=22"?  How the heck is somebody supposed to know what error 22 is?
Are they supposed to do something silly like drag out INTRO(2) in their
UNIX documentation?

*Grumble bitch* please use "sys_errlist[]" next time, thank you....  It
might even make it easier to figure out what's wrong.