From owner-freebsd-stable@FreeBSD.ORG Wed Mar 2 23:07:56 2005 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4E4F016A4CE for ; Wed, 2 Mar 2005 23:07:56 +0000 (GMT) Received: from postal1.es.net (postal1.es.net [198.128.3.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0C2DD43D46 for ; Wed, 2 Mar 2005 23:07:56 +0000 (GMT) (envelope-from oberman@es.net) Received: from ptavv.es.net ([198.128.4.29]) by postal1.es.net (Postal Node 1) with ESMTP (SSL) id IBA74465; Wed, 02 Mar 2005 15:07:55 -0800 Received: from ptavv (localhost [127.0.0.1]) by ptavv.es.net (Tachyon Server) with ESMTP id 7A0F05D07; Wed, 2 Mar 2005 15:07:55 -0800 (PST) To: "Thomas Krause" In-reply-to: Your message of "Wed, 02 Mar 2005 16:07:04 +0100." <2481.212.78.101.51.1109776024.squirrel@mta.webmatic.de> Date: Wed, 02 Mar 2005 15:07:55 -0800 From: "Kevin Oberman" Message-Id: <20050302230755.7A0F05D07@ptavv.es.net> cc: freebsd-stable@freebsd.org Subject: Re: 2 ntpd (5.3-STABLE-SNAP001) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Mar 2005 23:07:56 -0000 > Date: Wed, 2 Mar 2005 16:07:04 +0100 (CET) > From: "Thomas Krause" > Sender: owner-freebsd-stable@freebsd.org > > Hello, > when starting ntpd at boot time, I've 2 ntpd's running: > > gate:/ # ps auxw | grep ntp > root 407 0.0 0.7 2944 1752 ?? Ss 3:54PM 0:00.02 /usr/sbin/ntpd > -p /var/run/ntpd.pid -f /var/db/ntpd.drift > root 417 0.0 0.7 2944 1776 ?? S 3:54PM 0:00.00 /usr/sbin/ntpd > -p /var/run/ntpd.pid -f /var/db/ntpd.drift > > gate:/ # ntpq > ntpq> peers > No association ID's returned > > After restarting, I've one daemon and all is running fine: > > gate:/ # /etc/rc.d/ntpd restart > Stopping ntpd. > Starting ntpd. > > gate:/ # ps auxw | grep ntp > root 566 0.0 0.7 2944 1784 ?? Ss 4:04PM 0:00.02 /usr/sbin/ntpd > -p /var/run/ntpd.pid -f /var/db/ntpd.drift > > Any idea why? I' running 5.3-STABLE-SNAP001. Either you have two commands to start ntpd in /etc/rc.d or (more likely) the parent process is never exiting. When ntpd starts, it forks a child process (the daemon) and exits. I have seen cases where the parent process never exits because the child never properly starts. That said, I have never seen this happen on a FreeBSD system, so it may be that you are starting it twice. But this seems a bit unlikely as the second daemon should exit immediately because the network socket is already in use. But it's possible that they are stating so close together that a race condition is locking things up. (Just speculation.) -- R. Kevin Oberman, Network Engineer Energy Sciences Network (ESnet) Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab) E-mail: oberman@es.net Phone: +1 510 486-8634