Re: ntpd(8) exits quietly after fork()

2007-03-13 Thread Dan Nelson
In the last episode (Mar 13), Kevin Kinsey said:
> ntpd won't continue running on my "stratum 2" server (making our other 
> systems a tad untrustworthy "as time goes by").
> 
> $ uname -a
> FreeBSD ezekiel.daleco.biz 6.2-RELEASE FreeBSD 6.2-RELEASE #5: Sat Jan 20 
> 16:41:42 CST 2007 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/GENERIC  i386
> 
> using ktrace and kdump I get this prior to exit:
> 
>  12195 ntpd NAMI  "/var/run/logpriv"
>  12195 ntpd RET   connect 0
>  12195 ntpd CALL  sendto(0x4,0xbfbfdd50,0x3e,0,0,0)
>  12195 ntpd GIO   fd 4 wrote 62 bytes
>"<13>Mar 13 13:32:06 ntpd: logging to file /home/kadmin/ntp.log"
>  12195 ntpd RET   sendto 62/0x3e
>  12195 ntpd CALL  clock_gettime(0,0xbfbfeb08)
>  12195 ntpd RET   clock_gettime 0
>  12195 ntpd CALL  sigaction(0x1,0xbfbfeac0,0xbfbfeae0)
>  12195 ntpd RET   sigaction 0
>  12195 ntpd CALL  fork
>  12195 ntpd RET   fork 12196/0x2fa4
>  12195 ntpd CALL  exit(0)

It seems you're missing the -i flag to ktrace, which means you aren't
tracing the child of this fork operation.  This ktrace output looks a
lot like the code in ntpd.c:ntpdmain(), in which ntpd forks, the parent
immediately exits, and the child continues.

-- 
Dan Nelson
[EMAIL PROTECTED]
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: ntpd(8) exits quietly after fork()

2007-03-13 Thread Chuck Swiger

On Mar 13, 2007, at 3:46 PM, Kevin Kinsey wrote:
The ktrace is on "ntpd -C /etc/ntp.conf -l $HOME/ntp.log" --- I'd  
seen nothing at all in /var/log/messages (was running tail on it  
while restarting it several times), so I pointed it there.  The  
full ktrace is rather long, any point to posting it?  It did  
complain about some missing files, but seemed to accept others and  
go on.  Here's most of the complaints in snippage form


 
 12195 ktrace   NAMI  "/sbin/ntpd"
 12195 ktrace   RET   execve -1 errno 2 No such file or directory
 12195 ktrace   CALL  execve(0xbfbfe710,0xbfbfec5c,0xbfbfec74)
 12195 ktrace   NAMI  "/bin/ntpd"
 12195 ktrace   RET   execve -1 errno 2 No such file or directory
 
 12195 ntpd CALL  open(0x280a2c48,0,0x1b6)
 12195 ntpd NAMI  "/etc/libmap.conf"
 12195 ntpd RET   open -1 errno 2 No such file or directory
 
 12195 ntpd NAMI  "/etc/malloc.conf"
 12195 ntpd RET   readlink -1 errno 2 No such file or directory

 These don't seem to be related, but IANAE ;-)


It seems to be having problems locating the ntpd binary to fork/exec  
it as a child?  Is it possible the path in the /etc/rc.d/ntpd script  
isn't sane?  ntpd should be in /usr/sbin/ntpd


Grepping "ntp" in /etc/syslog.conf returns nada, so that would  
explain why there's nothing there.  I did get "status 2040" in  
$HOME/ntp.log, so I'm guessing bad driftfile was the issue?


Showing your ntp.conf file would also help, but if you'd like to  
see an example of a working stratum-2 conf file which has been in  
use for quite some time:


Nice, ty.  Mine's simple:

$ cat /etc/ntp.conf
server time.nist.gov
server navobs1.wustl.edu
driftfile /var/ntpd.drift

I've got it running fine now in FG (-n) option, and the slaves are  
happy ATM.  I guess I could give it a "&" ;-)


It did complain that sanity limit was exceeded after I started it  
with -n, which would explain this, maybe?


You might try checking "ntpq -p" and seeing whether your offset is  
too large.  In that case, killing ntpd, running "ntpdate -b  
time.nist.gov", and then restarting ntpd might help.


However, it was exiting prior to any mention of this previously,  
and I was *quite certain* that this box did the DST thing just  
fine, aside from sendmail logging behind as discussed in a thread  
on questions.


