Socket>>#waitForDataFor:ifClosed:ifTimedOut: large delay hangs
process
Keith Hodges
keith_hodges at yahoo.co.uk
Mon Jan 14 17:21:01 UTC 2008
Tom Phoenix wrote:
> On Jan 14, 2008 7:55 AM, <squeakdev1 at reider.net> wrote:
>
>
>> On rare occasions I've seen
>> Socket>>#waitForDataFor:ifClosed:ifTimedOut: (3.9 svp 7/27/2003 00:16)
>> pass a very large duration to readSemaphore waitTimeoutMSecs:. Large
>> enough to either hang the process for days, or cause Delay to complain
>> that delays cant exceed ~6 days. (when the duration should have been a
>> max of 300 seconds).
>>
>> Is it possible that there is a problem in this code when the
>> millisecondClockValue is reset or rolls over?
>>
>
> It certainly smells like that, doesn't it? The code in
> Socket>>#waitFor... doesn't show any awareness that the millisecond
> clock can roll over. If the deadline falls just after a rollover, then
> once the clock went back to zero, that method would ask for a delay
> that lasts until after the *next* rollover. I think you've nailed it.
>
> You should file a bug report for this on Mantis, if there isn't one already.
>
> http://bugs.squeak.org
>
> Cheers!
>
> --Tom Phoenix
In 3.10 there is a timeout calculating function which does take roll
over into account.
Keith
More information about the Squeak-dev
mailing list
|