From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25097 invoked by alias); 11 Jun 2007 21:48:47 -0000 Received: (qmail 25089 invoked by uid 22791); 11 Jun 2007 21:48:46 -0000 X-Spam-Check-By: sourceware.org Received: from sccrmhc14.comcast.net (HELO sccrmhc14.comcast.net) (204.127.200.84) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 11 Jun 2007 21:48:43 +0000 Received: from [192.168.1.200] (c-67-188-0-30.hsd1.ca.comcast.net[67.188.0.30]) by comcast.net (sccrmhc14) with ESMTP id <2007061121484101400dhoibe>; Mon, 11 Jun 2007 21:48:41 +0000 Message-ID: <466DD126.9020609@alum.mit.edu> Date: Mon, 11 Jun 2007 21:56:00 -0000 From: Tad Artis User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: ecos-discuss@sources.redhat.com Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: [ECOS] atHTTP hangs connections on select() errors X-SW-Source: 2007-06/txt/msg00109.txt.bz2 athttp often locks up resources and never frees them if select() returns an error. A robust implementation of athttp will want to change the main cyg_httpd_daemon listen() loop so that cyg_httpd_close_unused_sockets(listener); is called regardless of the return value from the listen() call. Otherwise, errors from listen() will prevent all connections (possibly causing the errors) from ever timing out and being shut down. The system will quickly run out of sockets, as all will be left in the ESTABLISHED state. Not theoretical, fairly easy to get listen() to return errors. Also see my post about athttp hanging in accept() when out of sockets if attempting a robust port. -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss