From owner-freebsd-current@FreeBSD.ORG Mon Aug 29 15:47:15 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 784F91065673; Mon, 29 Aug 2011 15:47:15 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-annu.mail.uoguelph.ca (esa-annu.mail.uoguelph.ca [131.104.91.36]) by mx1.freebsd.org (Postfix) with ESMTP id 1CBEB8FC0A; Mon, 29 Aug 2011 15:47:14 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ap8EAKqzW06DaFvO/2dsb2JhbABCFoQ2pDGBQAEBBAEjBFIFFg4KAgINGQJZBogFBKhEkS+BLIQPgREEkx+RIA X-IronPort-AV: E=Sophos;i="4.68,297,1312171200"; d="scan'208";a="132567191" Received: from erie.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.206]) by esa-annu-pri.mail.uoguelph.ca with ESMTP; 29 Aug 2011 11:47:14 -0400 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id 10A19B3FF6; Mon, 29 Aug 2011 11:47:14 -0400 (EDT) Date: Mon, 29 Aug 2011 11:47:14 -0400 (EDT) From: Rick Macklem To: Steve Wills Message-ID: <1482338417.485168.1314632834055.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: <4E5B34A1.9030803@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.91.203] X-Mailer: Zimbra 6.0.10_GA_2692 (ZimbraWebClient - FF3.0 (Win)/6.0.10_GA_2692) Cc: freebsd-current@FreeBSD.org Subject: Re: NFS mountd version 3 over TCP X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 29 Aug 2011 15:47:15 -0000 Steve Wills wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 08/27/11 21:23, Steve Wills wrote: > > On 08/27/11 20:55, Rick Macklem wrote: > >>> I don't know why the nfsd wouldn't be able to bind(2) to port > >>> #2049 a > >>> second time for UDP, but someone on the net side might know? (Just > >>> in > >>> case it is a problem that has already been fixed, I'd try a newer > >>> kernel.) > > > > Will do, see below. > > > >>> The new server was broken by r224778 on Aug. 11 and fixed by > >>> r224911 on > >>> Aug. 16. (I recall you mentioning Aug. 11?) > > > > My kernel is from Aug 13, so definitely would fall into that range. > > I'll > > update and rebuild and see how it goes. > > > > After working around the /dev/stdout issue by booting an old kernel > and > doing a buildworld from there, I was able to update my kernel to > todays > sources. ESXi is now able to mount the nfs share. However, when I > attempt to start a VM, it reports: > > Failed to power on VM. > Unable to retrieve the current working directory: 0 (Input/output > error). Check if the directory has been deleted or unmounted. > > and > > FILE: File_Cwd: getcwd() failed: Input/output error > > I have tcpdump output available here: > > http://people.freebsd.org/~swills/nfs2.pcap > > if that helps. > I think it did. Lookup of ".." was failing. I think that was because ni_strictrelative (added for capabilities) wasn't initialized and happened to be non-zero. Please try this patch and let us know if it helps: --- fs/nfsserver/nfs_nfsdport.c.sav 2011-08-29 11:05:00.000000000 -0400 +++ fs/nfsserver/nfs_nfsdport.c 2011-08-29 11:29:43.000000000 -0400 @@ -282,6 +282,10 @@ nfsvno_namei(struct nfsrv_descript *nd, *retdirp = NULL; cnp->cn_nameptr = cnp->cn_pnbuf; + /* Initialize new fields for capabilities. */ + ndp->ni_strictrelative = 0; + ndp->ni_rightsneeded = 0; + ndp->ni_baserights = 0; /* * Extract and set starting directory. */ It's also at (in case white space gets munged) http://people.freebsd.org/~rmacklem/dotdot.patch Thanks for reporting this, I'm not sure when these fields not being initialized would have been noticed otherwise, rick > Steve > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.0.17 (FreeBSD) > > iQEcBAEBAgAGBQJOWzShAAoJEPXPYrMgexuhxo0H/0ALErvMrpcxtkuUv07ipj0O > Z8p3YkMFkckSy6s0QCAOCVgjbqZptCkKg96vMehG3nI5o2HtA43h5y6UNvMi1FWE > WOiIFbzXkgfn1pubv2YyFwaDK1aFXMswwYaCHSP7a+K8fpjDOiR5ZnhhyXcb7k1X > YmURkSEbLbngLdIfywPATSiby9PyFVqyMjhU3yW/Y8QLueEjK4xq5RsbmU1Qmv2B > bjA11x9birNvc//iBp6zTqBP752soqK+M9aXrjjm9GzhN0UeKdXseWt9zd3mu2qs > cfPUqz7DSATQNxwfpqIGnE4naYzPyKPbDbv6k5lKDjmmHn2O7VzXQXimjE6sT3o= > =Dpjc > -----END PGP SIGNATURE-----