From owner-freebsd-bugs@FreeBSD.ORG Fri Apr 25 21:40:02 2008 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 338A21065676 for ; Fri, 25 Apr 2008 21:40:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 15F1A8FC29 for ; Fri, 25 Apr 2008 21:40:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m3PLe1p5091386 for ; Fri, 25 Apr 2008 21:40:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m3PLe1qb091385; Fri, 25 Apr 2008 21:40:01 GMT (envelope-from gnats) Resent-Date: Fri, 25 Apr 2008 21:40:01 GMT Resent-Message-Id: <200804252140.m3PLe1qb091385@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Henrik Nordstrom Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D46D2106566B for ; Fri, 25 Apr 2008 21:35:23 +0000 (UTC) (envelope-from hno@squid-cache.org) Received: from squid-cache.org (squid-cache.org [12.160.37.9]) by mx1.freebsd.org (Postfix) with ESMTP id D467C8FC0A for ; Fri, 25 Apr 2008 21:35:18 +0000 (UTC) (envelope-from hno@squid-cache.org) Received: from squid-cache.org (localhost [127.0.0.1]) by squid-cache.org (8.14.2/8.14.0) with ESMTP id m3PLHrdl086353 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Fri, 25 Apr 2008 15:17:53 -0600 (MDT) (envelope-from hno@squid-cache.org) Received: (from hno@localhost) by squid-cache.org (8.14.2/8.14.2/Submit) id m3PLHr7J086352; Fri, 25 Apr 2008 15:17:53 -0600 (MDT) (envelope-from hno) Message-Id: <200804252117.m3PLHr7J086352@squid-cache.org> Date: Fri, 25 Apr 2008 15:17:53 -0600 (MDT) From: Henrik Nordstrom To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: kern/123095: Suspected sendfile data corruption X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Apr 2008 21:40:02 -0000 >Number: 123095 >Category: kern >Synopsis: Suspected sendfile data corruption >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Apr 25 21:40:01 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Henrik Nordstrom >Release: FreeBSD 6.3-STABLE i386 >Organization: Squid HTTP Proxy project >Environment: System: FreeBSD squid-cache.org 6.3-STABLE FreeBSD 6.3-STABLE #0: Tue Apr 8 10:08:24 MDT 2008 root@squid-cache.org:/usr/obj/usr/src/sys/SQUID-CACHE i386 >Description: We suspect sendfile is corrupting files on the server We have a bzr repository served read-only using Apache, and on certain bzr accesses the repository files gets currupted with parts of the HTTP headers send by Apache. Apache do NOT have write permission to these files, and neither size or modification date gets changed when this corruption occurs. bzr uses a lot of ranged GET requests, which by Apache gets translated to sendfile() with a header and a range of the requested file. Do not yet know if the corruption permanent on disk, or in memory only. >How-To-Repeat: Not yet sure how to repeat it outside our server. But the repository data (both clean and corrputed) and Apache configuration details can be provided on request. It shows up on the server when trying to get a checkout of the Squid source tree from the server using bzr bzr co --lightweght http://www.squid-cache.org/bzr/squid3/trunk runs for a while, then bzr complains about an invalid record '\r' and the files have been corrupted on the server. >Fix: >Release-Note: >Audit-Trail: >Unformatted: