# Clock skew detected for /etc/init.d

## audiodef

Every single time I boot up, I see an error about clock skew detected for /etc/init.d. Should I be concerned and should I fix this?

----------

## krinn

openrc does this:

* it store current time as t

* it then create deptree cache

* it then gets time from deptree_cache (s)

* if s < t then it detect clock trouble and create the clock-skewed file

But openrc < 0.35 have a bug in the step, it use stat on deptree to build s, without checking return value of stat, as such if stat fail, s will be garbage and the compare is hazardous.

What you can do:

* upgrade to 0.35+

* remove /lib/rc/clock-skewed file

* reboot

If your bios timing is good, it won't recreate it.

note that: the kernel is at work there too, a poor resolution timer and a quick hdd might result in s = t, use a good timer like hpet

----------

## khayyam

 *krinn wrote:*   

> What you can do:

 

krinn, audiodef, et al ... you can also run 'rc-update -u' to correct this:

 *man rc-update wrote:*   

> -u, --update   Forces an update of the dependency tree cache. This may be needed in the event of clock skew (a file in /etc is newer than the system clock).

 

best ... khay

----------

## krinn

tsssss, you're making it too simple, how could i reach NeddySeagoon's post count if you answer simply and people get it!

----------

## bunder

probably similar enough to https://forums.gentoo.org/viewtopic-t-1079192.html

----------

## audiodef

khay's trick worked - thanks. 

Neddy's post count should equal automatic bodhisattva status.   :Razz: 

----------

