[Pharo-project] Issue 3986 in pharo: Bug with Delay during clock rollover

pharo at googlecode.com pharo at googlecode.com
Mon Apr 11 11:26:37 CEST 2011


Status: FixProposed
Owner: gazzagu... at googlemail.com
CC: adrian.l... at gmail.com,  marcus.d... at gmail.com
Labels: Type-ReportDefect

New issue 3986 by gazzagu... at googlemail.com: Bug with Delay during clock  
rollover
http://code.google.com/p/pharo/issues/detail?id=3986

I have identified a bug with Delays that are scheduled close to the  
millisecond clock rollover that can occur when other delays expire around  
the same time.

The issue appears to be that when scheduling a delay, the resumption time  
gets set and, before the AccessProtect critical block can be entered, the  
TimingSemaphore gets signalled, causing the timer process to handle an  
expired delay.

If the clock rolls over before the resumption of the process that was  
scheduling the original delay, that delay gets scheduled with the  
resumption time that was determined prior to the clock rollover, hence a  
delay of around 6 days.

A fix is proposed in the attached change set, tested empirically during a  
rollover with the result of no "rogue" delays - not conclusive but in our  
production code it appears the problem is resolved.

Regards, Gary






More information about the Pharo-project mailing list