ntpd operates against GMT/UTC, and doesn't care about DST issues at  
all, fortunately.  :-)



Either way, thanks for the reply!


You're welcome...

--
-Chuck



___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: ntpd(8) exits quietly after fork()

2007-03-13 Thread Kevin Kinsey

Chuck Swiger wrote:

Hi, Kevin--

On Mar 13, 2007, at 1:14 PM, Kevin Kinsey wrote:
ntpd won't continue running on my "stratum 2" server (making our other 
systems a tad untrustworthy "as time goes by").


$ uname -a
FreeBSD ezekiel.daleco.biz 6.2-RELEASE FreeBSD 6.2-RELEASE #5: Sat Jan 
20 16:41:42 CST 2007 
[EMAIL PROTECTED]:/usr/obj/usr/src/sys/GENERIC  i386


using ktrace and kdump I get this prior to exit:

[ ... ]

The logging paths seen in the ktrace are rather non-standard-- perhaps 
ntpd doesn't have the right permissions to write to them?  Normally, 
ntpd logs to the NTP facility and critical messages might appear in 
/var/log/messages, so additional clues are probably there.




The ktrace is on "ntpd -C /etc/ntp.conf -l $HOME/ntp.log" --- I'd seen 
nothing at all in /var/log/messages (was running tail on it while 
restarting it several times), so I pointed it there.  The full ktrace is 
rather long, any point to posting it?  It did complain about some 
missing files, but seemed to accept others and go on.  Here's most of 
the complaints in snippage form


 
 12195 ktrace   NAMI  "/sbin/ntpd"
 12195 ktrace   RET   execve -1 errno 2 No such file or directory
 12195 ktrace   CALL  execve(0xbfbfe710,0xbfbfec5c,0xbfbfec74)
 12195 ktrace   NAMI  "/bin/ntpd"
 12195 ktrace   RET   execve -1 errno 2 No such file or directory
 
 12195 ntpd CALL  open(0x280a2c48,0,0x1b6)
 12195 ntpd NAMI  "/etc/libmap.conf"
 12195 ntpd RET   open -1 errno 2 No such file or directory
 
 12195 ntpd NAMI  "/etc/malloc.conf"
 12195 ntpd RET   readlink -1 errno 2 No such file or directory

 These don't seem to be related, but IANAE ;-)

 Grepping "ntp" in /etc/syslog.conf returns nada, so that would explain 
why there's nothing there.  I did get "status 2040" in $HOME/ntp.log, so 
I'm guessing bad driftfile was the issue?


Showing your ntp.conf file would also help, but if you'd like to see an 
example of a working stratum-2 conf file which has been in use for quite 
some time:


Nice, ty.  Mine's simple:

$ cat /etc/ntp.conf
server time.nist.gov
server navobs1.wustl.edu
driftfile /var/ntpd.drift

I've got it running fine now in FG (-n) option, and the slaves are happy 
ATM.  I guess I could give it a "&" ;-)


It did complain that sanity limit was exceeded after I started it with 
-n, which would explain this, maybe?  However, it was exiting prior to 
any mention of this previously, and I was *quite certain* that this box 
did the DST thing just fine, aside from sendmail logging behind as 
discussed in a thread on questions.


If it's noise, I apologize.  Buildworld should finish soon, and I'll 
monkey around with the driftfile meantime; we'll see if the issue 
persists.  Oh, and edit syslog.conf and HUP.


But, it'd been working fine for ages without all that.  Either way, 
thanks for the reply!


Kevin Kinsey
--
Function reject.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: ntpd(8) exits quietly after fork()

2007-03-13 Thread Chuck Swiger

Hi, Kevin--

On Mar 13, 2007, at 1:14 PM, Kevin Kinsey wrote:
ntpd won't continue running on my "stratum 2" server (making our  
other systems a tad untrustworthy "as time goes by").


$ uname -a
FreeBSD ezekiel.daleco.biz 6.2-RELEASE FreeBSD 6.2-RELEASE #5: Sat  
Jan 20 16:41:42 CST 2007 [EMAIL PROTECTED]:/usr/obj/usr/src/ 
sys/GENERIC  i386


using ktrace and kdump I get this prior to exit:

[ ... ]

The logging paths seen in the ktrace are rather non-standard--  
perhaps ntpd doesn't have the right permissions to write to them?   
Normally, ntpd logs to the NTP facility and critical messages might  
appear in /var/log/messages, so additional clues are probably there.


