NihTimer relies on non-monotonic clock

Bug #389589 reported by Scott James Remnant (Canonical)
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libnih
Fix Released
High
Scott James Remnant (Canonical)

Bug Description

NihTimer works by scheduling a system clock time at which the second part should be run. This time is obtained from time(NULL), the UNIX seconds since epoch.

This is not safe against changes to the system clock; any backward change to the system time would result in a longer interval the size of the delta, any forward change to the system time results in a shorter interval.

timer_gettime (CLOCK_MONOTONIC) should be used instead, or the code re-engineered completely - e.g. to use timerfd

Changed in libnih:
importance: Undecided → High
status: New → Triaged
Revision history for this message
Slawomir Czarko (lauchpad-net-sklep) wrote :

Any idea when can this be fixed?

Changed in libnih:
status: Triaged → Fix Committed
Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Fix released with Upstart 0.6.0

Changed in libnih:
assignee: nobody → Scott James Remnant (scott)
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.