[Vm-dev] Cog: invalid nanosleep argument (i.e. socket errors)

Igor Stasenko siguctua at gmail.com
Mon Aug 16 15:32:59 UTC 2010


On 16 August 2010 16:48, Lukas Renggli <renggli at gmail.com> wrote:
>
> Thank you! I can confirm that this solves the last remaining Seaside issue.
>
> I simulated some heavy parallel requests on a Cog-Seaside image and it
> doesn't crash anymore.
>

Lukas, could you share details how you simulating heavy load?
I know there are some tools on linux to flood server with HTTP
requests , but i never
used it myself.


> Lukas
>
> On 13 August 2010 21:20, Eliot Miranda <eliot.miranda at gmail.com> wrote:
>>
>> Thanks Henrik!!
>>
>> On Fri, Aug 13, 2010 at 7:38 AM, Henrik Johansen <henrik.s.johansen at veloxit.no> wrote:
>>>
>>>
>>> I think I figured out why Cog some times terminates when downloading large files on OSX;
>>> An oversleep which is interrupted can be returned as a t_time struct with tv_sec -1 and tv_nsec close to 999999999.
>>>
>>> The while check is
>>> nanosleep (&naptime, &naptime) == -1 && naptime.tv_sec > 0 1|| naptime.tv_nsec > MINSLEEPNS
>>>
>>> or so, so when an interrupt is encountered which has tv_sec = -1, you will get the invalid argument error.
>>>
>>> rewriting it to
>>> naptime.tvsec > -1 && naptime.tv_nsec > MINSLEEPNS && nanosleep(&naptime, &naptime) == -1
>>>
>>> I no longer had  crashes in 99% of hte cases when evaluating the following test:
>>>
>>> HTTPSocket httpGetDocument: 'http://www.squeaksource.com/Pharo/Morphic-stephane_ducasse.334.mcz'.
>>>
>>> I've attached the sqUnixHeartbeat.c.
>>>
>>> Cheers,
>>> Henry
>>>
>>>
>>
>>
>>
>
>
>
> --
> Lukas Renggli
> www.lukas-renggli.ch
>



-- 
Best regards,
Igor Stasenko AKA sig.


More information about the Vm-dev mailing list