Deadock Xorg runing strace on a client (from within a client terminal)
pcjc2 at cam.ac.uk
Fri Aug 29 17:12:01 PDT 2008
On Fri, 2008-08-29 at 11:15 +0200, Rémi Cardona wrote:
> Peter Harris a écrit :
> > Adam Jackson wrote:
> >> On Thu, 2008-08-28 at 15:50 +0100, Alan Cox wrote:
> > <about strace>
> >>> If you trace through a server grab you may well end up with the app you
> >>> are tracing owning a grab on the server and preventing the other clients
> >>> writing. Its an annoying bit of historic X design.
> >> That's only a deadlock if the client with the grab is waiting for the
> >> tracing client to do something before releasing the grab. This is
> >> almost certainly not the case here.
> > Client grabs server.
> > xterm blocks writing to server.
> > strace blocks writing to xterm.
> > Client blocks in strace.
> > This can easily deadlock if there is enough strace activity under the
> > grab to fill up the various pipe/socket buffers.
> I can definitely confirm this behavior. On a busy server, this usually
> happens in less than a second or two, making (live) stracing Xorg
> impossible with only one machine.
I wasn't strace'ing Xorg, but a client app. I guess there is no easy way
around this. (Although perhaps stracing could be done in a terminal
screen - not sure if strace / screen would block sending data to the
screen client if it is attached.)
Glad its not just me who sees this behaviour though.
I'm vaguely surprised that a client's server grab actually stops it
interacting at all with other clients though - for drawing updates etc..
Sounds like an easy DOS attack. I thought server grabs were just be for
pointer motion / keyboard events etc..
Electrical Engineering Division,
University of Cambridge,
9, JJ Thomson Avenue,
Tel: +44 (0)7729 980173 - (No signal in the lab!)
More information about the xorg