init: kill timer relies on non-monotonic clock
Bug #389588 reported by
Scott James Remnant (Canonical)
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
upstart |
Fix Released
|
High
|
Scott James Remnant (Canonical) |
Bug Description
The kill timer (interval between sending SIGTERM and SIGKILL to a process) 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 (or immediate kill).
timer_gettime (CLOCK_MONOTONIC) should be used instead, or the code re-engineered completely
Changed in upstart: | |
status: | Triaged → Fix Committed |
Changed in upstart: | |
milestone: | none → 0.6.0 |
To post a comment you must log in.
Really bug #389589 since this uses NihTimer, but worth tracking separately