Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Apr 2008 15:17:53 -0600 (MDT)
From:      Henrik Nordstrom <hno@squid-cache.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   kern/123095: Suspected sendfile data corruption
Message-ID:  <200804252117.m3PLHr7J086352@squid-cache.org>
Resent-Message-ID: <200804252140.m3PLe1qb091385@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200804252117.m3PLHr7J086352>