✘ntpd segfault

Eric S. Raymond esr at thyrsus.com
Fri Aug 31 04:13:00 UTC 2018


Gary E. Miller via devel <devel at ntpsec.org>:
> Yo Eric!
> 
> On Thu, 30 Aug 2018 15:35:46 -0400
> "Eric S. Raymond" <esr at thyrsus.com> wrote:
> 
> > Gary E. Miller via devel <devel at ntpsec.org>:
> > > I'm seeing something new and odd with NTPsec git head.  When I kill
> > > the old ntpd to start a new one, this is in my logs:
> > > 
> > > [834374.559668] ntpd[8904]: segfault at 88 ip 00005581071fb466 sp
> > > 00007fff53c460c0 error 4 in ntpd (deleted)[5581071c2000+7f000]  
> > 
> > That is not good.  Can you bisect to identify whe it started hapening?
> 
> Of course the bad one is not a small commit:
> 
> commit e2789cf532126902c93569d12a4a8ce268cd5e6f (HEAD)
> Author: Eric S. Raymond <esr at thyrsus.com>
> Date:   Mon Nov 20 18:35:57 2017 -0500
> 
>     Information hiding - narrow the interface to refclock shutdown methods.
> 
> 
> I bounced back and forth between that commit and the previous one:
> 5028002e9cdaebe027d81b7e28b3fa02dccf1eec
> 
> This is clearly the bad commit.  The commit touches a number of drivers.
> 'git log -p' shows 660 lines.  
> 
> The problem in the logs is:
> 
> [855303.005704] ntpd[2480]: segfault at 90 ip 000055d2593c968c sp 00007ffcd7fd3770 error 4 in ntpd[55d259390000+7f000]
> [855303.005712] Code: 41 54 55 53 48 83 ec 10 64 48 8b 04 25 28 00 00 00 48 89 44 24 08 31 c0 48 8b 1e 48 85 db 74 66 41 89 fc 48 89 f5 48 8b 43 10 <48> 39 b0 90 00 00 00 74 2f 8b 56 38 83 fa ff 74 1c 48 8d 05 70 57 
> 
> The drivers I am using are refclock_shm and refclock_gpsd.  Plus some
> peers.
> 
> Another very similar host, with similar ntpd configuration, but not using
> driver_gpsd does not show the problem.
> 
> I see the gpsd_shutdown() function was changed in that commit.  The only
> change in refclock_gpsd.c.  I do not understand the change.

Well, crap.

You think the core-dump is happening during shutdown?

That *would* neatly explain why it's gone unnoticed for 9 months.

I'll get on it tomorrow.
-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>

My work is funded by the Internet Civil Engineering Institute: https://icei.org
Please visit their site and donate: the civilization you save might be your own.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.ntpsec.org/pipermail/devel/attachments/20180831/8095f5e5/attachment.bin>


More information about the devel mailing list