# Alternatives to ntp

## Allan Wegan

Because i, as a longtime Windows user (started with 3.11, just migrated to Gentoo 1.5 years ago), am unable to accept that software just panics the kernel on exit, i am searching for an alternative to the ntp package.

Is there any known good NTP client implementation supported on Gentoo?

----------

## PaulBredbury

 *Allan Wegan wrote:*   

> panics the kernel on exit

 

Eh? Don't be so vague. That would be a bug in the *kernel*.

 *Quote:*   

> an alternative to the ntp package.

 

Chrony.

----------

## Allan Wegan

 *PaulBredbury wrote:*   

>  *Allan Wegan wrote:*   panics the kernel on exit 
> 
> Eh? Don't be so vague. That would be a bug in the *kernel*.

 

I do not know since when it's broken or why.

Some days ago i compiled a new Gentoo Hardened kernel (3.5.4-hardened-r1) after some months uptime (including lots of software updates) and over a year running on the old kernel (but it was a version 3 hardened too) because of a hardware upgrade to a new board with i7 (integrated GPU).

I had ntp configured to set the system time once on boot but decided to reconfigure it to sync continousely as i rarely reboot anyway. But i stumbled over a sudden kernel panic. After some investigation an more panics i discovered that the kernel panics are caused by forcing ntpd processes to exit (even when trying to reboot, the ntpd does not exit and therefore gets killed resulting in a kerbne panic). ntpd seems to always run until killed even when started for a oneshot update.

As i have a fulldisk-encrypted system, a bitchy motherboard that does not boot from USB with disks attached (of course, bios is configured to boot from USB first), and hunting bugs that cause kernel panics is generally nothing i like, i decided to just unmerge and mask ntp and never come back to "solve" this issue.

Thanks for the link, net-misc/chrony is in portage - so i will try it tonight.

----------

## Ant P.

 *Quote:*   

> Is there any known good NTP client implementation supported on Gentoo?

 

All of them are good. NTP is unlikely to be the source of the problem here, given that it runs on millions of systems without causing a kernel panic.

----------

## dewke

 *Allan Wegan wrote:*   

>  *PaulBredbury wrote:*    *Allan Wegan wrote:*   panics the kernel on exit 
> 
> Eh? Don't be so vague. That would be a bug in the *kernel*. 
> 
> I do not know since when it's broken or why.
> ...

 

So by your own admission you have a flaky motherboard, and you're blaming NTP for a kernel panic?  :Shocked: 

NTP isn't supposed to start/stop, it's a daemon that is supposed to run and keep the system clock synchronized.  If you want an app to set the time, something like ntpdate would be a 1-time app that will set the system time.  You could call that from cron if you don't want to use NTP.

----------

## Allan Wegan

 *dewke wrote:*   

> So by your own admission you have a flaky motherboard, and you're blaming NTP for a kernel panic? 

 

I blamed it until i tested Chrony. Chrony manages to update my system time (NTPd failed to do that) but panics on exit too. As the RTC is not getting updated, i am now sure, it's a Kernel/Driver issue triggered on updating the motherboard's realtime clock. I do not think, the hardware itself is brocken because the RTC is successfully read on boot and the clock is running in Bios.

After all i am lucky its a bug easy to avoid once known...

 *PaulBredbury wrote:*   

> Chrony.

 

I will stick to Chrony. It does not helped to work around the bug. But i like it for its configurability and good documentation. If next kernel update does not fix the issue, i will try to remove RTC support from the kernel to easily "fix" the issue.

----------

## nishant1234

Please provide me the links of this plugin

----------

## Allan Wegan

Now, it all starts to make sense - at least a little bit. After another kernel panic on interrupting a ping with ctrl-c, I confirmed that hwclock -r and hwclock -w work without panic.

There is not so much left to blame now - next in list is the NIC driver. Strange issue though, as i do run software causing massive traffic and a lot of connections 24/7 using that NIC without panics. It was the first use of ping on the new hardware / kernel.

The NIC is an Intel 82579V (rev. 4, driver: e1000e) onboard of an Intel DH77EB.

----------

## hcaulfield57

You could try OpenNTPD, although as far as I am aware, Linux development has stopped.

----------

## Allan Wegan

Happy new kernel!

The kernel panic has gone away after updating to 3.7.0-hardened. Now Chrony and ping run fine and stopping/interrupting them does not cause kernel panics anymore.

----------

