Re: [chrony-dev] Chrony stuck in an endless loop

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


On Tue, Nov 13, 2012 at 10:07:48AM +0100, Hattink, Tjalling [FINT] wrote:
> Our boards have an rtc and it is disciplined by chrony. I think your
> proposal should solve the issue. The function
> RGR_FindBestRobustRegression is only called on 2 places, and the
> tolerance (tol) value given in both function calls is high enough to
> keep things significant.

The change proposed by Bill definitely makes sense, but I'd like to
make sure it doesn't hang even with bad data. I was able to reproduce
the problem with samples generated on a very large slope, so I've
added a check that incr is always significant to both blo and bhi.

I did more testing with random samples and two other bugs showed up:
- abort on the assert in the bisecting loop, it happens when one of
  rlo, rhi happens to be root, my fix is to change the expanding loop
  so the root is in (rlo, rhi) inverval instead of [rlo, rhi] and the
  assert is avoided. I think it happens so rarely that it doesn't
  deserve special handling.
- hang in the bisecting loop when 0.5 * (blo + bhi) == blo 

Please see the latest commit in git, I think it should fix all three
issues.

Thanks for the report and analysis.

-- 
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/