Package: util-linux
Version: 2.13.1.1-1
Severity: important

On certain platforms with certain hardware clock chips, hwclock will
hang in a ~24 hour loop upon system startup (or later, when executed
manually). hwclock is always started, so for some users, it can be a
very unpleasant experience.

One of such chips is isl1208 - if it ever had a power failure (i.e., its
battery removed or not loaded), it will not tick again unless the clock
is set.

Unfortunately, hwclock will hang in a loop if the clock does not tick:

# strace hwclock --show:
(...)
ioctl(3, RTC_RD_TIME, {tm_sec=0, tm_min=0, tm_hour=0, tm_mday=0,
tm_mon=-1, tm_year=100, ...}) = 0
ioctl(3, RTC_RD_TIME, {tm_sec=0, tm_min=0, tm_hour=0, tm_mday=0,
tm_mon=-1, tm_year=100, ...}) = 0
ioctl(3, RTC_RD_TIME, {tm_sec=0, tm_min=0, tm_hour=0, tm_mday=0,
tm_mon=-1, tm_year=100, ...}) = 0
(...)

Repeated million times:

  hwclock/rtc.c, busywait_for_rtc_clock_tick():

  for (i = 0;
       (rc = do_rtc_read_ioctl(rtc_fd, &nowtime)) == 0
        && start_time.tm_sec == nowtime.tm_sec;
       i++)
    if (i >= 1000000) {
      fprintf(stderr, _("Timed out waiting for time change.\n"));
      return 2;
    }


This bug happens for current and all previous versions of hwclock
shipped with Debian; it would be nice if it was fixed at least for Lenny.


References:

1) Discussion on rtc-linux list:

http://groups.google.com/group/rtc-linux/browse_thread/thread/85ed7545e87bee47

2) Discussion on util-linux-ng list:

http://thread.gmane.org/gmane.linux.utilities.util-linux-ng/1710

3) Patch fixing the issue:

http://article.gmane.org/gmane.linux.utilities.util-linux-ng/1726



--
Tomasz Chmielewski
http://wpkg.org




--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to