kern/123095: Suspected sendfile data corruption

Henrik Nordstrom hno at squid-cache.org
Fri Apr 25 21:40:02 UTC 2008


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


More information about the freebsd-bugs mailing list