Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 275055 - net-misc/ntp-4.2.4_p7: Exits with code 0377 when time exceeds sanity limit
Summary: net-misc/ntp-4.2.4_p7: Exits with code 0377 when time exceeds sanity limit
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-22 13:59 UTC by Michiel
Modified: 2009-12-14 03:39 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
backtrace (ntpdbt.txt,3.94 KB, text/plain)
2009-06-22 14:06 UTC, Michiel
Details
ntp.conf (ntp.conf,252 bytes, text/plain)
2009-06-22 14:53 UTC, Michiel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michiel 2009-06-22 13:59:21 UTC
Ntpd exits with code 0377 not long after starting the service. It leaves no error messages.

Reproducible: Always
Comment 1 Michiel 2009-06-22 14:06:02 UTC
Created attachment 195453 [details]
backtrace

I set a breakpoint in exit.
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2009-06-22 14:49:58 UTC
Please post your `emerge --info' and /etc/ntp.conf.
Comment 3 Michiel 2009-06-22 14:50:45 UTC
Portage 2.1.6.13 (default/linux/x86/2008.0, gcc-4.3.3, glibc-2.10.1-r0, 2.6.30-gentoo-r1 i686)
=================================================================
System uname: Linux-2.6.30-gentoo-r1-i686-Intel-R-_Pentium-R-_4_CPU_2.80GHz-with-gentoo-2.0.1
Timestamp of tree: Mon, 22 Jun 2009 03:20:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     4.0_p24
dev-java/java-config: 2.1.8-r1
dev-lang/python:     2.6.2-r1
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.6.4
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.4.3-r3
sys-apps/sandbox:    2.0
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.5, 1.8.5-r3, 1.9.6-r2, 1.10.2, 1.11
sys-devel/binutils:  2.19.1-r1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.29
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -ggdb -march=pentium4 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -ggdb -march=pentium4 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="-a"
FEATURES="buildsyspkg ccache distlocks fixpackages parallel-fetch protect-owned sandbox sfperms splitdebug strict unmerge-orphans userfetch userpriv usersandbox usersync"
GENTOO_MIRRORS="ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo ftp://mirror.leaseweb.com/gentoo/ ftp://gentoo.tiscali.nl/pub/mirror/gentoo"
LANG="en_US.utf8"
LC_ALL=""
LDFLAGS="-Wl,-O1"
LINGUAS="en_US"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/gnash-cvs"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac aalib acl acpi adns aften alsa audiofile avahi berkdb branding bzip2 cairo caps cddb cdinstall cdparanoia cdr cli consolekit crypt cups curl dbus dirac djvu dri dts dvd dvdr encode exif expat faac faad fam fbcon ffmpeg fftw flac fontconfig fortran gd gdbm gif gmp gnome gnome-keyring gnutls gpm gstreamer gtk guile hal hardened iconv icu id3 idea idn imagemagick imap imlib isdnlog java jpeg jpeg2k lame lcms libcaca libffi libnotify libsamplerate lm_sensors lzma lzo mad mbox midi mmap mmx mp3 mpeg mplayer mtp mudflap musepack nautilus ncurses networkmanager nls nntp nptl nptlonly nsplugin offensive ogg opengl openmp pam pcre pdf perl pic plotutils png policykit ppds pppd pulseaudio python qdbm quicktime readline reflection schroedinger sdl session smi smime smp sndfile sox speex spell spl sqlite sqlite3 sse sse2 ssl startup-notification subversion svg sysfs taglib tcpd theora threads tiff truetype twolame unicode vorbis wavpack webkit win32codecs wmf wxwindows x264 x86 xattr xcb xcomposite xfce xml xorg xpm xscreensaver xulrunner xv xvid zeroconf zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_US" USERLAND="GNU" VIDEO_CARDS="sis radeon"
Unset:  CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 4 Michiel 2009-06-22 14:53:56 UTC
Created attachment 195455 [details]
ntp.conf

This happens after a "synchronized to" message in /var/log/messages.
Comment 5 SpanKY gentoo-dev 2009-06-28 16:47:31 UTC
so run ntpd manually with -ddddn
Comment 6 Michiel 2009-07-25 07:25:54 UTC
This didn't happen for a while so I couldn't get the needed messages. I recompiled with debug use flag, and ran ntpd manually with -ddddn. These are the last couple of lines it logs.

The thing I notice in these messages is that first it says "synchronized to..." and a bit later "...time correction... exceeds sanity limit..." plus that last message isn't logged. 

clock_filter: n 5 off 2561.547105 del 0.021882 dsp 0.438289 jit 0.025018, age 0
select: endpoint -1 2560.994237
select: endpoint  0 2561.547105
select: endpoint  1 2562.099973
cluster: survivor 213.154.229.26 metric 2.552868
select: combine offset 2561.547105
report_event: system event 'event_peer/strat_chg' (0x04) status 'sync_alarm, sync_ntp, 2 events, event_restart' (0xc621)
addto_syslog: synchronized to 213.154.229.26, stratum 2
poll_update: at 259 213.154.229.26 flags 0041 poll 6 burst 0 last 259 next 325
clock_update: at 259 assoc 4 
local_clock: assocID 24737 offset 2561.547104910 freq -142.553 state 1
addto_syslog: time correction of 2562 seconds exceeds sanity limit (1000); set clock manually to the correct UTC time.
report_event: system event 'event_fault' (0x02) status 'sync_alarm, sync_ntp, 3 events, event_peer/strat_chg' (0xc634)
Comment 7 SpanKY gentoo-dev 2009-12-14 03:15:20 UTC
looks like this is correct behavior

   LOG_ERR

   time correction of ? seconds exceeds sanity limit (?); set clock manually to the correct UTC time.
      Fatal error. Better do what it says, then restart the daemon. Be advised NTP and Unix know nothing about local time zones. The clock must be set to
      Coordinated Universal Time (UTC). Believe it; by international agreement abbreviations are in French and descriptions are in English.
Comment 8 Michiel 2009-12-14 03:39:10 UTC
True. But that message about the sanity limit and what to do to fix it, was not logged. It only showed up on the terminal after I ran it manually. Even though it seems to be quite important. That's why I didn't know what to do to fix it and why I opened this bug report.