Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Jul 2000 03:51:28 -0400
From:      Mark Abene <phiber@radicalmedia.com>
To:        "David O'Brien" <obrien@FreeBSD.ORG>
Cc:        freebsd-alpha@FreeBSD.ORG
Subject:   Re: weird XFree86 3.3.6 behavior...
Message-ID:  <20000727035128.A9982@radicalmedia.com>
In-Reply-To: <20000727000033.A44502@dragon.nuxi.com>; from David O'Brien on Thu, Jul 27, 2000 at 12:00:33AM -0700
References:  <20000727022930.A9638@radicalmedia.com> <20000727000033.A44502@dragon.nuxi.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jul 27, 2000 at 12:00:33AM -0700, David O'Brien wrote:
> On Thu, Jul 27, 2000 at 02:29:30AM -0400, Mark Abene wrote:
> > I'm experiencing a very strange problem with XFree86 3.3.6.
> 
> How (/when) did you install the XFree86 bits?
> 

This is XFree86 3.3.6 compiled from the 4.0-RELEASE ports collection.
I've been using it without incident (rock solid) until I decided to open
a bunch more xterms than I normally do, and xscreensaver sent it into
an infinite loop, as previously described.  Xscreensaver normally functions
as expected.  When I mentioned the number of clients that need to be open
in X for the problem to surface, I'm taking the numbers from 
xwininfo -root -children (the total).

I'm guessing (and this is a big guess), that select() is malfunctioning when
the number of fd's reach some high limit.  I've been using gdb to single 
step through the hung X server for the past few days now, so I'm very familiar
with what's going on (just not sure why).  When the number of clients is
"high", and xscreensaver authenticates a valid password, the saver program
is exiting.  At this point in the X server's WaitForSomething() main event
loop, we select on "AllSockets", and find that we get an fd that returns a
EBADF, indicating (mistakenly at this point in time) that a client needs
closing.  So it calls CheckConnections(), which selects on MAXSOCKS in
poll mode (timeval's sec and usec are zero).  CheckConnections() of course
doesn't find any fd's that need closing down, and returns back to 
WaitForSomething(), which again gets a EBADF back from select, so it calls
CheckConnections() again, and so on and so on.  :)
And we end up with a vicious cycle where the X server is hung eating up
all available cpu.  Not very pretty.

If you need more details, I'll be happy to provide them.  The problem is
easily reproducible, and I'm still considering select(2) as being suspect.

Cheers,
-Mark



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-alpha" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000727035128.A9982>