From owner-freebsd-net@FreeBSD.ORG Thu Jul 8 08:03:22 2010 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16A4E1065670 for ; Thu, 8 Jul 2010 08:03:22 +0000 (UTC) (envelope-from john@traktor.dnepro.net) Received: from traktor.dnepro.net (roof1.dnepro.net [212.3.111.66]) by mx1.freebsd.org (Postfix) with ESMTP id 959698FC15 for ; Thu, 8 Jul 2010 08:03:20 +0000 (UTC) Received: from traktor.dnepro.net (localhost [127.0.0.1]) by traktor.dnepro.net (8.14.3/8.14.3) with ESMTP id o6883I8D068900 for ; Thu, 8 Jul 2010 11:03:19 +0300 (EEST) (envelope-from john@traktor.dnepro.net) Received: (from john@localhost) by traktor.dnepro.net (8.14.3/8.14.3/Submit) id o6883Isp068899 for freebsd-net@freebsd.org; Thu, 8 Jul 2010 11:03:18 +0300 (EEST) (envelope-from john) Date: Thu, 8 Jul 2010 11:03:18 +0300 From: Eugene Perevyazko To: freebsd-net@freebsd.org Message-ID: <20100708080318.GA12687@traktor.dnepro.net> Mail-Followup-To: freebsd-net@freebsd.org References: <7C3D15DD6E8F464998CA1470D8A322F302BB9F72@ES02CO.wgti.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7C3D15DD6E8F464998CA1470D8A322F302BB9F72@ES02CO.wgti.net> User-Agent: Mutt/1.4.2.3i Subject: Re: kern/123095 kern/131602 sendfile X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jul 2010 08:03:22 -0000 On Wed, Jul 07, 2010 at 10:24:41AM -0700, Ming Fu wrote: > Hi, > > > I was trying to use sendfile and hit with problem very similar to the > 123095 and 131602. > It seems that when the file is large enough (in megs), the file can be > corrupted even if it is open read-only and exist on disk as read-only > file, though the filesystem is mounted read-write. > [skipped] > > I run this on 8.0-RELEASE. The same happens on 7.2 and 6.3. The disk are > SATA ide. I run all these command under unprivileged user account. I > also run the same program on several different hardware, the result is > the same. Although the corrupted file is not the same. The corruption > looks random to me. > I have this problem on 7.2-S for pretty long time. But as I sendfile() very small file (several hundred bytes) from flash I was blaming faulty flash stick. I've even made a crontab entry to replace corrupted file. So the problem seems to be probabilistic, depending on amount of transferred data. -- Eugene Perevyazko