From owner-freebsd-net Wed Aug 28 11:15: 7 2002 Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C4C6437B400 for ; Wed, 28 Aug 2002 11:15:04 -0700 (PDT) Received: from InterJet.dellroad.org (adsl-63-194-81-26.dsl.snfc21.pacbell.net [63.194.81.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id 44B9443E7B for ; Wed, 28 Aug 2002 11:15:04 -0700 (PDT) (envelope-from archie@dellroad.org) Received: from arch20m.dellroad.org (arch20m.dellroad.org [10.1.1.20]) by InterJet.dellroad.org (8.9.1a/8.9.1) with ESMTP id LAA51501; Wed, 28 Aug 2002 11:08:32 -0700 (PDT) Received: (from archie@localhost) by arch20m.dellroad.org (8.11.6/8.11.6) id g7SI7Qg44023; Wed, 28 Aug 2002 11:07:26 -0700 (PDT) (envelope-from archie) From: Archie Cobbs Message-Id: <200208281807.g7SI7Qg44023@arch20m.dellroad.org> Subject: Fix for bug in accept() on non-blocking socket To: freebsd-net@freebsd.org Date: Wed, 28 Aug 2002 11:07:26 -0700 (PDT) Cc: eischen@pcnet1.pcnet.com X-Mailer: ELM [version 2.4ME+ PL88 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hello -net, Would anyone interested please review the patch to uipc_syscalls.c contained in bin/42100 ? http://www.freebsd.org/cgi/query-pr.cgi?pr=42100 The problem relates to the behavior of accept() when called on a socket that has been shutdown(2) for reading. Normally, this causes ECONNABORTED to be returned. However, if the socket is marked non-blocking (O_NONBLOCK), then EAGAIN is returned. This of course is the return value that means 'no data available; try again' for a non-blocking socket. Not a good choice :-) This patch fixes things so ECONNABORTED is returned in the non-blocking case as well. Also: I remember someone complaining that the pthread(3) version of Apache does not work on FreeBSD because some thread ends up spinning and eating 100% CPU. This bug could possibly be related to that problem. Might be worth a try... Thanks, -Archie __________________________________________________________________________ Archie Cobbs * Packet Design * http://www.packetdesign.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message