Bug 10296

Summary: [PATCH] Backward time adjustment or timestamp rewind may cause server lockup
Product: xorg Reporter: Tomas Janousek <tomi>
Component: Protocol/CoreAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: high Keywords: regression
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
proposed fix none

Description Tomas Janousek 2007-03-14 15:00:10 UTC
The commit bb7a39ac13731a80fc2d80487f9da760dd34c3ba introduced this regression.

The execution of timer callbacks in CheckAllTimes may (and does e.g. with synaptics) result in the timers being rescheduled or new timers being set. The TimerSet function uses current "now" value though. Therefore, subtracting the old "new" from the new timer's "expires" results in a higher value than "delta" + 250. As a result, the function CheckAllTimers never gets out of the goto loop.

I'm attaching a proposed fix.
Comment 1 Tomas Janousek 2007-03-14 15:01:00 UTC
Created attachment 9145 [details] [review]
proposed fix
Comment 2 Tomas Janousek 2007-03-28 10:59:58 UTC
A forgot to mention that it's nearly 100% reproducible with the synaptics driver which uses a periodic timer.
Comment 3 Adam Jackson 2007-03-28 11:09:08 UTC
Fixed in git master, and added to the 1.3 tracking page on the wiki.  Thanks!

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.