From owner-freebsd-hackers Sat Jun 10 10:18:31 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id KAA17637 for hackers-outgoing; Sat, 10 Jun 1995 10:18:31 -0700 Received: from mpp.com ([204.157.201.242]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id KAA17631 for ; Sat, 10 Jun 1995 10:18:28 -0700 Received: (from mpp@localhost) by mpp.com (8.6.11/8.6.9) id MAA17000; Sat, 10 Jun 1995 12:18:17 -0500 From: Mike Pritchard Message-Id: <199506101718.MAA17000@mpp.com> Subject: Re: ntpdate To: roberto@blaise.ibp.fr (Ollivier Robert) Date: Sat, 10 Jun 1995 12:18:17 -0500 (CDT) Cc: hackers@freebsd.org In-Reply-To: <199506101658.SAA06647@blaise.ibp.fr> from "Ollivier Robert" at Jun 10, 95 06:58:14 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 2035 Sender: hackers-owner@freebsd.org Precedence: bulk > > 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"