Re: [chrony-dev] PPS reference clock rejected because of high dispersion

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-dev Archives ]


On Tue, May 13, 2014 at 02:17:05PM +0200, Hattink, Tjalling [FINT] wrote:
> The problem is that the PPS reference clock is rejected after 32 seconds
> and the system falls back to the shared memory reference clock. It never
> recovered from this state. I found this problem after 3 days. I gathered
> the following extra information:

> I also attached a debugger to the chrony process to find out more. I saw
> that in refclock.c:423 (RCL_AddPulse) the if statement fails and returns
> 0 because the dispersion value is more than 11 seconds. This value came
> from the function call filter_get_avg_sample_dispersion in
> refclock.c:386

> My first question is, how is it possible that this value became so big?
> Is it caused by a delayed zda message used for disciplining the SPMC
> refclock? Or could this be a bug in the median_filter?

I'm not sure, I'd guess some SHM samples were bad and the PPS samples
were aligned to incorrect seconds, which resulted in the large
dispersion.

Can you please enable the refclocks log so we can the individual SHM
and PPS samples?

> And how can we prevent/resolve this situation? Shouldn't the median
> filter be reset/cleared when it gets into a situation like this? I see
> that filter_reset is called in refclock.c:450, which is used when the
> PPS is not specifically locked to another clock, so should it be called
> at refclock.c:424 as well?

Possibly.

> And looking at filter_reset, it doesn't clear the avg_var and avg_var_n
> values. Shouldn't those be cleared here?

The avg_var is a long-term statistic that needs to be preserved,
filter_reset prepares the filter for the next batch of samples, but we
can rename it to filter_clean and filter_reset would reset also the
the variance stat. 

Thanks,

-- 
Miroslav Lichvar

-- 
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/