From owner-freebsd-fs@FreeBSD.ORG Sat Aug 28 04:43:55 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 B72B01065697 for ; Sat, 28 Aug 2010 04:43:55 +0000 (UTC) (envelope-from kaduk@mit.edu) Received: from dmz-mailsec-scanner-7.mit.edu (DMZ-MAILSEC-SCANNER-7.MIT.EDU [18.7.68.36]) by mx1.freebsd.org (Postfix) with ESMTP id 74D738FC17 for ; Sat, 28 Aug 2010 04:43:55 +0000 (UTC) X-AuditID: 12074424-b7b2bae000005b3f-05-4c7890741233 Received: from mailhub-auth-1.mit.edu ( [18.9.21.35]) by dmz-mailsec-scanner-7.mit.edu (Symantec Brightmail Gateway) with SMTP id 18.AB.23359.470987C4; Sat, 28 Aug 2010 00:28:36 -0400 (EDT) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id o7S4SrBr005533 for ; Sat, 28 Aug 2010 00:28:53 -0400 Received: from multics.mit.edu (MULTICS.MIT.EDU [18.187.1.73]) (authenticated bits=56) (User authenticated as kaduk@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id o7S4SpAL018570 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Sat, 28 Aug 2010 00:28:52 -0400 (EDT) Received: (from kaduk@localhost) by multics.mit.edu (8.12.9.20060308) id o7S4SpB9000924; Sat, 28 Aug 2010 00:28:51 -0400 (EDT) Date: Sat, 28 Aug 2010 00:28:51 -0400 (EDT) From: Benjamin Kaduk To: freebsd-fs@freebsd.org Message-ID: User-Agent: Alpine 1.10 (GSO 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Brightmail-Tracker: AAAAAgB+j9UVxJa6 Subject: 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 04:43:55 -0000 Hi all, I've been working to make the OpenAFS network filesystem client usable on FreeBSD; it's currently in a mostly-working state. ( http://www.openafs.org/ ; I have a hackish packaging of it as a FreeBSD port at http://web.mit.edu/freebsd/openafs/openafs.shar . Note that it is broken on recent -current since it it fails to register its syscall properly; this is fixed in git master pending an update to syscalls.master.) Normal file operations from a shell work okay, I can write and edit a file with vi, etc.; copying /usr/src into and out of AFS proceeds nicely. However, if I proceed to the standard lazy man's filesystem stress test, buildworld, things don't get very far: >>> stage 1.1: legacy release compatibility shims [...] ===> tools/build (obj,includes,depend,all,install) [...] cc -O2 -pipe -std=gnu99 -I/afs/zone.mit.edu/user/kaduk/build/obj/afs/zone.mit. edu/user/kaduk/build/tmp/legacy/usr/include -c /afs/zone.mit.edu/user/kaduk/buil d/tools/build/dummy.c building static egacy library *** Signal 11 I also don't seem to be able to run executables from AFS: freebuild# ./my_mmap test4 elf_load_section: truncated ELF file Abort Trying to dig a bit deeper and get a smaller test case, rwatson suggested that I look at mmap-ing a file and reading/writing from it. I wrote a small test program, and reading from the mmaped file works okay. However, writing to the mmap-ed file does not seem to take effect (though my test program does modify the target file on local disk). (Also, when I do silly things like try to access unmapped memory which ought to generate a core dump, I get on the console: freebuild kernel: Failed to write core file for process my_mmap (error 14)) Where should I be looking to track down what's going on? I note that we do provide our own getpages and putpages vops, and this code hasn't been particularly loved since the FreeBSD 4.x days. Thanks for any suggestions, Ben Kaduk