Wolfgang Dumhs wrote:
> Alan Robertson wrote:
>>
>> OK.
>>
>> There are several places in the code where we use times(2).  I've taken
>> your ideas and created a new patch for the 2.x CVS(HEAD) branch which I
>> think covers them all.
>>
>> I've attached it here.
>>
>> Wolfgang:  Could you test this and see if it works during wraparound?
>>
>> It's not quite the same as yours, but avoids casting -1 to an unsigned.
>>  I think the effect should be the same.
>>
>> Please let me/us all know.
>>
> Hi,
> 
> I have now testet the patch on my test systems (SuSE Linux 9.1 / Kernel
> 2.6.5 / glibc 2.3.3 and SuSE Linux 9.3 / Kernel 2.6.13 / glibc 2.3.4)
> and it works like expectet: no problems during wrap of times(2), but
> some nice messages "time_longclock: clock_t wrapped around (uptime)".

Hi Wolfgang,

MANY thanks for testing this for me.  Setting up to test it like you did
is a real pain (as you know), so your willingness to test it for me
(having already gone through the pain to create the test environment) is
much appreciated.

We have had a heck of a time dealing with this particular issue (correct
handling of wraparound) over the years.  The message you observed about
wraparound was put in to help diagnose some of these weird things which
have happened.  We have tried and tried to get this right (really, we
did), but it has been a pretty stubborn problem.  I think with your
suggestion, we may have _finally_ gotten it right.  Obviously the two
regions to test are those where we pass through 2^31 (wrapping around to
negative values) and 2^32 (wrapping back around to zero).

Many thanks also to Lars for pursuing the glibc/kernel bug that's the
real root cause.

> The only thing I had to change to be able to compile was line 79 in
> lib/stonith/expect.c from
> int             save_errno;
> to
> int             save_errno = errno;

OOPS!!  I fixed that in one place but missed it in the other.

FYI: In CVS I also made it possible to turn on or off this particular
workaround using --disable-times-kludge and --enable-times-kludge
configure flags.

        Thanks again for your excellent report and testing!

-- 
    Alan Robertson <[EMAIL PROTECTED]>

"Openness is the foundation and preservative of friendship...  Let me
claim from you at all times your undisguised opinions." - William
Wilberforce
_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

Reply via email to