[Linux-ha-dev] 2.0.8 bug in handling of clock wrap in longclock.c
t.d.lee at durham.ac.uk
Tue Jun 19 02:57:08 MDT 2007
On Mon, 18 Jun 2007, Lars Marowsky-Bree wrote:
> On 2007-06-18T14:54:42, David Lee <t.d.lee at durham.ac.uk> wrote:
> > [...]
> > Perhaps "time_longclock()" should become truly read-only. If some sort of
> > data-change is required by a subset of its callers, then perhaps a
> > parallel function (or a flag to the same function) should be designed, for
> > use specifically by that subset of its current callers which really do
> > need to effect some sort of change.
> It _is_ required, for essentially all callers - wrapping of the
> longclock type must be handled, and for that, cl_longclock must keep
> (and modify) state.
> cl_log() also shouldn't have any side effects, in an ideal world -
> cl_longclock shouldn't have to expect to be recursively called, no? To
> the callers, it must look like neither one of them does. However, we're
> deep within interdependent core code here, and while we can present
> that impression to external callers, internally we have further
> considerations to take into account.
> I think the fix we're looking at is actually pretty close to the best
> one, short of removing the cl_log() message there completely. (Who cares
> about the wrap? ;-)
> Introducing a special set of APIs is not going to be any less pleasant,
> because then we have to track which API to call. We've had similar
> issues with cl_log being called within the IPC socket code.
OK. Fair enough. I just wanted to make sure that, while our minds were
on this task, we were exploring around it, in order to ensure the best
practical fix... not only for the present issue but to clarify
understandings and expectations, and to try to avoid and prevent future
related issues from arising.
But might I suggest that someone (Lars?) adds a brief comment to
"lib/clplumbing/longclock.c" at the start of "time_longclock()"?
* Purpose: to obtain ...
* Side effects: updates ... because ...
Thanks again. Best wishes.
: David Lee I.T. Service :
: Senior Systems Programmer Computer Centre :
: UNIX Team Leader Durham University :
: South Road :
: http://www.dur.ac.uk/t.d.lee/ Durham DH1 3LE :
: Phone: +44 191 334 2752 U.K. :
More information about the Linux-HA-Dev