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.
(cherry picked from commit b736f477f5
)
This commit is contained in:
parent
7df5e93cf5
commit
483fb847b4
|
@ -145,6 +145,7 @@ mieqEnqueue(DeviceIntPtr pDev, xEvent *e)
|
||||||
oldtail = (oldtail - 1) % QUEUE_SIZE;
|
oldtail = (oldtail - 1) % QUEUE_SIZE;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
static int stuck = 0;
|
||||||
newtail = (oldtail + 1) % QUEUE_SIZE;
|
newtail = (oldtail + 1) % QUEUE_SIZE;
|
||||||
/* Toss events which come in late. Usually this means your server's
|
/* Toss events which come in late. Usually this means your server's
|
||||||
* stuck in an infinite loop somewhere, but SIGIO is still getting
|
* stuck in an infinite loop somewhere, but SIGIO is still getting
|
||||||
|
@ -152,8 +153,13 @@ mieqEnqueue(DeviceIntPtr pDev, xEvent *e)
|
||||||
if (newtail == miEventQueue.head) {
|
if (newtail == miEventQueue.head) {
|
||||||
ErrorF("[mi] EQ overflowing. The server is probably stuck "
|
ErrorF("[mi] EQ overflowing. The server is probably stuck "
|
||||||
"in an infinite loop.\n");
|
"in an infinite loop.\n");
|
||||||
|
if (!stuck) {
|
||||||
|
xorg_backtrace();
|
||||||
|
stuck = 1;
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
stuck = 0;
|
||||||
miEventQueue.tail = newtail;
|
miEventQueue.tail = newtail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user