Re: [forum] Re: restest hangs the server (was: Some hard numbers on XFree86 memory usage ...)

Owen Taylor <[email protected]>
Newsgroups gmane.comp.xfree86.devel,gmane.comp.xfree86.forum
Message-ID <[email protected]>
On Mon, 2003-04-21 at 14:25, Mark Vojkovich wrote:
> On 21 Apr 2003, Owen Taylor wrote:
> 
> > On Mon, 2003-04-21 at 09:25, Michel Dänzer wrote:
> > > [ please follow up to the devel list only if you agree that this is more
> > > appropriate there ]
> > > 
> > > On Mon, 2003-04-21 at 08:13, Aidan Kehoe wrote:
> > > >  Ar an 19ú lá de mí 4, scríobh Mark Vojkovich :
> > > > 
> > > >  >     http://www.xfree86.org/~mvojkovi/restest.c
> > > > 
> > > > That locks up my X server (except for the mouse cursor) on NetBSD 1.6P,
> > > > btw. 
> > > 
> > > I experienced the same on Linux/PPC, thought it was architecture
> > > specific, but maybe not?
> > > 
> > > > No problem when it's run from a virtual console with DISPLAY set
> > > > appropriately. Where would one go to fix this?
> > > 
> > > The first thing to do would be to find out where it hangs I guess.
> > > Funnily, the server would still respond to the keyboard, at least I
> > > could switch VTs, but it wouldn't draw (everything) anymore.
> > 
> > It doesn't actually hang the server, rather what
> > happens is that it outputs to terminal with a server
> > grab.
> > 
> > So, if you run it in a xterm (etc.), you get a:
> > 
> >  X server blocks on restest
> >  restest blocks on terminal
> >  terminal blocks on X server
> 
>    That doesn't happen with xterm over here.  

It's going to be an intermittent problem; whether it happens
not is going to depend on various buffers sizes (stdio,
terminal, Xlib.) I suspect if you set things up so restest
outputs sufficiently large quantities of text, you'll see it.

I don't see any way that a terminal program could avoid
this problem. Xterm has no way of knowing when it is going to block 
in an Xlib call because the X buffers are full and the server is
grabbed.

Regards,
                                         Owen
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.