[Klone-users] klone hangs up

diakat 2000 diakat2000 at googlemail.com
Fri Jul 25 08:20:10 EDT 2008


Many thanks!!!

That solves the problem!

Bye!

2008/7/17 Stefano Barbato <barbato at koanlogic.com>:
> Hi,
>
> KLone does not send such signal but the system will return EINTR if your
> read/write requests got interrupted somehow (for example SIGALRM timeouts
> that klone uses).
>
> What you should do is re-call the read/write function when they fail and
> errno is EINTR:
>
> --------------------
> retry:
>        n = write(fd, buf, size);
>        if(n < 0 && errno == EINTR)
>                goto retry;
> --------------------
>
> From within KLone you could just use libu (out utility library that ships
> with klone) wrappers that gracefully handle EINTRs:
> - u_read
> - u_write
> - u_accept
> - u_sleep
>
> bye!
>
> s
>
>
>
> On 16/lug/08, at 18:06, diakat 2000 wrote:
>
>> Hi Stefano,
>>
>> I think that there are mixed different problems.
>> Yes, in one case we had some empty C strings. This is resolved now.
>>
>> The other problem is the TCP/IP connection. After some testing and
>> error handling now klone does not crash anymore.
>> But I get EINTR (The receive was interrupted by delivery of a signal
>> before any data were available.) sometimes I request data from the
>> other program.
>> Does klone send such signals?
>>
>> Many thanks!
>>
>>
>>
>>
>> 2008/7/16 Stefano Barbato <barbato at koanlogic.com>:
>>>
>>> Hi,
>>>
>>> I wasn't able to reproduce the problem; I created a new page (see below)
>>> for
>>> testing that does nothing except calling sleep() and KLone keep it run
>>> the
>>> script until I explicitly killed it after a few hours (actually I forgot
>>> about it :) ).
>>>
>>>
>>> ----[ hang.kl1 ]---
>>> <%!
>>> #include <unistd.h>
>>> %><%
>>> for(;;)
>>>      sleep(1);
>>> %>
>>> -------------------
>>>
>>>
>>> The behavior you wrote about could be seen, for example, if klone crashed
>>> because of an error in getSomeData* functions. Do they always return
>>> valid C
>>> strings? did you try to run the daemon under gdb?
>>>
>>> bye,
>>> s
>>>
>>>
>>>
>>> On 15/lug/08, at 18:15, diakat 2000 wrote:
>>>
>>>> Hello,
>>>>
>>>> Many thanks for your speedy help!
>>>>
>>>> I use klone with iterative model.
>>>> There are shown data on my web pages, which are coming per TCP/IP from
>>>> another program, e.g.:
>>>>
>>>> io_printf(out, myCommunicator->getSomeDataFromSocket());
>>>> io_printf(out, myCommunicator->getSomeMoreDataFromSocket());
>>>>
>>>> At moment this communication is done per blocked functions send() and
>>>> recieve.
>>>>
>>>> The problem:
>>>> If It takes some seconds, until the data from the sockets returned to
>>>> klone web page, the page reproduction stops.
>>>> After a refresh of the page the klone-server is no longer available
>>>> and klone must be restarted.
>>>>
>>>> Are there some timeouts, which have to been considered? Why klone hangs
>>>> up?
>>>>
>>>>
>>>> Regards,
>>>>
>>>> _______________________________________________
>>>> Klone-users mailing list
>>>> Klone-users at koanlogic.com
>>>> http://koanlogic.com/cgi-bin/mailman/listinfo/klone-users
>>>>
>>>
>>>
>>> _______________________________________________
>>> Klone-users mailing list
>>> Klone-users at koanlogic.com
>>> http://koanlogic.com/cgi-bin/mailman/listinfo/klone-users
>>>
>>
>> _______________________________________________
>> Klone-users mailing list
>> Klone-users at koanlogic.com
>> http://koanlogic.com/cgi-bin/mailman/listinfo/klone-users
>>
>
>
> _______________________________________________
> Klone-users mailing list
> Klone-users at koanlogic.com
> http://koanlogic.com/cgi-bin/mailman/listinfo/klone-users
>




More information about the klone-users mailing list