From owner-cvs-src@FreeBSD.ORG Sun Apr 27 18:40:17 2008 Return-Path: Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF3EC106564A; Sun, 27 Apr 2008 18:40:17 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id AD9A88FC15; Sun, 27 Apr 2008 18:40:17 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 1C2A846B14; Sun, 27 Apr 2008 14:40:17 -0400 (EDT) Date: Sun, 27 Apr 2008 19:40:16 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: John-Mark Gurney In-Reply-To: <20080427174951.GJ82555@funkthat.com> Message-ID: <20080427193737.K5282@fledge.watson.org> References: <200804271550.m3RFo0R6071940@repoman.freebsd.org> <20080427174951.GJ82555@funkthat.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern uipc_syscalls.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Apr 2008 18:40:18 -0000 On Sun, 27 Apr 2008, John-Mark Gurney wrote: > Robert Watson wrote this message on Sun, Apr 27, 2008 at 15:50 +0000: >> Note that the current fix isn't perfect, but better than >> panicking: normally we guarantee that simultaneous invocations >> of a system call to write on a stream socket won't be >> interlaced, which is ensured by use of the socket buffer sleep >> lock. This is guaranteed for the sendfile headers, but not >> trailers. In practice, this is likely not a problem, but >> should be fixed. > > Should this be mentioned in the BUGS section of the sendfile(2) man page? or > do you plan on fixing this in the near future? This bug has been present pretty much since inception, and I'm not convinced other OS's provide as strong protections against interlacing as we do (and certainly, application writers shouldn't rely on that protection if they are portable). I will likely look at fixing it at some point, but it will be in the queue behind quite a bit of other stuff. This particular bug became pressing today when I upgraded my 7.x web server and it keeled over within five minutes of booting (I run with INVARIANTS on my box). Robert N M Watson Computer Laboratory University of Cambridge