[bug report] Xorg server nonresponsive, calls DoTimer in a loop

Rafal Wojtczuk rafal at invisiblethingslab.com
Mon Aug 23 05:37:12 PDT 2010


Hello,

Bug spotted when running 1.8.0 (more precisely
xorg-x11-server-Xorg-1.8.0-12.fc13.x86_64, Fedora 13), perhaps it applies to newer
versions as well. Random and rare, very difficult to reproduce. Let me know if you need more
information (I still have one VM with a runaway Xorg pinpointed with gdb).

Symptoms:
Xorg server eats 100%cpu. Nonresponsive to clients.

Regards,
Rafal Wojtczuk

Debugging info:

Nothing scary in Xorg.0.log.

strace output:

clock_gettime(CLOCK_MONOTONIC, {86706, 234255531}) = 0
clock_gettime(CLOCK_MONOTONIC, {86706, 234424314}) = 0
clock_gettime(CLOCK_MONOTONIC, {86706, 234579577}) = 0
clock_gettime(CLOCK_MONOTONIC, {86706, 234719121}) = 0
clock_gettime(CLOCK_MONOTONIC, {86706, 234846844}) = 0
clock_gettime(CLOCK_MONOTONIC, {86706, 234964346}) = 0
clock_gettime(CLOCK_MONOTONIC, {86706, 235083545}) = 0
clock_gettime(CLOCK_MONOTONIC, {86706, 235201846}) = 0
... etc, etc


(gdb) bt
#0  0x00007fff43f48a01 in clock_gettime ()
#1  0x00007f9b6c281e7f in clock_gettime () from /lib64/librt.so.1
#2  0x00000000004626b1 in GetTimeInMillis () at utils.c:439
#3  0x000000000045a2b1 in TimerSet (timer=0x2a16010, flags=0, millis=600000, 
    func=0x459fd0 <ScreenSaverTimeoutExpire>, arg=0x0) at WaitFor.c:430
#4  0x000000000045ab58 in WaitForSomething (pClientsReady=0x2a010f0)
    at WaitFor.c:296
#5  0x000000000042c042 in Dispatch () at dispatch.c:375
#6  0x00000000004219ca in main (argc=<value optimized out>, 
    argv=0x7fff43f325b8, envp=<value optimized out>) at main.c:286

in WaitForSomething
295                         while (timers && (int) (timers->expires - now)
<= 0)
(gdb) n
296                             DoTimer(timers, now, &timers);
(gdb) n
295                         while (timers && (int) (timers->expires - now)
<= 0)
/* seems to loop here */
(gdb) n
296                             DoTimer(timers, now, &timers);
(gdb) s



DoTimer (timer=0x2a16010, now=90123820, prev=0x7d8518) at WaitFor.c:415
415     {
(gdb) n
418         *prev = timer->next;
(gdb) n
415     {
(gdb) n
418         *prev = timer->next;
(gdb) n
419         timer->next = NULL;
(gdb) n
420         newTime = (*timer->callback)(timer, now, timer->arg);
(gdb) n
421         if (newTime)
(gdb) n
422             TimerSet(timer, 0, newTime, timer->callback, timer->arg);
(gdb) n
423     }
(gdb) n
422             TimerSet(timer, 0, newTime, timer->callback, timer->arg);
(gdb) n
TimerSet (timer=0x2a16010, flags=0, millis=600000, 
    func=0x459fd0 <ScreenSaverTimeoutExpire>, arg=0x0) at WaitFor.c:428
428     {
(gdb) n
430         CARD32 now = GetTimeInMillis();
(gdb) n
432         if (!timer)
(gdb) n
430         CARD32 now = GetTimeInMillis();
(gdb) n
432         if (!timer)
(gdb) n
440             for (prev = &timers; *prev; prev = &(*prev)->next)
(gdb) n
451         if (!millis)
(gdb) n
453         if (flags & TimerAbsolute) {
(gdb) n
457             timer->delta = millis;
(gdb) n
458             millis += now;
(gdb) n
463         if ((int) (millis - now) <= 0)
(gdb) n
460         timer->expires = millis;
(gdb) n
461         timer->callback = func;
(gdb) 
462         timer->arg = arg;
(gdb) 
463         if ((int) (millis - now) <= 0)
(gdb) 
467             if (!millis)
(gdb) 
470         for (prev = &timers;
(gdb) 
474         timer->next = *prev;
(gdb) 
475         *prev = timer;
(gdb) 
477     }
(gdb) 
WaitForSomething (pClientsReady=0x2a010f0) at WaitFor.c:295
295                         while (timers && (int) (timers->expires - now)
<= 0)
(gdb) 
296                             DoTimer(timers, now, &timers);

/* presumably, back to the loop */



More information about the xorg mailing list