[chrony-dev] Chrony stuck in an endless loop |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-dev Archives
]
- To: <chrony-dev@xxxxxxxxxxxxxxxxxxxx>
- Subject: [chrony-dev] Chrony stuck in an endless loop
- From: "Hattink, Tjalling [FINT]" <T.Hattink@xxxxxxxx>
- Date: Mon, 12 Nov 2012 13:44:58 +0100
- Thread-index: Ac3A04ZZnGEw5nq/SDW3/+A0NR+IvA==
- Thread-topic: Chrony stuck in an endless loop
Hi,
Recently I've encountered a lockup of chrony on one of our embedded
boards running Linux. It was consuming all CPU resources and not acting
on any inputs anymore. I was able to attach a gdb debugger to the
process with symbols, so I could see the callstack and where it was
stuck.
The version I was using is 1.24. And it got stuck in the file regress.c,
line 570 to 578. The while loop there never exited. I also checked the
latest regress.c version in git, and I see the same loop at line 600 to
608, so I suspect the latest chrony is still affected by this issue.
The reason for getting stuck was that the blo and bhi variables never
changed. They both contained the same value -1.9333333333334166e-06. The
incr variable contained the value 9.061309612524684e-25. The reason why
blo and bhi didn't change was that incr is so small that it is
insignificant when added/substracted to blo and bhi.
After I changed the incr value to a much bigger number 1.0e-15 using gdb
the loop exited and chrony was working properly again.
The solution is to make sure incr contains a significant value before
going into the loop 570-578. Although I can't think of a good trick yet
to achieve this.
What are your thoughts about this? How should we fix this?
With best regards,
Tjalling Hattink
--
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.