clock is delayed by a constant amount when ntpd is enabled

Bug #141056 reported by Bogdan Butnaru
4
Affects Status Importance Assigned to Milestone
gnome-system-tools (Ubuntu)
Invalid
Undecided
Unassigned
ntp (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Hello! I'm using Ubuntu Gutsy and I noticed some very strange behavior of the date and time settings.

I've been using manually-set date for a long time, but it had a lot of skew (not sure why) so I switched to using the time servers. I just enabled the network time in the clock applet, and added a few closer servers (Europe) from the list it offered next to the usual Ubuntu time server.

Then I noticed that the time was very off, by several hours.

If I turn off the ntp service (/etc/init.d/ntp stop), then run ntpdate-debian, the time and date are set correctly. I did that yesterday, turned ntp back on, and today I noticed a 16 hour difference again:

bogdanb@zalmox:~$ date
Thu Sep 20 05:08:19 CEST 2007 [wrong]
bogdanb@zalmox:~$ sudo /etc/init.d/ntp stop
[sudo] password for bogdanb:
 * Stopping NTP server ntpd [ OK ]
bogdanb@zalmox:~$ sudo ntpdate-debian
19 Sep 21:08:56 ntpdate[7476]: step time server 193.62.22.98 offset -28799.890942 sec
bogdanb@zalmox:~$ date
Wed Sep 19 21:09:13 CEST 2007 [correct]
bogdanb@zalmox:~$ sudo /etc/init.d/ntp start
sudo: timestamp too far in the future: Sep 20 05:08:46 2007
[sudo] password for bogdanb:
 * Starting NTP server ntpd [ OK ]
bogdanb@zalmox:~$ date
Wed Sep 19 21:16:39 CEST 2007

Any idea what could be wrong? I didn't mess with any of the config files, and as far as I can tell the timezone is set-up correctly. Still, the delay does seem to be an even number of hours... (I don't know what it was yesterday, I forgot to check, but I'll look if it happens again.)

Revision history for this message
Matt Adams (frak10) wrote :

This also occurs in Kubuntu Gutsy Gibbon.

Revision history for this message
Bogdan Butnaru (bogdanb) wrote :

I have this behaviour on every Gutsy machine I have (three). After a bit of following this thing it appears that the delay is exactly +2hours, which incidentally is my timezone, CEST, or UTC+2. I think some of the packages, probably NTP, are confused; probably it thinks the RTC is set to UTC (which is what I'd want) but instead it's set to local time (which I don't know how to fix).

I'll link a few more packages to this bug, maybe it'll get some more eyes on it.

Revision history for this message
Bogdan Butnaru (bogdanb) wrote :

I linked this to NTP, since that's where I think the issue is. I also linked it to gnome-system-tools, which contains the time-admin applet; I don't think that's the problem, but someone there might now how to look for more info.

Revision history for this message
Bogdan Butnaru (bogdanb) wrote :

Note that in my first report the delay was much higher, now it seems to have stabilized to two hours.

Revision history for this message
Sebastien Bacher (seb128) wrote :

The ntp software do a slow clock readjusting to avoid confusions, not sure if what you describe is a bug or the expected behaviour, could you describe steps to trigger the issue and what is happening and what you would expect?

Revision history for this message
Bogdan Butnaru (bogdanb) wrote :

What I did was (1) open the time and date settings (time-admin), using the clock applet on the panel, (2) configure my time zone to Europe/Paris (which is UTC+2), and (3) activated "Keep synchronized with internet servers", which is the next option in that menu.

Now my clock displays 5:56 pm (and 'date' shows "Sun Oct 21 17:56:57 CEST 2007"), though the current CEST time is 15:56. It should display 3:56 pm.

If I disable the ntp daemon (using either the panel or the /etc/init.d script), then run 'ntpdate-debian' (which should do the same thing ntpd does, but just once), the clock is set correctly. I guess I could just use a cron script to run ntpdate-debian every hour or so, but the bug is still there.

Revision history for this message
Dean Loros (autocrosser) wrote :

I have had a similar problem with the current Hardy---but in my case I couldn't manually change the time---getting a "The configuration could not be saved" message---looks to be a permissions error--happened shortly after the last tzdata update. Prior to the update, I could change the time manually---I turned off the ntp service (/etc/init.d/ntp stop), then ran ntpdate-debian & time is again running correctly.

Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

Hi Bogdan,

Can you comment is this is still an issue with the latest Hardy Alpha release? Thanks.

Changed in gnome-system-tools:
status: New → Incomplete
Revision history for this message
Bogdan Butnaru (bogdanb) wrote :

I'm not sure, I've disabled it because of this bug a while ago.

The clock applet doesn't allow me to set the system time for some reason. (Nothing happens when I click that button.) I started ntpd by hand, I'll leave it for a while and I'll see what happens.

Revision history for this message
Hew (hew) wrote :

We are closing this bug report because it lacks the information we need to investigate the problem, as described in the previous comments. Please reopen it if you can give us the missing information, and don't hesitate to submit bug reports in the future. To reopen the bug report you can click on the current status, under the Status column, and change the Status back to "New". Thanks again!

Changed in ntp:
status: New → Invalid
Changed in gnome-system-tools:
status: Incomplete → Invalid
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.