Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Jun 1995 12:18:17 -0500 (CDT)
From:      Mike Pritchard <mpp@legarto.minn.net>
To:        roberto@blaise.ibp.fr (Ollivier Robert)
Cc:        hackers@freebsd.org
Subject:   Re: ntpdate
Message-ID:  <199506101718.MAA17000@mpp.com>
In-Reply-To: <199506101658.SAA06647@blaise.ibp.fr> from "Ollivier Robert" at Jun 10, 95 06:58:14 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> > The problem is that when ntpdate is run within my /etc/ppp/ip-up script, 
> > it just hangs.  Running ntpdate from a shell prompt right away
> 
> I have the same problem. It seems impossible to run ntpdate without a
> tty attached (it is how I see the problem anyway). I don't know how
> to fix that.

I think I botched the last message I tried to send out about this,
so I'll try again...

I used to use ntpdate in my old SLIP scripts without any problems,
but they only redirected stdin/out/err to /dev/null and ran
in the background.  Maybe some of the controlling tty stuff pppd is 
doing screws things up.

To the previous poster: the default route option is setup in my
/etc/ppp/options file, and I have verified that the default
route is in place when the ntpdate hangs up.

Thinking that it might be related to pppd leaving file descriptors
open when it calls the ip-up script, I changed pppd to close
everything except stdin/out/err before the exec and that
didn't help either (and verified with fstat that the open files
for the process looked reasonable).

I added a "sleep 60" in the ip-up script just before the
ntpdate, and during that time verified that I can run ntpdate
from a shell prompt without any problems, and I can also telnet/ping/whatever
any machine out on the net without any problems.  That verifies that
the network is fully functional when things hangup at that point
in the ip-up script.

I stuck a ping in before the ntpdate, and no matter what machine
I ping, the ping always gets exactly 1 packet back and then hangs.  
ps shows that the "wchan" is "netio".

I tried putting in a "finger @freebsd.org" in there instead
and that works, as do my popclient and sendmail all TCP sockets.  
ntpdate uses udp, and ping is using icmp packets.  I wonder if any 
non-TCP sockets fail in the ip-up script.  I'll have to hunt down a few 
more programs that I can try out here and see how they behave.
-- 
Mike Pritchard
mpp@legarto.minn.net
"Go that way.  Really fast.  If something gets in your way, turn"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199506101718.MAA17000>