From owner-freebsd-stable Wed Dec 26 6:53:34 2001 Delivered-To: freebsd-stable@freebsd.org Received: from thehousleys.net (frenchknot.ne.mediaone.net [66.31.234.148]) by hub.freebsd.org (Postfix) with ESMTP id 5938337B42C for ; Wed, 26 Dec 2001 06:53:19 -0800 (PST) Received: (from root@localhost) by thehousleys.net (8.11.6/8.11.2) id fBQErIq84976; Wed, 26 Dec 2001 09:53:18 -0500 (EST) (envelope-from jim@Thehousleys.net) Received: from Thehousleys.net (baby.int.thehousleys.net [192.168.0.24]) (authenticated) by thehousleys.net (8.11.6/8.11.6) with ESMTP id fBQEr8u84968; Wed, 26 Dec 2001 09:53:08 -0500 (EST) (envelope-from jim@Thehousleys.net) Message-ID: <3C29E453.4179E2FB@Thehousleys.net> Date: Wed, 26 Dec 2001 09:53:07 -0500 From: James Housley X-Mailer: Mozilla 4.79 [en] (X11; U; Linux 2.4.2 i386) X-Accept-Language: en MIME-Version: 1.0 To: Ollivier Robert Cc: stable@freebsd.org Subject: Re: NTPD dumps core in 4.5-PRERELEASE References: <3C269EE2.7820ACBC@Thehousleys.net> <20011225195642.B711@tara.freenix.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS perl-10 Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Ollivier Robert wrote: > > According to James Housley: > > 12/22 5am EST. 1 CVSup 12/23 5am EST. The laptop is dumps core on > > startup only with 12/22 & 12/23. I don't believe this was doing this > > before 4.1.0. If I re-run with the exact same parameters after the boot > > is finished all is well. Attached is the dmesg.boot and some debug > > information from the core file. This is reproduceable with every reboot > > on this one machine. > > When you boot this machine, do you have access to the IP addresses of all your > ntp.conf servers/peers ? > > > 1553 if (!peer->reach || (peer->stratum > 1 && > > 1554 peer->refid == > > (gdb) > > 1555 peer->dstadr->sin.sin_addr.s_addr) || > > 1556 peer->stratum >= STRATUM_UNSPEC || > > 1557 (root_distance(peer) >= MAXDISTANCE + 2 * > > 1558 clock_phi * ULOGTOD(sys_poll))) > ... > > (gdb) p peer > > $1 = (struct peer *) 0x80829a8 > > (gdb) p (struct peer *) peer > > $2 = (struct peer *) 0x80829a8 > > (gdb) p *(struct peer *) peer > > $3 = {next = 0x0, ass_next = 0x0, srcadr = {sin_len = 0 '\000', > > sin_family = 2 '\002', sin_port = 31488, sin_addr = {s_addr = 98175}, > > sin_zero = "\000\000\000\000\000\000\000"}, dstadr = 0x0, associd = 59212, > > It is pretty obvious that your problem is that dstadr is NULL so > peer->dstadr->whatever will segfault. > I am not sure why this is so. I have local DNS running on my router and another machine. Besides the laptop, three other machines are using the same peers. So the IP should be in the DNS. I agree that there is a NULL pointer here, but isn't this some thing that should be checked for in the program? And as mentioned in the origional post: If I rerun the program after startup and it has segfaulted, it has never segfaulted again. This also started after the 4.1.0 upgrade. Thanks for you help. Jim -- /"\ ASCII Ribbon Campaign . \ / - NO HTML/RTF in e-mail . X - NO Word docs in e-mail . / \ ----------------------------------------------------------------- jeh@FreeBSD.org http://www.FreeBSD.org The Power to Serve jim@TheHousleys.Net http://www.TheHousleys.net jhousley@SimTel.Net http://www.SimTel.Net --------------------------------------------------------------------- Do not meddle in the affairs of dragons, for you are crunchy and taste good with ketchup. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message