[PATCH] mi: if we fail to process 100 input events due to a stuck EQ, terminate.

Peter Hutterer peter.hutterer at who-t.net
Mon Apr 20 14:50:32 PDT 2009


On Mon, Apr 20, 2009 at 03:01:30PM +0200, Stephane Marchesin wrote:
> On Mon, Apr 20, 2009 at 14:53, Matthias Hopf <mhopf at suse.de> wrote:
> > On Apr 20, 09 15:40:47 +1000, Daniel Stone wrote:
> >
> > It still opens up the can of worms labeled "Denial of Service".
> > Though one could argue that a graphics operation using 15secs is in
> > itself a possible denial of service...
> >
> 
> Actually, 15 seconds is not that far fetched. On radeon, I used to
> trigger the DRM counterparts of such a timeout quite regularly when
> doing heavy rendering on a PCI radeon 7000 (even though I increased it
> to 10 seconds instead of the default 3). Similarly, GPGPU processing
> can and will stall for multiple seconds. Specific drivers having the
> problem is a separate issue, but it would be really great if we don't
> spread it to the whole server.
> 
> But really, the question is: what real issue are you fixing with this timeout?

The intended fix was mostly a "nicer behaving" server. Sometimes the server
hangs somewhere but signals still come in and the cursor is updated.

If we know that this is an unrecoverable situation, we should terminate the
server. If events don't get processed, zapping won't work. Most users run
through a display manager that restarts the server for them when it crashes,
so a FatalError at this point with a nice blurb in the log file gives them the
chance to get a functioning server again without the need for a reboot.

Of course, doing this requires a reliable way to detect the hang which is what
we're still looking for.

Cheers,
  Peter


More information about the xorg-devel mailing list