← Back to team overview

touch-packages team mailing list archive

[Bug 1472056] Re: ntpd can use stale /var/lib/ntp/ntp.conf.dhcp config

 

The stale file was apparently left by /etc/dhcp/dhclient-exit-
hooks.d/ntp. Since this dhclient script updates the ntp.conf.dhcp file
when a new NTP server is advertised via DHCP, it should be OK to always
use the most recent file between /var/lib/ntp/ntp.conf.dhcp and
/etc/ntp.conf.

The attached patch changes the initscript to use
/var/lib/ntp/ntp.conf.dhcp only if it is newer than /etc/ntp.conf.

** Patch added: "Only use /var/lib/ntp/ntp.conf.dhcp if it is newer than /etc/ntp.conf"
   https://bugs.launchpad.net/ubuntu/+source/ntp/+bug/1472056/+attachment/4425385/+files/ntp-dont-use-stale-dhcp-conf.patch

** Bug watch added: Debian Bug tracker #600661
   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=600661

** Also affects: ntp (Debian) via
   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=600661
   Importance: Unknown
       Status: Unknown

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to ntp in Ubuntu.
https://bugs.launchpad.net/bugs/1472056

Title:
  ntpd can use stale /var/lib/ntp/ntp.conf.dhcp config

Status in ntp package in Ubuntu:
  New
Status in ntp package in Debian:
  Unknown

Bug description:
  Today, I noticed that my laptop's time was ~4s ahead of my home NTP
  server. Looking at 'ntpdc -sn localhost' I noticed that my laptop was
  trying to sync with an unknown and unreachable server. Surprisingly,
  this server was not in /etc/ntp.conf.

  After some debugging, I found a stale /var/lib/ntp/ntp.conf.dhcp file
  that was several days old. This explains why my clock drift so much as
  I was not sync'ing with any reachable server.

  ProblemType: Bug
  DistroRelease: Ubuntu 14.04
  Package: ntp 1:4.2.6.p5+dfsg-3ubuntu2.14.04.3
  ProcVersionSignature: Ubuntu 3.13.0-57.95-generic 3.13.11-ckt21
  Uname: Linux 3.13.0-57-generic x86_64
  ApportVersion: 2.14.1-0ubuntu3.11
  Architecture: amd64
  Date: Mon Jul  6 22:27:52 2015
  InstallationDate: Installed on 2014-01-26 (526 days ago)
  InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Alpha amd64 (20140124)
  KernLog:
   Jul  6 07:42:09 simon-laptop kernel: [116085.154414] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out
   Jul  6 07:42:09 simon-laptop kernel: [116085.157431] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out
   Jul  6 12:07:27 simon-laptop kernel: [132003.862223] type=1400 audit(1436198847.026:183): apparmor="DENIED" operation="connect" profile="/usr/lib{,32,64}/libreoffice/program/oosplash" name="/tmp/OSL_PIPE_1000_SingleOfficeIPC_9c6cceebd9df6af8f450bf52b6de65d0" pid=30017 comm="oosplash" requested_mask="rw" denied_mask="rw" fsuid=1000 ouid=1000
   Jul  6 19:54:12 simon-laptop kernel: [153828.256900] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out
   Jul  6 19:54:12 simon-laptop kernel: [153828.259982] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out
  NtpStatus:
   remote           refid      st t when poll reach   delay   offset  jitter
   ==============================================================================
    ntp.sdeziel.inf 206.108.0.132    2 u   37   64    1    5.967  -34.563   0.000
  ProcEnviron:
   LANGUAGE=en_US
   TERM=xterm
   PATH=(custom, no user)
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  SourcePackage: ntp
  UpgradeStatus: No upgrade log present (probably fresh install)
  modified.conffile..etc.init.d.ntp: [modified]
  modified.conffile..etc.ntp.conf: [modified]
  mtime.conffile..etc.init.d.ntp: 2015-07-06T22:27:26.297288
  mtime.conffile..etc.ntp.conf: 2015-07-06T22:24:58.208193

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ntp/+bug/1472056/+subscriptions


References