After > 100 stuck input events, the server is unlikely to recover. So print a
message to the log and terminate the server instead of requiring users to kill
the server themselves.

Signed-off-by: Peter Hutterer <[email protected]>
---
 mi/mieq.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/mi/mieq.c b/mi/mieq.c
index 0dedbee..c263114 100644
--- a/mi/mieq.c
+++ b/mi/mieq.c
@@ -182,11 +182,17 @@ mieqEnqueue(DeviceIntPtr pDev, InternalEvent *e)
                 ErrorF("[mi] EQ overflowing. The server is probably stuck "
                         "in an infinite loop.\n");
                xorg_backtrace();
-               stuck = 1;
+               stuck++;
            }
 #ifdef XQUARTZ
            pthread_mutex_unlock(&miEventQueueMutex);
 #endif
+
+           if (stuck >= 100)
+               FatalError("[mi] The last 100 input events could not be "
+                       "processed. This is a bug.\n"
+                       "Terminating server now. Please submit this log"
+                       "file to http://bugs.freedesktop.org";);
            return;
         }
        stuck = 0;
-- 
1.6.2.2.447.g4afa7

_______________________________________________
xorg-devel mailing list
[email protected]
http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to