From owner-freebsd-current@FreeBSD.ORG Thu Nov 15 07:45:58 2007 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 AE7D916A417 for ; Thu, 15 Nov 2007 07:45:58 +0000 (UTC) (envelope-from kip.macy@gmail.com) Received: from qb-out-0506.google.com (qb-out-0506.google.com [72.14.204.234]) by mx1.freebsd.org (Postfix) with ESMTP id 6B59813C447 for ; Thu, 15 Nov 2007 07:45:58 +0000 (UTC) (envelope-from kip.macy@gmail.com) Received: by qb-out-0506.google.com with SMTP id a10so68496qbd for ; Wed, 14 Nov 2007 23:45:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=q6HoOCMGY5x55BHXacN6wDWEvZxL8rqIpRAwFSwHSHw=; b=MRu/4af6jmILoaHlnJZtAdSxIDW43lPMT6dkFddiODP16LglJ22jQ2RvdBlXcO6RL9OA5Rssux0D8HG++9FSw3AiUUNqDi7cYI8tDw11gXZvSOscBtULMKDT2/APFNxkoQ8Xnw/TAhbtTZuqIem6Q0G3wzsxggbCRMk5Auc1KPA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=AkcUfKEq4WWMlz5po+MtJKWWO7BiR8FMyvIXzqCfgFCm1k1qXgDHVxP5bP7J5oHBROy/dDfshkq7oXBm1rwtC55tmdmFeWb4Qq/kWr+dLNGnrx0r3TxDUQ/sHmXFaY++3yorsBLS5Y2M7U/5D42vSwA0PHcY7uj5BJsiY9lJgA0= Received: by 10.143.8.10 with SMTP id l10mr38111wfi.1195112750119; Wed, 14 Nov 2007 23:45:50 -0800 (PST) Received: by 10.142.230.18 with HTTP; Wed, 14 Nov 2007 23:45:50 -0800 (PST) Message-ID: Date: Wed, 14 Nov 2007 23:45:50 -0800 From: "Kip Macy" To: "Adam McDougall" In-Reply-To: <20071115074247.GQ37473@egr.msu.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20071115074247.GQ37473@egr.msu.edu> Cc: tss@iki.fi, freebsd-current@freebsd.org Subject: Re: link() not increasing link count on NFS server 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: Thu, 15 Nov 2007 07:45:58 -0000 On Nov 14, 2007 11:42 PM, Adam McDougall wrote: > Hi, lately I've been trying to work out some NFS multiple access issues relating > to the Dovecot IMAP server software. One symptom seems to be an unusual behavior > of FreeBSD NFS clients that I cannot reproduce with Linux or Solaris NFS clients. > Basically, Timo (cc'ed) came up with a small test case that seems to indicate > sometimes a link() call can succeed while the link count of the file will not > increase. If this is ran on two FreeBSD clients from the same NFS directory, you > will occasionally see "link() succeeded, but link count=1". I've tried both a > Netapp and a FreeBSD NFS server. I've tried FreeBSD 7_RELENG clients as well as > FreeBSD 6.2-stable from this summer. I've ran it on 32bit and 64bit clients. > I've turned rpc.lockd on and off, tried tcp vs. udp mounts, nothing so far seems > to make a difference, except perhaps FreeBSD 7.0 seems to produce the error less > often. If one of the processes is ran on a non-FreeBSD NFS cliemt, only the > FreeBSD NFS client gives the link error. Anyone have any input? Thanks. Is this with both TCP and UDP clients? We're planning on making the default TCP. -Kip > > > How to reproduce (local binary is fine too, may be required if different arch): > ------------------ > > cp locktest.c /nfsserver > cd /nfsserver > gcc locktest.c -o locktest -Wall -g > > On host 1: > cd /nfsserver > ./locktest temp1 > > On host 2: (easiest to reproduce when starting just a few seconds after 1) > cd /nfsserver > ./locktest temp2 > > > Typical output (timing may vary): > ---------------------------------- > > Host 1: > > > /tmp/locktest temp1 > 5 successes > 15 successes > unlink(): No such file or directory (not a problem indication, happens > 19 successes when second process starts) > 20 successes > link() succeeded, but link count=1 > 20 successes > link() succeeded, but link count=1 > 20 successes > 33 successes > 33 successes > link() succeeded, but link count=1 > 33 successes > 45 successes > link() succeeded, but link count=1 > 45 successes > 45 successes > link() succeeded, but link count=1 > ^C > > Host 2: > > > /tmp/locktest temp2 > 6 successes > 15 successes > 25 successes > 38 successes > 39 successes > 50 successes > 59 successes > link() succeeded, but link count=1 > 59 successes > 69 successes > 79 successes > 91 successes > 99 successes > 109 successes > ^C > > > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" >