WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: chronyd segfaults  (Read 5789 times)

Offline yonib

  • Newbie
  • *
  • Posts: 5
chronyd segfaults
« on: June 04, 2011, 09:01:01 AM »
Hi,
I'm trying to install chrony to maintain time on a really old machine that drifts.
I installed chrony.tcz.
when I
Code: [Select]
dmesgI get
Quote
chronyd[681]: segfault at xxx ip yyy sp zzz error 6 in libc-2.11.1.so

help :-)

Offline vitex

  • Full Member
  • ***
  • Posts: 113
Re: chronyd segfaults
« Reply #1 on: June 04, 2011, 01:09:45 PM »
I interpret the error message to mean that the exception occurred in the library libc to which chronyd was linked dynamically, so the fault may or may not be caused by chronyd.

Did your error occur during initialization of chrony or after it had run for a while?  What type of CPU does your machine have?  How much memory?  What version of TC are you using?  What other extensions are loaded?

If I execute MC on a kvm virtual machine
Code: [Select]
kvm -cdrom microcore_3.6.isoand boot using
Code: [Select]
microcore syslogand execute
Code: [Select]
tce-load -wi chrony
grep chronyd /var/log/messages
so chrony is the only extension loaded, I get
Quote
Jun  4 16:55:45 (none) daemon.info chronyd[528]: chronyd version 1.24 starting
Jun  4 16:55:46 (none) daemon.info chronyd[528]: Initial txc.tick=10000 txc.freq=0 (0.00000000) txc.offset=0 => hz=100 shift_hz=7
Jun  4 16:55:46 (none) daemon.info chronyd[528]: set_config_hz=0 hz=100 shift_hz=7 basic_freq_scale=1.28000000 nominal_tick=10000 slew_delta_tick=833 max_tick_bias=1000
Jun  4 16:55:46 (none) daemon.info chronyd[528]: Linux kernel major=2 minor=6 patch=33
Jun  4 16:55:46 (none) daemon.info chronyd[528]: calculated_freq_scale=1.00000000 freq_scale=1.00000000
Jun  4 16:55:46 (none) daemon.err chronyd[528]: Could not open IPv6 NTP socket : Address family not supported by protocol
Jun  4 16:55:46 (none) daemon.err chronyd[528]: Could not open IPv6 command socket : Address family not supported by protocol
Jun  4 16:55:46 (none) daemon.info chronyd[528]: System's initial offset : 0.841167 seconds slow of true (slew)
Jun  4 16:55:59 (none) daemon.info chronyd[528]: Selected source 72.26.125.125

which shows that chrony has been started successfully.

If you cannot get chrony to work, you can try ntpclient in a cron job.

Offline yonib

  • Newbie
  • *
  • Posts: 5
Re: chronyd segfaults
« Reply #2 on: June 04, 2011, 04:18:05 PM »
Thanks for the prompt reply.
I get twice
Quote
daemon.warn chronyd[823]: Could not send to 192.115.25.212 : Bad file descriptor
and then the next line is the segfault.

my system is 3.6 under Virtualbox...

re: ntpclient: how do i change the cron database (how do i make the change persistent?

regards,
yoni

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: chronyd segfaults
« Reply #3 on: June 04, 2011, 06:10:43 PM »
If you cannot get chrony to work, you can try ntpclient in a cron job.

Or rdate which is already shipped in base in a cron job.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline vitex

  • Full Member
  • ***
  • Posts: 113
Re: chronyd segfaults
« Reply #4 on: June 04, 2011, 08:04:55 PM »
Thanks for the prompt reply.
I get twice
Quote
daemon.warn chronyd[823]: Could not send to 192.115.25.212 : Bad file descriptor
and then the next line is the segfault.

my system is 3.6 under Virtualbox...

Does ntpclient work in your environment or do you get similar errors?

Quote
re: ntpclient: how do i change the cron database (how do i make the change persistent?

The crontab for root is /var/spool/cron/crontab/root.  You can build it by executing
Code: [Select]
crontab -e as root, and you can cause that file to be backed up by adding its path to /opt/.filetool.lst.  A crontab entry such as
Code: [Select]
*/5 * * * * ntpclient -h pool.ntp.org -s 1>>/tmp/ntpclient.txt 2>&1 would execute ntpclient every 5 minutes.  The 5th column of the output is the estimated difference in microseconds between the local clock and the NTP server.

Chrony is better suited for time keeping than ntpclient or rdate execute in a cron job since chrony will typically slew the clock to make adjustments instead of making abrupt changes.  Depending on your application, you might want to continue investigating why chrony is not working in your environment.

Offline yonib

  • Newbie
  • *
  • Posts: 5
Re: chronyd segfaults
« Reply #5 on: June 05, 2011, 05:40:47 AM »
Thanks again,
ntpclient works fine. however, crontab forgets the entry after boot.

yoni

Offline vitex

  • Full Member
  • ***
  • Posts: 113
Re: chronyd segfaults
« Reply #6 on: June 05, 2011, 08:53:08 AM »
ntpclient works fine. however, crontab forgets the entry after boot.

Search the wiki for "persistence" and "backup" to find out how to save /var/spool/cron/crontab/root across boots.

Offline yonib

  • Newbie
  • *
  • Posts: 5
Re: chronyd segfaults
« Reply #7 on: June 06, 2011, 12:53:44 AM »
Thanks for the replies.

I managed to use ntpclient with persistent cron. Of course the first ntpclient runs in bootlocal.sh, and then cron runs it every 5 minutes.

thanks !