From owner-freebsd-bugs@FreeBSD.ORG Mon Oct 24 23:00:28 2005 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7EF4916A41F for ; Mon, 24 Oct 2005 23:00:28 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7038043D45 for ; Mon, 24 Oct 2005 23:00:27 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j9ON0RHC068268 for ; Mon, 24 Oct 2005 23:00:27 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j9ON0QnL068266; Mon, 24 Oct 2005 23:00:26 GMT (envelope-from gnats) Resent-Date: Mon, 24 Oct 2005 23:00:26 GMT Resent-Message-Id: <200510242300.j9ON0QnL068266@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Matthias Andree Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BDB1C16A420 for ; Mon, 24 Oct 2005 22:54:54 +0000 (GMT) (envelope-from matthias.andree@gmx.de) Received: from mail.dt.e-technik.uni-dortmund.de (krusty.dt.E-Technik.uni-dortmund.de [129.217.163.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2504643D79 for ; Mon, 24 Oct 2005 22:54:41 +0000 (GMT) (envelope-from matthias.andree@gmx.de) Received: from localhost (localhost [127.0.0.1]) by mail.dt.e-technik.uni-dortmund.de (Postfix) with ESMTP id 3A77944547; Tue, 25 Oct 2005 00:54:39 +0200 (CEST) Received: from mail.dt.e-technik.uni-dortmund.de ([127.0.0.1]) by localhost (krusty [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 31826-03; Tue, 25 Oct 2005 00:54:37 +0200 (CEST) Received: from m2a2.dyndns.org (p509101DF.dip0.t-ipconnect.de [80.145.1.223]) by mail.dt.e-technik.uni-dortmund.de (Postfix) with ESMTP id 8744044380; Tue, 25 Oct 2005 00:54:37 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by merlin.emma.line.org (Postfix) with ESMTP id AA5212015F4; Tue, 25 Oct 2005 00:54:36 +0200 (CEST) Received: from m2a2.dyndns.org ([127.0.0.1]) by localhost (m2a2.dyndns.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 19915-14; Tue, 25 Oct 2005 00:54:36 +0200 (CEST) Received: by merlin.emma.line.org (Postfix, from userid 500) id 959762015F6; Tue, 25 Oct 2005 00:54:36 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by merlin.emma.line.org (Postfix) with ESMTP id B9A0E2015F2; Tue, 25 Oct 2005 00:52:59 +0200 (CEST) Received: from m2a2.dyndns.org ([127.0.0.1]) by localhost (m2a2.dyndns.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 20313-11; Tue, 25 Oct 2005 00:52:58 +0200 (CEST) Received: from rho.emma.line.org (rho.emma.line.org [192.168.0.3]) by merlin.emma.line.org (Postfix) with ESMTP id ABAA12007B1; Tue, 25 Oct 2005 00:52:58 +0200 (CEST) Received: by rho.emma.line.org (Postfix, from userid 0) id 7BE0E5C36; Tue, 25 Oct 2005 00:52:58 +0200 (CEST) Message-Id: <20051024225258.7BE0E5C36@rho.emma.line.org> Date: Tue, 25 Oct 2005 00:52:58 +0200 (CEST) From: Matthias Andree To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Martin Cracauer Subject: kern/87959: ext2fs: no cp(1) possible, mmap returns EINVAL X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2005 23:00:28 -0000 >Number: 87959 >Category: kern >Synopsis: ext2fs: no cp(1) possible, mmap returns EINVAL >Confidential: no >Severity: critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Oct 24 23:00:26 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Bourne-again Superuser >Release: FreeBSD 6.0-RC1 i386 >Organization: >Environment: System: FreeBSD rho.emma.line.org 6.0-RC1 FreeBSD 6.0-RC1 #7: Mon Oct 24 18:20:44 CEST 2005 toor@rho.emma.line.org:/usr/obj/usr/src/sys/SIGMA i386 >Description: Taken from http://docs.freebsd.org/cgi/mid.cgi?m37je55eb8.fsf ------------------------------------------------------------- I mounted a Linux ext3 as ext2fs, which worked fine. However, trying to cvsupd or cp data out of the partition was refused, tracing the processes revealed that mmap() returned EINVAL. rsync(1) (from ports) worked though. Additional information (not in the original report on current@) ---------------------- The problem was originally reported against FreeBSD 6.0-BETA3 bug persists in 6.0-RC1 (i386) that was CVSupped on the UTC afternoon of 2005-10-24, fresh kernel + world builds were WITHOUT -DNOCLEAN and with default optimization options but with CPUTYPE?= athlon-xp. Excerpt from truss cp: break(0x805f000) = 0 (0x0) break(0x8060000) = 0 (0x0) stat("/linux/.bash_history",0x805f148) = 0 (0x0) stat("/tmp/.bash_history",0xbfbfebb0) = 0 (0x0) open("/linux/.bash_history",0x0,00) = 3 (0x3) open("/tmp/.bash_history",0x401,00) = 4 (0x4) mmap(0x0,199,(0x1)PROT_READ,(0x1)MAP_SHARED,3,0x0) ERR#22 'Invalid argument' cp: write(2,0xbfbfe4c0,4) = 4 (0x4) /linux/.bash_historywrite(2,0xbfbfe4e0,20) = 20 (0x14) : write(2,0x281423ec,2) = 2 (0x2) Invalid argument write(2,0xbfbfe4c0,17) = 17 (0x11) >How-To-Repeat: 1. (if needed) create an ext2fs 2. mount pre-existing ext2fs, perhaps writing some files to it 3. try to "cp" a regular file from ext2fs to some other filesystem, for instance: cp /linux/.bash_history /tmp/ >Fix: >Release-Note: >Audit-Trail: >Unformatted: