On Sat, Dec 25, 2010 at 12:20 PM, Igor Stasenko <siguctua@gmail.com> wrote:

On 25 December 2010 16:56, Mariano Martinez Peck <marianopeck@gmail.com> wrote:
>
> Hi everybody. I hope you are enjoying a wonderful and happy Christmas.
>
> Yesterday something weird happened with my cog vm. This assert was failing:
>
> "newUtcMicrosecondClock >= utcMicrosecondClock 127"
>
> a lot of times...
>
> I checked and this is line 127 of sqUnixHeartbeat.c. I am in a MacOS vm, but it seems that file is used anyway.
>
> Now...I have no idea why this assert was failing, nor its severity. What does it mean? there is something wrong?  where can I take a look?
>

if microseconds clock counter is 32-bit, then it wraps over time to time.
VM should be aware that this may happen and should take appropriate
measures (like adjusting the wait timeouts etc).

The microsecond clock is 64-bit to avoid precisely the possibility of the clock wrapping within anything other than wildly optimistic predictions of the possible life of Smalltalk.


> It seems it is not easy to reproduce :(
>
yeah, you should wait another
~ 2^32  / 1000000 seconds

By all means but you won't see it wrap.
 

> Thanks in advance,
>
> Mariano
>
>



--
Best regards,
Igor Stasenko AKA sig.