/usr/lib/arm-linux-gnueabihf/indicator-datetime/indicator-datetime-service:5:reset_timer:unity::indicator::datetime::LiveClock::Impl::on_timerfd_cond:g_main_dispatch:g_main_context_dispatch:g_main_context_iterate
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical System Image |
Fix Released
|
Critical
|
Unassigned | ||
indicator-datetime (Ubuntu) |
Fix Released
|
Critical
|
Charles Kerr | ||
indicator-datetime (Ubuntu RTM) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
It happened randomly but several time on RTM/krillin. According to errors.u.c it started with 13.10.0+
[ Charles Kerr ]
* change the WallClock to detect time changes from
TFD_
The Ubuntu Error Tracker has been receiving reports about a problem regarding indicator-datetime. This problem was most recently seen with version 13.10.0+
current build number: 242
device name: krillin
channel: ubuntu-
last update: 2015-02-23 08:07:23
version version: 242
version ubuntu: 20150223
version device: 20150216-fe747ac
version custom: 20150216-561-29-186
Related branches
- Ted Gould (community): Approve
-
Diff: 97 lines (+35/-24)1 file modifiedsrc/clock-live.cpp (+35/-24)
- Ted Gould (community): Approve
-
Diff: 97 lines (+35/-24)1 file modifiedsrc/clock-live.cpp (+35/-24)
description: | updated |
description: | updated |
Changed in indicator-datetime (Ubuntu): | |
importance: | Undecided → High |
description: | updated |
Changed in indicator-datetime (Ubuntu): | |
importance: | High → Critical |
Changed in indicator-datetime (Ubuntu): | |
assignee: | nobody → Charles Kerr (charlesk) |
status: | New → In Progress |
Changed in canonical-devices-system-image: | |
status: | New → Fix Released |
importance: | Undecided → Critical |
Confirmed, this is related to the TFD_TIMER_ CANCEL_ ON_SET change. Looks like timerfd_settime() is failing and setting errno to ECANCELED. This isn't listed as a possible error in the manpage but now that we're hitting ECANCELED a web search turns up the condition pretty quickly.
The ability to return ECANCELED was added was added for this use case:
<http:// git.kernel. org/cgit/ linux/kernel/ git/tip/ tip.git/ commit/ ?id=99ee5315dac 6211e972fa3f23b cc9a0343ff58c4>
> Some applications must be aware of clock realtime being set www.spinics. net/lists/ linux-tip- commits/ msg11814. html
> backward. A simple example is a clock applet which arms a timer for
> the next minute display. If clock realtime is set backward then the
> applet displays a stale time for the amount of time which the clock
> was set backwards. Due to that applications poll the time because we
> don't have an interface.
>
> Extend the timerfd interface by adding a flag which puts the timer
> onto a different internal realtime clock. All timers on this clock are
> expired whenever the clock was set.
>
> The timerfd core records the monotonic offset when the timer is
> created. When the timer is armed, then the current offset is compared
> to the previous recorded offset. When it has changed, then
> timerfd_settime returns -ECANCELED. When a timer is read the offset is
> compared and if it changed -ECANCELED returned to user space. Periodic
> timers are not rearmed in the cancelation case.
> http://
Likely solution: in indicator- datetime/ src/clock- live.cpp, move the timerfd_create() call from LiveClock: :Impl:: Impl() to LiveClock: :Impl:: reset_timer( ), also adding a test to close() the previous timer if it's not -1.
I will be able to start on this in ~10 hours when my jury duty is done for the day. If this bug is deemed as supercritical, please feel free to reclaim the ticket and fix it before then.