Race condition in xorg scheduler?

Andreas Girlich xorg at bee.de
Fri Mar 23 06:39:33 PDT 2007


Dear list,

we may discovered a race condition in x.org scheduler which results in
an endless loop of the x.org server with 100% CPU usage. Below you see
two straces.

normal situation:
--- SIGALRM (Alarm clock) ---
setitimer(ITIMER_REAL, {it_interval={0, 0}, it_value={0, 0}}, NULL) = 0
sigreturn()                             = ? (mask now [])

error: 
--- SIGALRM (Alarm clock) ---
sigreturn()                             = ? (mask now [])

os/utils.c:
[...]
SmartScheduleTimer (int sig)
{
    int olderrno = errno;

    SmartScheduleTime += SmartScheduleInterval;
    if (SmartScheduleIdle)
    {
        SmartScheduleStopTimer ();
    }
    errno = olderrno;
}
[...]

In what conditions SmartScheduleIdle may be FALSE so that the timer
will never be stopped again? SmartScheduleIdle is set in
os/WaitFor.c only.

Greets,
Andreas



More information about the xorg mailing list