Re: Difference in NFS locking in 2.0 or 2.2, was:Bug

Brian May (bam@snoopy.apana.org.au)
Mon, 19 Apr 1999 17:43:29 +1000


------- =_aaaaaaaaaa0
Content-Type: text/plain; charset="us-ascii"
Content-ID: <4587.924507775.1@snoopy.apana.org.au>

In article <JA8AAAAAAS0TCwABYQABkFM9AcxU@arcodan.dk> you write:
>>> I've just set up a diskless Linux system, where I boot a 486 off the network
>>> (bootp, tftp, nfs). It worked like a charm - everything ran smooth and fine,
>>> until I wanted to set the box up as a NIS client. That's when I ran into
>>> trouble.
>>> I set up the NIS domain (ypdomainset), ran portmap, then ypbind, and here
>>> trouble showed up.
>>> Every time I started ypbind (with debug uption ) it said "ypbind already
>>> running (pid xxxx) - exiting.
>
>I've tried several things, including upgrading ypbind to the latest version,
>the kernel to 2.2.6 and everything else I had in my power to do.

I have appended some messages which I think may be relevent. This
isn't the whole thread, just the parts I consider relevent.

------- =_aaaaaaaaaa0
Content-Type: message/rfc822
Content-ID: <4587.924507775.2@snoopy.apana.org.au>

Return-Path: miquels@Q.cistron.nl
Delivery-Date: Mon Apr 05 21:31:34 1999
Return-Path: <miquels@Q.cistron.nl>
Delivered-To: bam@snoopy.apana.org.au
Received: (qmail 27486 invoked from network); 5 Apr 1999 11:31:25 -0000
Received: from janeway.cistron.nl (root@195.64.65.23)
by snoopy.apana.org.au with SMTP; 5 Apr 1999 11:31:25 -0000
Received: from Q.cistron.nl (miquels@q.cistron.nl [195.64.65.42])
by janeway.cistron.nl (8.9.2/8.9.2/Debian/GNU) with ESMTP id NAA11523;
Mon, 5 Apr 1999 13:32:05 +0200 (CEST)
Received: (from miquels@localhost)
by Q.cistron.nl (8.9.2/8.9.2/Debian/GNU) id NAA30389;
Mon, 5 Apr 1999 13:32:10 +0200 (CEST)
Date: Mon, 5 Apr 1999 13:32:10 +0200
From: Miquel van Smoorenburg <miquels@cistron.nl>
To: Brian May <bam@snoopy.apana.org.au>
Cc: Daniel Nilsson <dae@ludd.luth.se>, kukuk@suse.de
Subject: Re: ypbind
Message-ID: <19990405133210.A30371@cistron.nl>
References: <Pine.LNX.4.05.9904051102070.11840-100000@delta.local.net> <19990405105759.27383.qmail@snoopy.apana.org.au>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Mailer: Mutt 0.95.1i
In-Reply-To: <19990405105759.27383.qmail@snoopy.apana.org.au>; from Brian May on Mon, Apr 05, 1999 at 08:57:58PM +1000
X-NCC-RegID: nl.cistron

According to Brian May:
> Daniel Nilsson wrote:
> No. I think that must be the version of NIS as a whole.

No, 3.3.1 is the version of the Debian package. The debian package contains
multiple packages-in-one; yptools, ypbind-mt and ypserv.

> My version
> of ypbind is:
>
> [505] [snoopy:bam] ~ >/usr/sbin/ypbind --version
> ypbind (ypbind-mt) 1.3
>
> This is the latest stable Debian slink version. Are you sure your
> version is 3.3? I haven't been keeping up-to-date, but that is 2 major
> versions above what I am using.

ypbind and ypbind-mt are 2 different implementations of ypbind.

> >Anyway I patched the source for ypbind 3.3 as you wrote is the=20
> >posting.=20
> >The code didn`t compile on Linux since some of the semaphore calls
> >wasn`t correct. I commented this out and now ypbind works for me. :-)
>
> However, I am not entirely convinced that the problem is the same as
> the one I had, but maybe Miqueal can remember how he fixed the bug...
> Miqueal?
>
> Whatever the case, if there is a problem with the original source, it
> needs to be fixed, however, I am not really wide awake at the moment,
> so I will just send this message to everyone involved and watch what
> happens (and keep my fingers crossed that this is the right thing to do)
> ;-).

Well this was so long ago, I don't remember. The point is moot anyway
as Debian has been using ypbind-mt, a new multithreaded ypbind implementation
by Thorsten, for quite some time now.

Mike.

-- 
Indifference will certainly be the downfall of mankind, but who cares?

------- =_aaaaaaaaaa0 Content-Type: message/rfc822 Content-ID: <4587.924507775.3@snoopy.apana.org.au>

Return-Path: miquels@Q.cistron.nl Delivery-Date: Wed Apr 07 18:41:14 1999 Return-Path: <miquels@Q.cistron.nl> Delivered-To: bam@snoopy.apana.org.au Received: (qmail 5301 invoked from network); 7 Apr 1999 08:41:10 -0000 Received: from janeway.cistron.nl (root@195.64.65.23) by snoopy.apana.org.au with SMTP; 7 Apr 1999 08:41:10 -0000 Received: from Q.cistron.nl (miquels@q.cistron.nl [195.64.65.42]) by janeway.cistron.nl (8.9.2/8.9.2/Debian/GNU) with ESMTP id KAA13826; Wed, 7 Apr 1999 10:42:13 +0200 (CEST) Received: (from miquels@localhost) by Q.cistron.nl (8.9.2/8.9.2/Debian/GNU) id KAA02718; Wed, 7 Apr 1999 10:42:16 +0200 (CEST) Date: Wed, 7 Apr 1999 10:42:16 +0200 From: Miquel van Smoorenburg <miquels@cistron.nl> To: Thorsten Kukuk <kukuk@suse.de> Cc: Daniel Nilsson <dae@ludd.luth.se>, Brian May <bam@snoopy.apana.org.au> Subject: Re: ypbind Message-ID: <19990407104216.A2705@cistron.nl> References: <19990405105759.27383.qmail@snoopy.apana.org.au> <Pine.LNX.4.05.9904052036340.11840-100000@delta.local.net> <19990407085244.D14281@allen.suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.1i In-Reply-To: <19990407085244.D14281@allen.suse.de>; from Thorsten Kukuk on Wed, Apr 07, 1999 at 08:52:44AM +0200 X-NCC-RegID: nl.cistron

According to Thorsten Kukuk: > The problem is the create_pidfile() function from ypbind-mt (same problem > in ypbind). File locking over NFS doesn't seem to work in this case. > I don't have the time or the resources to test and fix this in the moment. > Set -DUSE_PIDFILE=0 in ypbind-mt/src/Makefile, and recompile ypbind. > ypbind-mt on SuSE Linux 6.1 is compiled with USE_PIDFILE=0, so that > version should work.

Aha, you get this behaviour if you run a 2.2 kernel NFS client with an older server that doesn't support file locking. The 2.2 NFS client knows about NFS locking and tries to do that on the NFS server, which then fails. Mount the filesystem with the "nolock" option on the client, and it will fall back to 2.0 behaviour: local locking only, no NFS locks.

Mike.

-- 
Indifference will certainly be the downfall of mankind, but who cares?

------- =_aaaaaaaaaa0--

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/