From owner-freebsd-fs@FreeBSD.ORG Sun Nov 27 14:27:12 2011 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 86973106564A; Sun, 27 Nov 2011 14:27:12 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-jnhn.mail.uoguelph.ca (esa-jnhn.mail.uoguelph.ca [131.104.91.44]) by mx1.freebsd.org (Postfix) with ESMTP id E56A08FC0A; Sun, 27 Nov 2011 14:27:11 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ap4EAChI0k6DaFvO/2dsb2JhbABEhQOnBIFyAQEFIwQuJBsYAgINGQJZBqwokGeBMIIvhW2BFgSIIYwpkik X-IronPort-AV: E=Sophos;i="4.69,579,1315195200"; d="scan'208";a="147216786" Received: from erie.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.206]) by esa-jnhn-pri.mail.uoguelph.ca with ESMTP; 27 Nov 2011 09:27:10 -0500 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id DBEC3B3F54; Sun, 27 Nov 2011 09:27:10 -0500 (EST) Date: Sun, 27 Nov 2011 09:27:10 -0500 (EST) From: Rick Macklem To: Pawel Jakub Dawidek Message-ID: <1308447178.437372.1322404030886.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: <20111127105913.GH8794@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.91.202] X-Mailer: Zimbra 6.0.10_GA_2692 (ZimbraWebClient - FF3.0 (Win)/6.0.10_GA_2692) Cc: freebsd-fs@FreeBSD.org Subject: Re: NFS corruption in recent HEAD. 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: Sun, 27 Nov 2011 14:27:12 -0000 Pawel Jakub Dawidek wrote: > On Sat, Nov 26, 2011 at 09:03:46PM -0500, Rick Macklem wrote: > > Pawel Jakub Dawidek wrote: > > > Hi. > > > > > > I'm booting machine over the network using new NFS client and I'm > > > getting those warnings on boot: > > > > > > /etc/rc.subr: 666: Syntax error: "(" unexpected (expecting ";;") > [...] > > Oh, and maybe you could try reverting r227543 in the client > > (assuming > > the client is post-r227543). Maybe that file's vnode type isn't set > > to > > VREG early in the diskless booting and needs the ncl_flush() for > > some > > reason. > > > > I don't actually have a bug that needs r227543 to fix it. It just > > seemed > > incorrect to flush non-VREG files (particularily VDIR). As such, > > reverting > > it wouldn't be a big deal. > > I haven't tried reverting anything yet, but I think I was able to > reproduce this with old NFS client as well. The problem goes away when > I > comment out root mount point from /etc/fstab or remove mntudp from > mount > options. NFS root is mounted using TCP, AFAIK and it probably happens > when startup scripts (rc.d/mountcritremote) remounts root with mntudp > flag. The rc.subr warning starts to appear just after mountcritremote > is > called. > Ok, I'm not surprised that the recent commits I've done weren't related, since I couldn't think how they would have been. (Although the "readahead" option can now override the default of 1, the readahead code hasn't changed in ages. The new NFS code is just a clone of the old stuff.) And I doubt fsync() was being called for the file (plus it should be VREG), so I can't think how that might have affected it, either. It sounds like the mount update that changed TCP->UDP caused it. I'll take a closer look at that code. Maybe shutting down the TCP socket results in a read failing, leaving an invalid buffer cache block that isn't marked invalid properly (or something like that)? Still seems to be a mystery to me. Thanks for digging into this and please let me know if you figure out more, rick > -- > Pawel Jakub Dawidek http://www.wheelsystems.com > FreeBSD committer http://www.FreeBSD.org > Am I Evil? Yes, I Am! http://yomoli.com