[En-Nut-Discussion] Heave load will harm the system?

Harald Kipp harald.kipp at egnite.de
Wed Mar 1 19:07:10 CET 2006


Henrik,

Are you refering to the ShowSockets() CGI function?

This is possibly not a Nut/OS related problem but a bug in
the application. The CGI routine loops through the internal
socket list, interrupted by several fprintf(). During socket
output the thread might lose the CPU and the socket list
might look very different after woken up again.

I think this is also true for the thread and the timer list.
If I remember correctly, they had been initially enclosed in
a critical section, which of course is horrible. The correct
way would be to create a copy of the list first and then print
that one out.

Harald

At 23:47 01.03.2006 +1000, you wrote:
>Harald,
>
>I have a modded version of the httpserv.c example where I observe the 
>sockets end up in the CLOSEWAIT state after frequent connecting and 
>reconnecting (typically caused by repeatedly pressing ctrl-R in the 
>browser window for a few seconds). Once one manages to get all available 4 
>sockets into CLOSEDWAIT state, the system refuses all further connections 
>and never recovers.




More information about the En-Nut-Discussion mailing list