Date: Wed, 26 Dec 2001 09:53:07 -0500 From: James Housley <jim@thehousleys.net> To: Ollivier Robert <roberto@keltia.freenix.fr> Cc: stable@freebsd.org Subject: Re: NTPD dumps core in 4.5-PRERELEASE Message-ID: <3C29E453.4179E2FB@Thehousleys.net> References: <3C269EE2.7820ACBC@Thehousleys.net> <20011225195642.B711@tara.freenix.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3C29E453.4179E2FB>
