# Upgrade from 9.1 to 9.2 clock issue



## KernelPanic (Nov 1, 2013)

I just upgraded three nearly identical servers (Intel sr1500 chassis) from 9.1-RELEASE to 9.2-RELEASE using freebsd-update Since the upgrade, two of the three cannot keep time properly. Even with ntpd running.

Of the two having problems they list four clocks: 

```
Timecounter "i8254" frequency 1193182 Hz quality 0
Timecounter "HPET" frequency 14318180 Hz quality 950
Timecounter "ACPI-fast" frequency 3579545 Hz quality 900
Timecounter "TSC-low" frequency 1330029248 Hz quality 1000
```

FreeBSD 9.2 starts with "TSC-low" as it has the highest quality. I've tried using the other three manually via `sysctl kern.timecounter.hardware` but they all act the same.

The one running without any problems only lists three clocks:

```
Timecounter "i8254" frequency 1193182 Hz quality 0
Timecounter "ACPI-fast" frequency 3579545 Hz quality 900
Timecounter "TSC-low" frequency 1250071728 Hz quality 1000
```

The one running without any problems only has one quad-core processor the other two have dual quad-core processors.

I'm still troubleshooting this but aside from disabling ACPI clock (per the FAQ), and maybe pulling out a CPU core I'm running out of ideas fast.


----------



## grabes (Nov 2, 2013)

Same problem, I posted in the general forum.  Fortunately, I was able to switch to the HPET timer, and things are fixed.    Something is still off in 9.2,  but I have the right time for now.


----------



## KernelPanic (Nov 5, 2013)

As an update:
I reduced one of the malfunctioning servers to a single (quad core) processor yesterday so it would be more like the server that is operating normally. At the same time I reset the clock on the other ailing server. Since then, I haven't had any issues with clock drift on any server. 

The only think they're running that connects the three is inspircd, which runs as an unprivileged user.

Very strange.


----------



## KernelPanic (Nov 13, 2013)

The second Intel SR1500 chassis started having the same clock skew issue two days later. I pulled the second CPU from it and I have not had any issues since then.

Since these servers were running 9.0 and 9.1 without any problems for over a year, should I submit a PR about this?


----------



## KernelPanic (Nov 19, 2013)

Reducing the CPUs has not resolved the issue. It appears I'll have to downgrade back to FreeBSD 9.1


----------



## grabes (Nov 20, 2013)

Did you change kern.timecounter.hardware to 
	
	



```
kern.timecounter.hardware=LAPIC
```
 For me changing kern.timecounter.hardware did nothing.


----------



## KernelPanic (Nov 20, 2013)

There is a difference between kern.timecounter and kern.eventtimer on my affected systems. My current settings are:


```
kern.timecounter.choice: TSC-low(1000) ACPI-fast(900) HPET(950) i8254(0) dummy(-1000000)
kern.timecounter.hardware: TSC-low
kern.eventtimer.choice: HPET(450) HPET1(440) HPET2(440) LAPIC(400) i8254(100) RTC(0)
kern.eventtimer.timer: LAPIC
```

Since my issues have all been about clock skew, I've never considered tinkering with anything other than kern.timecounter. I don't know enough of the underpinnings of FreeBSD to know how the latter would affect the clock. I might as well give 
	
	



```
kern.eventtimer.timer=HPET
```
 a try since it has a higher quality rating that LAPIC.


----------

