Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 10342 - chronyd has timing problem with kernel 2.4.19-crypto-r7
Summary: chronyd has timing problem with kernel 2.4.19-crypto-r7
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: Highest major (vote)
Assignee: Brandon Low (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-11-06 15:03 UTC by Sascha Wuestemann
Modified: 2003-02-04 19:42 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sascha Wuestemann 2002-11-06 15:03:38 UTC
Hi all,

I have used the chrony-v1.18 package, which is a server/client-based 
systemtime-adjusting tool with kernel linux-2.4.19-xfs-r1 with gentoo and maybe 
prior versions with kernels 2.2.18 and 2.2.19 at slackware 7.0 in the past with 
no problems.

currently I am working on getting freeswan getting work, so I have got after 
emerge rsync the new linux-2.4.19-crypto-r7 which I have compiled fine.

But chronyd has a timing problems, now. let's have a look at syslog:
---schnipp---
Nov  6 20:59:23 killerghost chronyd[6105]: chronyd version V1_18 starting
Nov  6 20:59:23 killerghost chronyd[6105]: Linux kernel major=2 minor=4 
patch=19
Nov  6 20:59:23 killerghost chronyd[6105]: Unexpected condition [adjtimex 
failed for set_frequency] at sys_linux.c:442, core dumped
---schnapp---

I tried to solve the problem by looking at http://chrony.sunsite.dk/ if this 
problem is known, and it is. It is mentioned at 
http://chrony.sunsite.dk/faq.php#question_7.1 with the following text:
---schnipp---
7.1. chronyd crashes after a syslog message "adjtimex failed for set frequency"

The usual cause is that the kernel is running with a different value of 'HZ'
(the timer interrupt rate) than the value that was found in the kernel header
files when chrony was compiled.  The chrony.conf file can include options to
modify the HZ value (see the discussion of linux_hz and linux_freq_scale in the
documentation), however the problem is to find the value of HZ being used.

At the end of the chrony v1.18 section of the download page
you'll find instructions on how to do this.
---schnapp---

so I tried, what is discribed at http://chrony.sunsite.dk/download.php
I patched, compiled, executed the new binary with "./chronyd -f 
/etc/chrony/chrony.conf" at my local compile directory and this is what sylog 
said:
---schnipp---
Nov  6 21:30:04 killerghost chronyd[7368]: chronyd version V1_18 starting
Nov  6 21:30:04 killerghost chronyd[7368]: Initial txc.tick=1000 txc.freq=0 
(0.00000000) txc.offset=0 hz=100 shift_hz=7
Nov  6 21:30:04 killerghost chronyd[7368]: Linux kernel major=2 minor=4 
patch=19
Nov  6 21:30:04 killerghost chronyd[7368]: calculated_freq_scale=0.99902439 
freq_scale=0.99902439
Nov  6 21:30:04 killerghost chronyd[7368]: Unexpected condition [adjtimex 
failed for set_frequency, freq_ppm=7.8130e+01 scaled_freq=-2.1848
e+01 required_tick=10001] at sys_linux.c:445, core dumped
---schnapp---

I calculated the txc.tick value like described, added the two new lines as 
described, executed above mentioned line agein. syslog claimes this:
---schnipp---
Nov  6 21:34:44 killerghost chronyd[7415]: chronyd version V1_18 starting
Nov  6 21:34:44 killerghost chronyd[7415]: Could not parse linux_hz directive 
at line 9
Nov  6 21:34:44 killerghost chronyd[7415]: Could not parse linux_freq_scale 
directive at line 10
Nov  6 21:34:44 killerghost chronyd[7415]: Linux kernel major=2 minor=4 
patch=19
Nov  6 21:34:44 killerghost chronyd[7415]: Unexpected condition [adjtimex 
failed for set_frequency] at sys_linux.c:442, core dumped
Nov  6 21:35:28 killerghost chronyd[7438]: chronyd version V1_18 starting
Nov  6 21:35:28 killerghost chronyd[7438]: Could not parse linux_hz directive 
at line 9
Nov  6 21:35:28 killerghost chronyd[7438]: Could not parse linux_freq_scale 
directive at line 10
Nov  6 21:35:28 killerghost chronyd[7438]: Initial txc.tick=1000 txc.freq=0 
(0.00000000) txc.offset=0 hz=100 shift_hz=7
Nov  6 21:35:28 killerghost chronyd[7438]: Linux kernel major=2 minor=4 
patch=19
Nov  6 21:35:28 killerghost chronyd[7438]: calculated_freq_scale=0.99902439 
freq_scale=0.99902439
Nov  6 21:35:28 killerghost chronyd[7438]: Unexpected condition [adjtimex 
failed for set_frequency, freq_ppm=7.8130e+01 scaled_freq=-2.1848
e+01 required_tick=10001] at sys_linux.c:445, core dumped
---schnapp---

the kernel compile settings for linux-2.4.19-crypto-r7 are the same like them 
of linux-2.4.19-xfs-r1, except for the new addiditional settings like crypto. I 
have no grsecurity settings.

I hope that I have given enough information. I am totally lost to solve this on 
my own, because I am no c-programmer.

so, in the hope of help, I am posting this to work on. Please feel free to ask 
any question to help you with your work.

greetings,
Sascha
Comment 1 Sascha Wuestemann 2002-11-06 15:28:40 UTC
oops, after posting this, I have found bug nr 4233 (should have used chrony and 
not chronyd like I did before posting).

Also I have found, that I am using "=" which should be " " at the two new 
lines.

chrony starts fine, now. I will watch time and repost, if it goes wrong.

cu
Sascha
Comment 2 Brandon Low (RETIRED) gentoo-dev 2002-11-06 15:57:45 UTC
please use gentoo-sources-2.4.19-r9 or 2.4.19-r10 both have the freeswan 
patches, when using these with HZ dependant whatzits, it is important to have 
HZ set to 100 in the kernel.  The next version of the gentoo kernel however 
will have a new HZ patch which allows the kernel to use any HZ value it wants 
to and userland will still see 100.  Reopen if this discussion doesn't solve.
Comment 3 Sascha Wuestemann 2002-11-06 16:49:54 UTC
as I use XFS as filesystem I can't use gentoo-sources-2.4.19-r9 and an emerge 
-s gentoo-sources gives this as hit.
so I can't follow your advice.

greetings,
Sascha