From owner-freebsd-questions@FreeBSD.ORG Mon Nov 21 21:53:10 2005 Return-Path: X-Original-To: questions@freebsd.org Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 39B4F16A420 for ; Mon, 21 Nov 2005 21:53:10 +0000 (GMT) (envelope-from mi+mx@aldan.algebra.com) Received: from vms040pub.verizon.net (vms040pub.verizon.net [206.46.252.40]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9FE8843D60 for ; Mon, 21 Nov 2005 21:52:58 +0000 (GMT) (envelope-from mi+mx@aldan.algebra.com) Received: from corbulon.video-collage.com ([151.204.231.237]) by vms040.mailsrvcs.net (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPA id <0IQB00M96RBZDX1C@vms040.mailsrvcs.net> for questions@freebsd.org; Mon, 21 Nov 2005 15:50:24 -0600 (CST) Received: from mteterin.us.murex.com (195-11.customer.cloud9.net [168.100.195.11]) by corbulon.video-collage.com (8.13.4/8.13.1) with ESMTP id jALLoH8a066290 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 21 Nov 2005 16:50:22 -0500 Received: from mteterin.us.murex.com (mteterin@localhost [127.0.0.1]) by mteterin.us.murex.com (8.13.4/8.13.4) with ESMTP id jALLoAoO097812 for ; Mon, 21 Nov 2005 16:50:10 -0500 Received: from localhost (localhost [[UNIX: localhost]]) by mteterin.us.murex.com (8.13.4/8.13.4/Submit) id jALLo8oU097811 for questions@freebsd.org; Mon, 21 Nov 2005 16:50:08 -0500 Date: Mon, 21 Nov 2005 16:50:08 -0500 From: Mikhail Teterin To: questions@freebsd.org Message-id: <200511211650.08260.mi+mx@aldan.algebra.com> Organization: Virtual Estates, Inc. MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit Content-disposition: inline X-Virus-Scanned: ClamAV devel-20050525/1181/Mon Nov 21 06:10:32 2005 on corbulon.video-collage.com X-Virus-Status: Clean X-Scanned-By: MIMEDefang 2.43 X-Authentication-warning: mteterin.us.murex.com: mteterin set sender to mi+mx@aldan.algebra.com using -f User-Agent: KMail/1.8.2 Cc: Subject: some files written via mmap end up corrupted X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2005 21:53:10 -0000 I must not be using the API properly :-( The writes to the mmap-ed area and then fsync-s the opened file, munmaps it, and exits. Sometimes, the files end up corrupted at the end, however -- in about 10% of cases. What am I doing wrong? Thanks! -mi