summaryrefslogtreecommitdiff
path: root/mi/mieq.c
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2008-10-10 16:33:24 -0400
committerAdam Jackson <ajax@redhat.com>2008-10-10 16:33:57 -0400
commitb736f477f5324f79af30fc0f941ba0714a34ccda (patch)
treea470fe197e71376f0a2303ef2923031deab6f710 /mi/mieq.c
parent94ed0ba1b5043ad9fc33b42756af447d5ab15bbd (diff)
mieq: Backtrace when the queue overflows.
Since we're probably stuck down in a driver somewhere, let's at least try to point out where. This will need to be rethought when the input thread work lands though.
Diffstat (limited to 'mi/mieq.c')
-rw-r--r--mi/mieq.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/mi/mieq.c b/mi/mieq.c
index 0a1b74028..062dede06 100644
--- a/mi/mieq.c
+++ b/mi/mieq.c
@@ -169,6 +169,7 @@ mieqEnqueue(DeviceIntPtr pDev, xEvent *e)
oldtail = (oldtail - 1) % QUEUE_SIZE;
}
else {
+ static int stuck = 0;
newtail = (oldtail + 1) % QUEUE_SIZE;
/* Toss events which come in late. Usually this means your server's
* stuck in an infinite loop somewhere, but SIGIO is still getting
@@ -176,8 +177,13 @@ mieqEnqueue(DeviceIntPtr pDev, xEvent *e)
if (newtail == miEventQueue.head) {
ErrorF("[mi] EQ overflowing. The server is probably stuck "
"in an infinite loop.\n");
+ if (!stuck) {
+ xorg_backtrace();
+ stuck = 1;
+ }
return;
}
+ stuck = 0;
miEventQueue.tail = newtail;
}