From owner-freebsd-fs@FreeBSD.ORG Sat Aug 28 08:35:59 2010 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B5161065696 for ; Sat, 28 Aug 2010 08:35:59 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id A95B98FC16 for ; Sat, 28 Aug 2010 08:35:58 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o7S8OsXa032703 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 28 Aug 2010 11:24:54 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id o7S8OsGr053596; Sat, 28 Aug 2010 11:24:54 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o7S8OrZ6053595; Sat, 28 Aug 2010 11:24:53 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 28 Aug 2010 11:24:53 +0300 From: Kostik Belousov To: Benjamin Kaduk Message-ID: <20100828082453.GG2396@deviant.kiev.zoral.com.ua> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="41nqFSEcPhzBz76I" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-2.2 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_50, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: freebsd-fs@freebsd.org Subject: Re: memory inconsistencies with OpenAFS on FreeBSD X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Aug 2010 08:35:59 -0000 --41nqFSEcPhzBz76I Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Aug 28, 2010 at 12:28:51AM -0400, Benjamin Kaduk wrote: > Hi all, >=20 > I've been working to make the OpenAFS network filesystem client usable on= =20 > FreeBSD; it's currently in a mostly-working state.=20 > ( http://www.openafs.org/ ; I have a hackish packaging of it as a FreeBSD= =20 > port at http://web.mit.edu/freebsd/openafs/openafs.shar . Note that it i= s=20 > broken on recent -current since it it fails to register its syscall=20 > properly; this is fixed in git master pending an update to=20 > syscalls.master.) >=20 > Normal file operations from a shell work okay, I can write and=20 > edit a file with vi, etc.; copying /usr/src into and out of AFS proceeds= =20 > nicely. > However, if I proceed to the standard lazy man's filesystem stress test,= =20 > buildworld, things don't get very far: > >>>stage 1.1: legacy release compatibility shims > [...] > =3D=3D=3D> tools/build (obj,includes,depend,all,install) > [...] > cc -O2 -pipe -std=3Dgnu99=20 > -I/afs/zone.mit.edu/user/kaduk/build/obj/afs/zone.mit. > edu/user/kaduk/build/tmp/legacy/usr/include -c=20 > /afs/zone.mit.edu/user/kaduk/buil > d/tools/build/dummy.c > building static egacy library > *** Signal 11 >=20 > I also don't seem to be able to run executables from AFS: > freebuild# ./my_mmap test4 > elf_load_section: truncated ELF file > Abort This sounds very much as missed vnode_pager_setsize() calls. VM tracks the file size as vnode vmobject size separately. I think this was done for historical reasons, but also it allows to not traverse the vop stack calling VOP_GETATTR each time when size is needed. >=20 >=20 > Trying to dig a bit deeper and get a smaller test case, rwatson suggested= =20 > that I look at mmap-ing a file and reading/writing from it. I wrote a=20 > small test program, and reading from the mmaped file works okay. However,= =20 > writing to the mmap-ed file does not seem to take effect (though my test= =20 > program does modify the target file on local disk). >=20 > (Also, when I do silly things like try to access unmapped memory which=20 > ought to generate a core dump, I get on the console: > freebuild kernel: Failed to write core file for process my_mmap (error=20 > 14)) >=20 > Where should I be looking to track down what's going on? >=20 > I note that we do provide our own getpages and putpages vops, and this=20 > code hasn't been particularly loved since the FreeBSD 4.x days. >=20 > Thanks for any suggestions, >=20 > Ben Kaduk > _______________________________________________ > freebsd-fs@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-fs > To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org" --41nqFSEcPhzBz76I Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkx4x9UACgkQC3+MBN1Mb4hfWgCg8XBS8Xp6xBovk09983KFTAKG DN8AnR4sYmguJR425zvFVNPAcbuYudMQ =eDx5 -----END PGP SIGNATURE----- --41nqFSEcPhzBz76I--