Showing your ntp.conf file would also help, but if you'd like to see  
an example of a working stratum-2 conf file which has been in use for  
quite some time:


1-pi# cat /etc/ntp.conf
# /etc/ntp.conf, configuration for ntpd

driftfile /etc/ntp.drift

statsdir /var/log/ntp/
statistics sysstats
filegen sysstats file sysstats type week enable
#logconfig =syncevents +sysevents # +allclock
#statistics loopstats peerstats clockstats
#filegen loopstats file loopstats type day enable
#filegen peerstats file peerstats type day enable
#filegen clockstats file clockstats type day enable

server time.nist.gov maxpoll 12
server bonehed.lcs.mit.edu maxpoll 12
server sundial.columbia.edu maxpoll 12
server wwv.otc.psu.edu maxpoll 12
#peer pi.codefab.com maxpoll 12
peer pong.codefab.com maxpoll 12
peer shot.codefab.com maxpoll 12
peer ns1.pkix.net maxpoll 12

restrict default nomodify
restrict localhost
#discard average 9 minimum 2
#restrict default limited
restrict 64.152.61.123 kod
# ...list of bad clients being fed "kod" or "ignore" trimmed...

2-pi# grep ntp /etc/syslog.conf
ntp.debug   /var/log/ntp/ntp.log

3-pi# ntpq -p
 remote   refid  st t when poll reach   delay
offset  jitter
 
==
-time.nist.gov   .ACTS.   1 u  41m  68m   37   49.991 
7.961   0.580
*bonehed.lcs.mit .CDMA.   1 u  204  68m  377   20.057
-2.610   6.201
+hickory.cc.colu 128.59.39.48 2 u  245  68m  377   25.537
-1.196   7.415
-otc1.psu.edu.WWV.1 u  276  68m  377   36.047   
-21.679   0.037
+pong18.145.0.30  2 u  274 1024  3770.257
-3.274   2.857
+shot65.212.71.1032 u  495 1024  3770.343 
1.467   0.664
-ns1 129.6.15.29  2 u  929 1024  3760.389
-5.890   0.769


For more details, one could also see:

  http://ntp1.codefab.com/ntpstats/ntp_stats.txt
  http://www.pool.ntp.org/scores/199.103.21.227

--
-Chuck

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


ntpd(8) exits quietly after fork()

2007-03-13 Thread Kevin Kinsey
ntpd won't continue running on my "stratum 2" server (making our other 
systems a tad untrustworthy "as time goes by").


$ uname -a
FreeBSD ezekiel.daleco.biz 6.2-RELEASE FreeBSD 6.2-RELEASE #5: Sat Jan 
20 16:41:42 CST 2007 
[EMAIL PROTECTED]:/usr/obj/usr/src/sys/GENERIC  i386


using ktrace and kdump I get this prior to exit:

 12195 ntpd NAMI  "/var/run/logpriv"
 12195 ntpd RET   connect 0
 12195 ntpd CALL  sendto(0x4,0xbfbfdd50,0x3e,0,0,0)
 12195 ntpd GIO   fd 4 wrote 62 bytes
   "<13>Mar 13 13:32:06 ntpd: logging to file /home/kadmin/ntp.log"
 12195 ntpd RET   sendto 62/0x3e
 12195 ntpd CALL  clock_gettime(0,0xbfbfeb08)
 12195 ntpd RET   clock_gettime 0
 12195 ntpd CALL  sigaction(0x1,0xbfbfeac0,0xbfbfeae0)
 12195 ntpd RET   sigaction 0
 12195 ntpd CALL  fork
 12195 ntpd RET   fork 12196/0x2fa4
 12195 ntpd CALL  exit(0)

After this, I can't `pgrep ntpd` or find a pid with "ps -aux".  I've 
found nothing in the logs; even using "-l $HOME/ntp.log".  A windows box 
complains "no response" using Softros' "NTS".  `ntpq -p" here shows


ntpq -p
 remote refid  st t when poll reach   delay   offset  jitter

 ezekiel.daleco. .INIT.16 u  148 102400.0000.000 4000.00

I can confirm that ntpd will continue to run if called with "-n" (do not 
fork).  I've started a "buildworld" cycle.  Any other suggestions?  Can 
I do anything else "debugging" wise?  Machine is about as close to 
"production" as we get, so rebuild with a debug kernel isn't something 
we'd really want to do, I think


Thanks,


Kevin Kinsey
--
Computer programmers do it byte by byte.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"