From owner-freebsd-current@FreeBSD.ORG Wed Nov 12 11:18:21 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 041D416A4CF for ; Wed, 12 Nov 2003 11:18:21 -0800 (PST) Received: from tensor.xs4all.nl (tensor.xs4all.nl [194.109.160.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id A49D843F3F for ; Wed, 12 Nov 2003 11:18:19 -0800 (PST) (envelope-from dimitry@andric.com) Received: from kilgore.dim (kilgore.dim [192.168.0.3]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by tensor.xs4all.nl (Postfix) with ESMTP id 5A57B22845; Wed, 12 Nov 2003 20:18:17 +0100 (CET) Date: Wed, 12 Nov 2003 20:18:05 +0100 From: Dimitry Andric X-Mailer: The Bat! (v2.01.26) Business X-Priority: 3 (Normal) Message-ID: <5342692438.20031112201805@andric.com> To: Wiktor Niesiobedzki In-Reply-To: <20031111143115.GB231@mail.evip.pl> References: <20031111143115.GB231@mail.evip.pl> MIME-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="pgp-sha1"; boundary="----------A31B53A2E7CC484" cc: current@freebsd.org Subject: Re: munmap & cp X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2003 19:18:21 -0000 ------------A31B53A2E7CC484 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit On 2003-11-11 at 15:31:15 Wiktor Niesiobedzki wrote: > $ mkdir foo > $ cd foo > $ touch foo > $ cp foo foo2 > cp: foo: Invalid argument Yes, I've just run into this problem too, because a large number of ports failed to install because of it. This is because they cp -r a number of directories to be installed, and these obviously contain 0 byte files... :( Since the cp source doesn't seem to have been touched for 4 months, it turns out that the semantics of the munmap call changed suddenly, due to "Open Group Base Specifications Issue 6", see: http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/vm/vm_map.c I wonder why mmap of 0 bytes is allowed to succeed, and munmap of the same amount is not, but then again, it's obviously following a standard, which doesn't have to abide to any rules of logic. ;) Anyway, cp (and possibly other tools which use munmap) will need to be fixed. For now, I simply disabled the VM_AND_BUFFER_CACHE_SYNCHRONIZED flag in the Makefile for cp, which simply disables the whole mmap'ing stuff. I don't notice any difference without it... ------------A31B53A2E7CC484 Content-Type: application/pgp-signature -----BEGIN PGP MESSAGE----- Version: GnuPG v1.2.3 (MingW32) iD8DBQE/sodtsF6jCi4glqMRAm46AJsEAspVUxjvTx2/v1WdbWyDYF0WAgCdGmeF 7IkmYMLHkZe3ihaqUcw4Zps= =5mbV -----END PGP MESSAGE----- ------------A31B53A2E7CC484--