Paarvai Naai | 1 Dec 2006 20:04
Picon

Re: [NFS] "mount: File exists" when trying to mount a second krb5 volume!

Thank you for your quick response.  I'm not too familiar with the
term "injury time" and the like.  But regardless, what is the
purpose of a rc series if we can't get an important bug fix into it.

Here's what I propose and I am happy to help facilitate to
some degree.  We should definitely get it into 2.6.19.x ASAP
and obviously into 2.6.20.  And Fedora often adds extra
patches into their source RPMs.  This is the most important
for my company.  Even if we don't have it in 2.6.19 vanilla,
if I had a "certified" patch from you, we can try to take it
to Fedora and get it into their source RPM.

Thoughts?

Thanks,
Paarvai




On 12/1/06, Trond Myklebust <trond.myklebust <at> fys.uio.no> wrote:
On Fri, 2006-12-01 at 10:34 -0800, Paarvai Naai wrote:
> Hi all,
>
> I really do appreciate the high quality technical assistance
> I have gotten to date from this list.  But at the same time,
> I am getting somewhat frustrated with the very spotty
> attention I am getting for a *critical* bug that somehow
> made it into the upstream kernel sources.  This is directly
> affecting the ability to use krb5 on either NFSv3 or NFSv4.
>
> First I had to actually dig through the source and find the
> bug.  Then I was offered a patch but when it didn't work
> there was very little response/assistance to help with my
> investigation into which kernel that patch is compatible with.
> Finally, I have been insisting that we get the fix back into the
> upstream sources and it appears that no one appreciates
> the importance.

2.6.19 is already out (and by the time this bug was found, the 2.6.19-rc
series was way into injury time).

The patch will go into 2.6.20, then we can look into sending it in as a
stable update to 2.6.19.x. Not before.

Trond


_______________________________________________
NFSv4 mailing list
NFSv4 <at> linux-nfs.org
http://linux-nfs.org/cgi-bin/mailman/listinfo/nfsv4
Trond Myklebust | 1 Dec 2006 20:16
Picon
Picon

Re: [NFS] "mount: File exists" when trying to mount a second krb5 volume!

On Fri, 2006-12-01 at 11:04 -0800, Paarvai Naai wrote:
> Thank you for your quick response.  I'm not too familiar with the
> term "injury time" and the like.  But regardless, what is the
> purpose of a rc series if we can't get an important bug fix into it.

That depends entirely on the nature of the bug. This one does not
corrupt data, it does not cause an Oops, so we have time to look
carefully at a solution.

> Here's what I propose and I am happy to help facilitate to 
> some degree.  We should definitely get it into 2.6.19.x ASAP
> and obviously into 2.6.20.  And Fedora often adds extra
> patches into their source RPMs.  This is the most important
> for my company.  Even if we don't have it in 2.6.19 vanilla,
> if I had a "certified" patch from you, we can try to take it
> to Fedora and get it into their source RPM.

The procedures for dealing with kernel regressions are already well
established. I will be following them as usual.

Trond
Paarvai Naai | 1 Dec 2006 21:57
Picon

Re: [NFS] "mount: File exists" when trying to mount a second krb5 volume!

On 12/1/06, Trond Myklebust <trond.myklebust <at> fys.uio.no > wrote:
The procedures for dealing with kernel regressions are already well
established. I will be following them as usual.

Trond


That's good to know.  What is the well-established procedure for Fedora?
I really want to make sure it gets in ASAP.  The importance of this
(basically that the current bug *nearly completely breaks* krb5 with
NFS) needs to be impressed on them.

Thanks,
Paarvai



_______________________________________________
NFSv4 mailing list
NFSv4 <at> linux-nfs.org
http://linux-nfs.org/cgi-bin/mailman/listinfo/nfsv4
Paarvai Naai | 4 Dec 2006 19:55
Picon

Re: [NFS] "mount: File exists" when trying to mount a second krb5 volume!

I have added this bug to bugzilla.redhat.com and requested that they
push Trond's patch into their source RPMs as soon as possible.  Sorry if
I'm stepping on anyone toes, but I just felt that I had to proceed since I
didn't receive a response to my previous question (see below).

Thanks,
Paarvai

On 12/1/06, Paarvai Naai < opensource3141 <at> gmail.com> wrote:
On 12/1/06, Trond Myklebust <trond.myklebust <at> fys.uio.no > wrote:
The procedures for dealing with kernel regressions are already well
established. I will be following them as usual.

Trond


That's good to know.  What is the well-established procedure for Fedora?
I really want to make sure it gets in ASAP.  The importance of this
(basically that the current bug *nearly completely breaks* krb5 with
NFS) needs to be impressed on them.

Thanks,
Paarvai




_______________________________________________
NFSv4 mailing list
NFSv4 <at> linux-nfs.org
http://linux-nfs.org/cgi-bin/mailman/listinfo/nfsv4
Ian Kent | 5 Dec 2006 03:36
Favicon

Re: "mount: File exists" when trying to mount a second krb5 volume!

On Mon, 4 Dec 2006, Paarvai Naai wrote:

> I have added this bug to bugzilla.redhat.com and requested that they
> push Trond's patch into their source RPMs as soon as possible.  Sorry if
> I'm stepping on anyone toes, but I just felt that I had to proceed since I
> didn't receive a response to my previous question (see below).

Sorry, I meant to say to log a bug.

But, looking at the history in this thread, it appears that a solution 
hasn't been reached.

> 
> Thanks,
> Paarvai
> 
> On 12/1/06, Paarvai Naai <opensource3141 <at> gmail.com> wrote:
> > 
> > On 12/1/06, Trond Myklebust <trond.myklebust <at> fys.uio.no > wrote:
> > 
> > > The procedures for dealing with kernel regressions are already well
> > > established. I will be following them as usual.
> > >
> > > Trond
> > >
> > >
> > That's good to know.  What is the well-established procedure for Fedora?
> > I really want to make sure it gets in ASAP.  The importance of this
> > (basically that the current bug *nearly completely breaks* krb5 with
> > NFS) needs to be impressed on them.
> > 
> > Thanks,
> > Paarvai
> > 
> > 
> > 
> > 
> 

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
NFS maillist  -  NFS <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

Paarvai Naai | 5 Dec 2006 20:06
Picon

Re: [NFS] "mount: File exists" when trying to mount a second krb5 volume!

Hi Ian,

Regarding the resolution of the issue, Trond sent out a patch.  Please see:

http://linux-nfs.org/pipermail/nfsv4/2006-November/005315.html

I've verified this patch on my system and Trond had it working as well.
The initial confusion was that the patch did not apply to 2.6.18 and
when I hacked it up it was causing segfaults on umount.  But that's not
really a concern since we can get the patch into 2.6.19 and up.

Thanks,
Paarvai

On 12/4/06, Ian Kent <raven <at> themaw.net> wrote:
> On Mon, 4 Dec 2006, Paarvai Naai wrote:
>
> > I have added this bug to bugzilla.redhat.com and requested that they
> > push Trond's patch into their source RPMs as soon as possible.  Sorry if
> > I'm stepping on anyone toes, but I just felt that I had to proceed since I
> > didn't receive a response to my previous question (see below).
>
> Sorry, I meant to say to log a bug.
>
> But, looking at the history in this thread, it appears that a solution
> hasn't been reached.
>
> >
> > Thanks,
> > Paarvai
> >
> > On 12/1/06, Paarvai Naai <opensource3141 <at> gmail.com> wrote:
> > >
> > > On 12/1/06, Trond Myklebust <trond.myklebust <at> fys.uio.no > wrote:
> > >
> > > > The procedures for dealing with kernel regressions are already well
> > > > established. I will be following them as usual.
> > > >
> > > > Trond
> > > >
> > > >
> > > That's good to know.  What is the well-established procedure for Fedora?
> > > I really want to make sure it gets in ASAP.  The importance of this
> > > (basically that the current bug *nearly completely breaks* krb5 with
> > > NFS) needs to be impressed on them.
> > >
> > > Thanks,
> > > Paarvai
> > >
> > >
> > >
> > >
> >
>
Paarvai Naai | 23 Jan 2007 23:52
Picon

Re: "mount: File exists" when trying to mount a second krb5 volume!

Hi all,

Sadly, Trond's patch has *still* not made it to the upstream sources.
For example, Fedora Core 6 has released a kernel package based on
2.6.19.2 and it doesn't appear to have the fix.

I'm confused as to why this fairly serious regression has not been
corrected by either 2.6.19.1 or 2.6.19.2.  What can be done to get
this remedied asap?

Incidentally, the folks at bugzilla.redhat.com are now on top of this
problem for the upcoming RHEL 5, but that doesn't help non-RHEL users
any!

Thanks,
Paarvai

> > > > On 12/1/06, Trond Myklebust <trond.myklebust <at> fys.uio.no > wrote:
> > > >
> > > > > The procedures for dealing with kernel regressions are already well
> > > > > established. I will be following them as usual.
> > > > >
> > > > > Trond

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
NFS maillist  -  NFS <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

Open Source | 17 Nov 2006 20:59
Picon
Favicon

Re: "mount: File exists" when trying to mount a second krb5 volume!

Thanks Trond.  Saving the patch did the trick.  I had
to do some manual hacking to get the patch to
apply because you must have done your diff
against a different kernel tree revision.  I'm using
2.6.18 from FC5 updates.

Once I massaged things, the patch compiled and it
works.  I am able to mount more than one partition
with no problems now.  However, I cannot speak
to the finer points (like memory leaks, etc.) since
I don't know the code so well.  I trust someone else
will independently verify it (i.e., code review) before
it gets into the kernel tree.

So this brings me back to the question?  Can we get
this is back into the main tree as soon as possible?
2.6.19 is on rc5.  So ideally we could get it in there
soon.  2.6.18 has a .2 subsubrelease.  So we could
also get it into the .3 version soon.  Thoughts?

Thanks again,
Paarvai

----- Original Message ----
From: Trond Myklebust <trond.myklebust <at> fys.uio.no>
To: Open Source <opensource3141 <at> yahoo.com>
Cc: nfsv4 <at> linux-nfs.org; nfs <at> lists.sourceforge.net
Sent: Thursday, November 16, 2006 12:55:54 PM
Subject: Re: "mount: File exists" when trying to mount a second krb5 volume!

On Thu, 2006-11-16 at 12:50 -0800, Open Source wrote:
> I know this might be a dumb question but I'm
> not able to apply the patch.  How do I do this?
> 
> I cut and paste everything from the "diff --git"
> line into a file.
> 
> Then I did: "patch -p1 < nfs_pipe_fix.patch"
> while sitting in the root directory of my kernel source.
> 
> I get the following error:
> 
> patching file include/linux/sunrpc/clnt.h
> patch: **** malformed patch at line 11: };

Don't cut n' paste, since that tends to mangle spaces, linefeed, etc.
Just save the entire message using your mail browser's 'save to file'
feature and feed the resulting file to 'patch -p1'.

Cheers,
 Trond
Kostas Georgiou | 18 Nov 2006 16:15
Picon
Gravatar

Re: "mount: File exists" when trying to mount a second krb5 volume!

On Fri, Nov 17, 2006 at 11:59:25AM -0800, Open Source wrote:

> Thanks Trond.  Saving the patch did the trick.  I had
> to do some manual hacking to get the patch to
> apply because you must have done your diff
> against a different kernel tree revision.  I'm using
> 2.6.18 from FC5 updates.
> 
> Once I massaged things, the patch compiled and it
> works.  I am able to mount more than one partition
> with no problems now.  However, I cannot speak
> to the finer points (like memory leaks, etc.) since
> I don't know the code so well.  I trust someone else
> will independently verify it (i.e., code review) before
> it gets into the kernel tree.

I did the same with the FC6 2.6.18 kernel and while it does allow
me to have more than one mount from the server autofs decides that
my home is not in use any more and it unmounts it, somehow this
causes the system to freeze as well.

Nov 17 16:28:14 thufir automount[2483]: mount still busy /home
Nov 17 16:29:29 thufir automount[2483]: expiring path /home/georgiou
Nov 17 16:29:29 thufir automount[2483]: unmounting dir = /home/georgiou
Nov 17 16:29:32 thufir automount[2483]: expired /home/georgiou

Here is the patch with my changes to apply in FC6 which most likely is
bad since I really don't know the code at all :(

Kostas Georgiou

diff -u a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h
--- a/include/linux/sunrpc/clnt.h
+++ b/include/linux/sunrpc/clnt.h
 <at>  <at>  -64,6 +64,7  <at>  <at> 
 	struct dentry *		cl_dentry;	/* inode */
 	struct rpc_clnt *	cl_parent;	/* Points to parent of clones */
 	struct rpc_rtt		cl_rtt_default;
+	struct rpc_program *	cl_program;
 	struct rpc_portmap	cl_pmap_default;
 	char			cl_inline_name[32];
 };
diff -u a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
 <at>  <at>  -154,6 +154,7  <at>  <at> 
 	clnt->cl_prot     = xprt->prot;
 	clnt->cl_stats    = program->stats;
 	clnt->cl_metrics  = rpc_alloc_iostats(clnt);
+	clnt->cl_program  = program;
 	rpc_init_wait_queue(&clnt->cl_pmap_default.pm_bindwait, "bindwait");

 	if (!clnt->cl_port)
 <at>  <at>  -235,6 +236,7  <at>  <at> 
 rpc_clone_client(struct rpc_clnt *clnt)
 {
 	struct rpc_clnt *new;
+	int err;

 	new = kmalloc(sizeof(*new), GFP_KERNEL);
 	if (!new)
 <at>  <at>  -242,6 +244,11  <at>  <at> 
 	memcpy(new, clnt, sizeof(*new));
 	atomic_set(&new->cl_count, 1);
 	atomic_set(&new->cl_users, 0);
+	err = rpc_setup_pipedir(new, clnt->cl_program->pipe_dir_name);
+	if (err != 0) {
+		kfree(new);
+		return ERR_PTR(err);
+	}
 	new->cl_parent = clnt;
 	atomic_inc(&clnt->cl_count);
 	/* Duplicate portmapper */
 <at>  <at>  -250,8 +257,6  <at>  <at> 
 	new->cl_autobind = 0;
 	new->cl_oneshot = 0;
 	new->cl_dead = 0;
-	if (!IS_ERR(new->cl_dentry))
-		dget(new->cl_dentry);
 	rpc_init_rtt(&new->cl_rtt_default, clnt->cl_xprt->timeout.to_initval);
 	if (new->cl_auth)
 		atomic_inc(&new->cl_auth->au_count);
 <at>  <at>  -313,12 +318,6  <at>  <at> 
 		rpcauth_destroy(clnt->cl_auth);
 		clnt->cl_auth = NULL;
 	}
-	if (clnt->cl_parent != clnt) {
-		if (!IS_ERR(clnt->cl_dentry))
-			dput(clnt->cl_dentry);
-		rpc_destroy_client(clnt->cl_parent);
-		goto out_free;
-	}
 	if (!IS_ERR(clnt->cl_dentry)) {
 		rpc_rmdir(clnt->cl_dentry);
 		rpc_put_mount();
 <at>  <at>  -327,6 +326,10  <at>  <at> 
 		xprt_destroy(clnt->cl_xprt);
 		clnt->cl_xprt = NULL;
 	}
+	if (clnt->cl_parent != clnt) {
+		rpc_destroy_client(clnt->cl_parent);
+		goto out_free;
+	}
 	if (clnt->cl_server != clnt->cl_inline_name)
 		kfree(clnt->cl_server);
 out_free:

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
NFS maillist  -  NFS <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

Open Source | 16 Nov 2006 21:50
Picon
Favicon

Re: "mount: File exists" when trying to mount a second krb5 volume!

I know this might be a dumb question but I'm
not able to apply the patch.  How do I do this?

I cut and paste everything from the "diff --git"
line into a file.

Then I did: "patch -p1 < nfs_pipe_fix.patch"
while sitting in the root directory of my kernel source.

I get the following error:

patching file include/linux/sunrpc/clnt.h
patch: **** malformed patch at line 11: };

Please let me know what to do here.

Thanks,
Paarvai

----- Original Message ----
From: Trond Myklebust <trond.myklebust <at> fys.uio.no>
To: Open Source <opensource3141 <at> yahoo.com>
Cc: nfsv4 <at> linux-nfs.org; nfs <at> lists.sourceforge.net
Sent: Thursday, November 16, 2006 9:46:04 AM
Subject: Re: "mount: File exists" when trying to mount a second krb5 volume!

On Wed, 2006-11-15 at 18:31 -0800, Open Source wrote:
> Hi all,
> 
> I think I have found the answer.  It is similar to this issue but not
> exactly the same as:
> 
> http://linux-nfs.org/pipermail/nfsv4/2005-November/002807.html
> 
> Here's what is happening.  In 2.6.18 there is a new file called
> fs/nfs/client.c.  In this file it does the following for every new
> mount:
> 
> 1) Lookup to see if an existing client has the same specification
> as the requested mount.
> 
> 2) If so, clone that client.  If not, create a new one.
> 
> 3) Create any pipes required by the auth pseudoflavor by
> calling rpcauth_create.
> 
> 4) Continue with the mounting of the volume.
> 
> Now, if you have no connections to the server, a new rpc
> client is created and the pipes are created with no problems.
> For the second mount to the same server, the rpc client is
> cloned and has the same path in /var/lib/nfs/rpc_pipefs/nfs
> has the first connection.  Therefore on step 3 the pipe creation
> fails in net/sunrpc/auth_gss/auth_gss.c.  This causes the
> entire mount to fail.

Thanks for debugging this! I think the right thing to do here is just to
give the cloned clients their own rpc_pipefs directory. Can you see if
the following patch fixes your problem?

Cheers,
  Trond

----------------------------------------------------
From: Trond Myklebust <Trond.Myklebust <at> netapp.com>
Date: 1163695047 -0500
SUNRPC: Give cloned RPC clients their own rpc_pipefs directory

Signed-off-by: Trond Myklebust <Trond.Myklebust <at> netapp.com>
---

 include/linux/sunrpc/clnt.h |    1 +
 net/sunrpc/clnt.c           |   19 +++++++++++--------
 2 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h
index f6d1d64..a1be89d 100644
--- a/include/linux/sunrpc/clnt.h
+++ b/include/linux/sunrpc/clnt.h
 <at>  <at>  -53,6 +53,7  <at>  <at>  struct rpc_clnt {
     struct dentry *        cl_dentry;    /* inode */
     struct rpc_clnt *    cl_parent;    /* Points to parent of clones */
     struct rpc_rtt        cl_rtt_default;
+    struct rpc_program *    cl_program;
     char            cl_inline_name[32];
 };

diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index 587f3ec..4d269e5 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
 <at>  <at>  -141,6 +141,7  <at>  <at>  static struct rpc_clnt * rpc_new_client(
     clnt->cl_vers     = version->number;
     clnt->cl_stats    = program->stats;
     clnt->cl_metrics  = rpc_alloc_iostats(clnt);
+    clnt->cl_program  = program;

     if (!xprt_bound(clnt->cl_xprt))
         clnt->cl_autobind = 1;
 <at>  <at>  -252,6 +253,7  <at>  <at>  struct rpc_clnt *
 rpc_clone_client(struct rpc_clnt *clnt)
 {
     struct rpc_clnt *new;
+    int err;

     new = kmalloc(sizeof(*new), GFP_KERNEL);
     if (!new)
 <at>  <at>  -259,6 +261,11  <at>  <at>  rpc_clone_client(struct rpc_clnt *clnt)
     memcpy(new, clnt, sizeof(*new));
     atomic_set(&new->cl_count, 1);
     atomic_set(&new->cl_users, 0);
+    err = rpc_setup_pipedir(new, clnt->cl_program->pipe_dir_name);
+    if (err != 0) {
+        kfree(new);
+        return ERR_PTR(err);
+    }
     new->cl_parent = clnt;
     atomic_inc(&clnt->cl_count);
     new->cl_xprt = xprt_get(clnt->cl_xprt);
 <at>  <at>  -266,8 +273,6  <at>  <at>  rpc_clone_client(struct rpc_clnt *clnt)
     new->cl_autobind = 0;
     new->cl_oneshot = 0;
     new->cl_dead = 0;
-    if (!IS_ERR(new->cl_dentry))
-        dget(new->cl_dentry);
     rpc_init_rtt(&new->cl_rtt_default, clnt->cl_xprt->timeout.to_initval);
     if (new->cl_auth)
         atomic_inc(&new->cl_auth->au_count);
 <at>  <at>  -328,16 +333,14  <at>  <at>  rpc_destroy_client(struct rpc_clnt *clnt
         rpcauth_destroy(clnt->cl_auth);
         clnt->cl_auth = NULL;
     }
-    if (clnt->cl_parent != clnt) {
-        if (!IS_ERR(clnt->cl_dentry))
-            dput(clnt->cl_dentry);
-        rpc_destroy_client(clnt->cl_parent);
-        goto out_free;
-    }
     if (!IS_ERR(clnt->cl_dentry)) {
         rpc_rmdir(clnt->cl_dentry);
         rpc_put_mount();
     }
+    if (clnt->cl_parent != clnt) {
+        rpc_destroy_client(clnt->cl_parent);
+        goto out_free;
+    }
     if (clnt->cl_server != clnt->cl_inline_name)
         kfree(clnt->cl_server);
 out_free:
Trond Myklebust | 16 Nov 2006 21:55
Picon
Picon

Re: "mount: File exists" when trying to mount a second krb5 volume!

On Thu, 2006-11-16 at 12:50 -0800, Open Source wrote:
> I know this might be a dumb question but I'm
> not able to apply the patch.  How do I do this?
> 
> I cut and paste everything from the "diff --git"
> line into a file.
> 
> Then I did: "patch -p1 < nfs_pipe_fix.patch"
> while sitting in the root directory of my kernel source.
> 
> I get the following error:
> 
> patching file include/linux/sunrpc/clnt.h
> patch: **** malformed patch at line 11: };

Don't cut n' paste, since that tends to mangle spaces, linefeed, etc.
Just save the entire message using your mail browser's 'save to file'
feature and feed the resulting file to 'patch -p1'.

Cheers,
 Trond
Open Source | 16 Nov 2006 16:21
Picon
Favicon

Re: "mount: File exists" when trying to mount a second krb5 volume!

Hi Bruce,

Sure.  It was a bit frustrating learning the sysctl debug
infrastructure for the first time and weeding through
the code to add more debug statements, but I'm glad
I got to the bottom of things.

Please let me know if there is a quick fix for this
problem.  It would be idea to get this into the
main kernel tree as soon as possible.

Thanks again,
Paarvai

----- Original Message ----
From: J. Bruce Fields <bfields <at> fieldses.org>
To: Open Source <opensource3141 <at> yahoo.com>
Cc: nfsv4 <at> linux-nfs.org; nfs <at> lists.sourceforge.net
Sent: Wednesday, November 15, 2006 7:51:29 PM
Subject: Re: "mount: File exists" when trying to mount a second krb5 volume!

On Wed, Nov 15, 2006 at 06:31:17PM -0800, Open Source wrote:
> Here's what is happening.

Thanks for your persistence!

> For the second mount to the same server, the rpc client is
> cloned and has the same path in /var/lib/nfs/rpc_pipefs/nfs
> has the first connection.  Therefore on step 3 the pipe creation
> fails in net/sunrpc/auth_gss/auth_gss.c.  This causes the
> entire mount to fail.

Argh, I could swear we've tried to fix this problem at least twice
before....

> This is a serious bug that prevents important functionality
> of nfsv3 with krb5.  I notice that kernel 2.6.19 is on release
> candidate 5.  Is there any way a surgical fix can be inserted
> into 2.6.19 before final release?

I'll take a look tommorow if someone else doesn't beat me to it, but I
doubt we'll get it done that fast.

--b.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
NFS maillist  -  NFS <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

Open Source | 16 Nov 2006 03:31
Picon
Favicon

Re: "mount: File exists" when trying to mount a second krb5 volume!

Hi all,

I think I have found the answer.  It is similar to this issue but not
exactly the same as:

http://linux-nfs.org/pipermail/nfsv4/2005-November/002807.html

Here's what is happening.  In 2.6.18 there is a new file called
fs/nfs/client.c.  In this file it does the following for every new
mount:

1) Lookup to see if an existing client has the same specification
as the requested mount.

2) If so, clone that client.  If not, create a new one.

3) Create any pipes required by the auth pseudoflavor by
calling rpcauth_create.

4) Continue with the mounting of the volume.

Now, if you have no connections to the server, a new rpc
client is created and the pipes are created with no problems.
For the second mount to the same server, the rpc client is
cloned and has the same path in /var/lib/nfs/rpc_pipefs/nfs
has the first connection.  Therefore on step 3 the pipe creation
fails in net/sunrpc/auth_gss/auth_gss.c.  This causes the
entire mount to fail.

This is a serious bug that prevents important functionality
of nfsv3 with krb5.  I notice that kernel 2.6.19 is on release
candidate 5.  Is there any way a surgical fix can be inserted
into 2.6.19 before final release?

This bug does not exist under 2.6.17 since client directories
in /var/lib/nfs/rpc_pipefs/nfs are not reused across different
nfsv3+krb5 mounts to the same server.

Thanks,
Paarvai

----- Original Message ----
From: Open Source <opensource3141 <at> yahoo.com>
To: J. Bruce Fields <bfields <at> fieldses.org>
Cc: nfsv4 <at> linux-nfs.org
Sent: Wednesday, November 15, 2006 10:37:16 AM
Subject: Re: "mount: File exists" when trying to mount a second krb5 volume!

A couple more things:

I notice there is a new client.c for 2.6.18.  Maybe the problem lies
there as code was ported from other places into that file?

My error only shows up with nfsv3,krb5 mounts.  My volumes also
have acls but I'm guessing that that is not causing any problems.

Thanks,
Paarvai

----- Original Message ----
From: Open Source <opensource3141 <at> yahoo.com>
To: J. Bruce Fields <bfields <at> fieldses.org>
Cc: nfsv4 <at> linux-nfs.org
Sent: Monday, November 13, 2006 2:16:11 PM
Subject: Re: "mount: File exists" when trying to mount a second krb5 volume!

Hi Bruce,

Regarding whether there is an error reply from the server, I
looked at the "MOUNT  V3 MNT Reply (Call In 46)" packet
(which is the last MOUNT packet in the dump summary I
sent previously).  This packet is going from the server
to the client.  When I look at it in the "Packet Details" (tree view)
under the "Mount Service" line, it says "Status: OK (0)"
so I guess there are no errors.

Yes, I did do an "exportfs -a" on the server after twiddling
the root_squash business.

Also, I am not trying to mount the same export in two places.
On the client I have mounted server:/export/home to /net/home
and then things fail when I try to mount server:/export/data to
/net/data.

Yes, I do think it is client side.  Things work when the client
is 2.6.17 and the server is 2.6.18 but not when the client is
2.6.18.

Is there some logging I can do on the client side to see what
might be happening?

Thanks,
Paarvai

----- Original Message ----
From: J. Bruce Fields <bfields <at> fieldses.org>
To: Open Source <opensource3141 <at> yahoo.com>
Cc: nfsv4 <at> linux-nfs.org
Sent: Monday, November 13, 2006 1:08:29 PM
Subject: Re: "mount: File exists" when trying to mount a second krb5 volume!

On Mon, Nov 13, 2006 at 12:31:20PM -0800, Open Source wrote:
> Here's a sanitized summary of my traffic.  I don't know how useful
> this might be, but if there is a specific line that might be helpful
> I can expand that and possibly send it to you.

OK, so none of those server replies are errors?  Then I guess it's the
client complaining.

Are you trying to mount the same export in two different places?  I
think some of the recent client changes may prevent that.

--b.

_______________________________________________
NFSv4 mailing list
NFSv4 <at> linux-nfs.org
http://linux-nfs.org/cgi-bin/mailman/listinfo/nfsv4

_______________________________________________
NFSv4 mailing list
NFSv4 <at> linux-nfs.org
http://linux-nfs.org/cgi-bin/mailman/listinfo/nfsv4
Trond Myklebust | 16 Nov 2006 18:46
Picon
Picon

Re: "mount: File exists" when trying to mount a second krb5 volume!

On Wed, 2006-11-15 at 18:31 -0800, Open Source wrote:
> Hi all,
> 
> I think I have found the answer.  It is similar to this issue but not
> exactly the same as:
> 
> http://linux-nfs.org/pipermail/nfsv4/2005-November/002807.html
> 
> Here's what is happening.  In 2.6.18 there is a new file called
> fs/nfs/client.c.  In this file it does the following for every new
> mount:
> 
> 1) Lookup to see if an existing client has the same specification
> as the requested mount.
> 
> 2) If so, clone that client.  If not, create a new one.
> 
> 3) Create any pipes required by the auth pseudoflavor by
> calling rpcauth_create.
> 
> 4) Continue with the mounting of the volume.
> 
> Now, if you have no connections to the server, a new rpc
> client is created and the pipes are created with no problems.
> For the second mount to the same server, the rpc client is
> cloned and has the same path in /var/lib/nfs/rpc_pipefs/nfs
> has the first connection.  Therefore on step 3 the pipe creation
> fails in net/sunrpc/auth_gss/auth_gss.c.  This causes the
> entire mount to fail.

Thanks for debugging this! I think the right thing to do here is just to
give the cloned clients their own rpc_pipefs directory. Can you see if
the following patch fixes your problem?

Cheers,
  Trond

----------------------------------------------------
From: Trond Myklebust <Trond.Myklebust <at> netapp.com>
Date: 1163695047 -0500
SUNRPC: Give cloned RPC clients their own rpc_pipefs directory

Signed-off-by: Trond Myklebust <Trond.Myklebust <at> netapp.com>
---

 include/linux/sunrpc/clnt.h |    1 +
 net/sunrpc/clnt.c           |   19 +++++++++++--------
 2 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h
index f6d1d64..a1be89d 100644
--- a/include/linux/sunrpc/clnt.h
+++ b/include/linux/sunrpc/clnt.h
 <at>  <at>  -53,6 +53,7  <at>  <at>  struct rpc_clnt {
 	struct dentry *		cl_dentry;	/* inode */
 	struct rpc_clnt *	cl_parent;	/* Points to parent of clones */
 	struct rpc_rtt		cl_rtt_default;
+	struct rpc_program *	cl_program;
 	char			cl_inline_name[32];
 };

diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index 587f3ec..4d269e5 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
 <at>  <at>  -141,6 +141,7  <at>  <at>  static struct rpc_clnt * rpc_new_client(
 	clnt->cl_vers     = version->number;
 	clnt->cl_stats    = program->stats;
 	clnt->cl_metrics  = rpc_alloc_iostats(clnt);
+	clnt->cl_program  = program;

 	if (!xprt_bound(clnt->cl_xprt))
 		clnt->cl_autobind = 1;
 <at>  <at>  -252,6 +253,7  <at>  <at>  struct rpc_clnt *
 rpc_clone_client(struct rpc_clnt *clnt)
 {
 	struct rpc_clnt *new;
+	int err;

 	new = kmalloc(sizeof(*new), GFP_KERNEL);
 	if (!new)
 <at>  <at>  -259,6 +261,11  <at>  <at>  rpc_clone_client(struct rpc_clnt *clnt)
 	memcpy(new, clnt, sizeof(*new));
 	atomic_set(&new->cl_count, 1);
 	atomic_set(&new->cl_users, 0);
+	err = rpc_setup_pipedir(new, clnt->cl_program->pipe_dir_name);
+	if (err != 0) {
+		kfree(new);
+		return ERR_PTR(err);
+	}
 	new->cl_parent = clnt;
 	atomic_inc(&clnt->cl_count);
 	new->cl_xprt = xprt_get(clnt->cl_xprt);
 <at>  <at>  -266,8 +273,6  <at>  <at>  rpc_clone_client(struct rpc_clnt *clnt)
 	new->cl_autobind = 0;
 	new->cl_oneshot = 0;
 	new->cl_dead = 0;
-	if (!IS_ERR(new->cl_dentry))
-		dget(new->cl_dentry);
 	rpc_init_rtt(&new->cl_rtt_default, clnt->cl_xprt->timeout.to_initval);
 	if (new->cl_auth)
 		atomic_inc(&new->cl_auth->au_count);
 <at>  <at>  -328,16 +333,14  <at>  <at>  rpc_destroy_client(struct rpc_clnt *clnt
 		rpcauth_destroy(clnt->cl_auth);
 		clnt->cl_auth = NULL;
 	}
-	if (clnt->cl_parent != clnt) {
-		if (!IS_ERR(clnt->cl_dentry))
-			dput(clnt->cl_dentry);
-		rpc_destroy_client(clnt->cl_parent);
-		goto out_free;
-	}
 	if (!IS_ERR(clnt->cl_dentry)) {
 		rpc_rmdir(clnt->cl_dentry);
 		rpc_put_mount();
 	}
+	if (clnt->cl_parent != clnt) {
+		rpc_destroy_client(clnt->cl_parent);
+		goto out_free;
+	}
 	if (clnt->cl_server != clnt->cl_inline_name)
 		kfree(clnt->cl_server);
 out_free:
Kostas Georgiou | 16 Nov 2006 16:35
Picon
Gravatar

Re: "mount: File exists" when trying to mount a second krb5 volume!

On Wed, Nov 15, 2006 at 06:31:17PM -0800, Open Source wrote:

....

> This bug does not exist under 2.6.17 since client directories
> in /var/lib/nfs/rpc_pipefs/nfs are not reused across different
> nfsv3+krb5 mounts to the same server.

For the record I have the same problem with nfs4+krb5 in 2.6.18
so it's not just nfs3.

Kostas

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
NFS maillist  -  NFS <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

J. Bruce Fields | 16 Nov 2006 04:51

Re: "mount: File exists" when trying to mount a second krb5 volume!

On Wed, Nov 15, 2006 at 06:31:17PM -0800, Open Source wrote:
> Here's what is happening.

Thanks for your persistence!

> For the second mount to the same server, the rpc client is
> cloned and has the same path in /var/lib/nfs/rpc_pipefs/nfs
> has the first connection.  Therefore on step 3 the pipe creation
> fails in net/sunrpc/auth_gss/auth_gss.c.  This causes the
> entire mount to fail.

Argh, I could swear we've tried to fix this problem at least twice
before....

> This is a serious bug that prevents important functionality
> of nfsv3 with krb5.  I notice that kernel 2.6.19 is on release
> candidate 5.  Is there any way a surgical fix can be inserted
> into 2.6.19 before final release?

I'll take a look tommorow if someone else doesn't beat me to it, but I
doubt we'll get it done that fast.

--b.
Open Source | 15 Nov 2006 19:37
Picon
Favicon

Re: "mount: File exists" when trying to mount a second krb5 volume!

A couple more things:

I notice there is a new client.c for 2.6.18.  Maybe the problem lies
there as code was ported from other places into that file?

My error only shows up with nfsv3,krb5 mounts.  My volumes also
have acls but I'm guessing that that is not causing any problems.

Thanks,
Paarvai

----- Original Message ----
From: Open Source <opensource3141 <at> yahoo.com>
To: J. Bruce Fields <bfields <at> fieldses.org>
Cc: nfsv4 <at> linux-nfs.org
Sent: Monday, November 13, 2006 2:16:11 PM
Subject: Re: "mount: File exists" when trying to mount a second krb5 volume!

Hi Bruce,

Regarding whether there is an error reply from the server, I
looked at the "MOUNT  V3 MNT Reply (Call In 46)" packet
(which is the last MOUNT packet in the dump summary I
sent previously).  This packet is going from the server
to the client.  When I look at it in the "Packet Details" (tree view)
under the "Mount Service" line, it says "Status: OK (0)"
so I guess there are no errors.

Yes, I did do an "exportfs -a" on the server after twiddling
the root_squash business.

Also, I am not trying to mount the same export in two places.
On the client I have mounted server:/export/home to /net/home
and then things fail when I try to mount server:/export/data to
/net/data.

Yes, I do think it is client side.  Things work when the client
is 2.6.17 and the server is 2.6.18 but not when the client is
2.6.18.

Is there some logging I can do on the client side to see what
might be happening?

Thanks,
Paarvai

----- Original Message ----
From: J. Bruce Fields <bfields <at> fieldses.org>
To: Open Source <opensource3141 <at> yahoo.com>
Cc: nfsv4 <at> linux-nfs.org
Sent: Monday, November 13, 2006 1:08:29 PM
Subject: Re: "mount: File exists" when trying to mount a second krb5 volume!

On Mon, Nov 13, 2006 at 12:31:20PM -0800, Open Source wrote:
> Here's a sanitized summary of my traffic.  I don't know how useful
> this might be, but if there is a specific line that might be helpful
> I can expand that and possibly send it to you.

OK, so none of those server replies are errors?  Then I guess it's the
client complaining.

Are you trying to mount the same export in two different places?  I
think some of the recent client changes may prevent that.

--b.

_______________________________________________
NFSv4 mailing list
NFSv4 <at> linux-nfs.org
http://linux-nfs.org/cgi-bin/mailman/listinfo/nfsv4
Open Source | 15 Nov 2006 19:33
Picon
Favicon

Re: "mount: File exists" when trying to mount a second krb5 volume!

Hi Bruce (or anyone else),

Sorry to bug you, but do you have any suggestions as
to what I can do to narrow down this problem?

Right now, I am resorting to trying to diff the fs/nfs directory
between 2.6.17 FC5 kernel and 2.6.18 FC5 kernel.  But there
are a lot of differences and I have no idea what might be
important.  It would be helpful to be able to turn on some
other debugging for the mount and see if that can point me
in the right place.

Please let me know.

Thanks,
Paarvai

----- Original Message ----
From: Open Source <opensource3141 <at> yahoo.com>
To: J. Bruce Fields <bfields <at> fieldses.org>
Cc: nfsv4 <at> linux-nfs.org
Sent: Monday, November 13, 2006 2:16:11 PM
Subject: Re: "mount: File exists" when trying to mount a second krb5 volume!

Hi Bruce,

Regarding whether there is an error reply from the server, I
looked at the "MOUNT  V3 MNT Reply (Call In 46)" packet
(which is the last MOUNT packet in the dump summary I
sent previously).  This packet is going from the server
to the client.  When I look at it in the "Packet Details" (tree view)
under the "Mount Service" line, it says "Status: OK (0)"
so I guess there are no errors.

Yes, I did do an "exportfs -a" on the server after twiddling
the root_squash business.

Also, I am not trying to mount the same export in two places.
On the client I have mounted server:/export/home to /net/home
and then things fail when I try to mount server:/export/data to
/net/data.

Yes, I do think it is client side.  Things work when the client
is 2.6.17 and the server is 2.6.18 but not when the client is
2.6.18.

Is there some logging I can do on the client side to see what
might be happening?

Thanks,
Paarvai

----- Original Message ----
From: J. Bruce Fields <bfields <at> fieldses.org>
To: Open Source <opensource3141 <at> yahoo.com>
Cc: nfsv4 <at> linux-nfs.org
Sent: Monday, November 13, 2006 1:08:29 PM
Subject: Re: "mount: File exists" when trying to mount a second krb5 volume!

On Mon, Nov 13, 2006 at 12:31:20PM -0800, Open Source wrote:
> Here's a sanitized summary of my traffic.  I don't know how useful
> this might be, but if there is a specific line that might be helpful
> I can expand that and possibly send it to you.

OK, so none of those server replies are errors?  Then I guess it's the
client complaining.

Are you trying to mount the same export in two different places?  I
think some of the recent client changes may prevent that.

--b.

_______________________________________________
NFSv4 mailing list
NFSv4 <at> linux-nfs.org
http://linux-nfs.org/cgi-bin/mailman/listinfo/nfsv4
Open Source | 13 Nov 2006 23:16
Picon
Favicon

Re: "mount: File exists" when trying to mount a second krb5 volume!

Hi Bruce,

Regarding whether there is an error reply from the server, I
looked at the "MOUNT  V3 MNT Reply (Call In 46)" packet
(which is the last MOUNT packet in the dump summary I
sent previously).  This packet is going from the server
to the client.  When I look at it in the "Packet Details" (tree view)
under the "Mount Service" line, it says "Status: OK (0)"
so I guess there are no errors.

Yes, I did do an "exportfs -a" on the server after twiddling
the root_squash business.

Also, I am not trying to mount the same export in two places.
On the client I have mounted server:/export/home to /net/home
and then things fail when I try to mount server:/export/data to
/net/data.

Yes, I do think it is client side.  Things work when the client
is 2.6.17 and the server is 2.6.18 but not when the client is
2.6.18.

Is there some logging I can do on the client side to see what
might be happening?

Thanks,
Paarvai

----- Original Message ----
From: J. Bruce Fields <bfields <at> fieldses.org>
To: Open Source <opensource3141 <at> yahoo.com>
Cc: nfsv4 <at> linux-nfs.org
Sent: Monday, November 13, 2006 1:08:29 PM
Subject: Re: "mount: File exists" when trying to mount a second krb5 volume!

On Mon, Nov 13, 2006 at 12:31:20PM -0800, Open Source wrote:
> Here's a sanitized summary of my traffic.  I don't know how useful
> this might be, but if there is a specific line that might be helpful
> I can expand that and possibly send it to you.

OK, so none of those server replies are errors?  Then I guess it's the
client complaining.

Are you trying to mount the same export in two different places?  I
think some of the recent client changes may prevent that.

--b.
Open Source | 13 Nov 2006 21:31
Picon
Favicon

Re: "mount: File exists" when trying to mount a second krb5 volume!

Hi Bruce,

Here's a sanitized summary of my traffic.  I don't know how useful
this might be, but if there is a specific line that might be helpful
I can expand that and possibly send it to you.

192.168.0.2 is the client
192.168.0.1 is the server

--
No.     Time        Source                Destination           Protocol Info
      1 0.000000    192.168.0.2          192.168.0.1          DNS      Standard query A nfs.mycompany.com
      2 0.000318    192.168.0.1          192.168.0.2          DNS      Standard query response A 192.168.0.1
      3 0.004001    192.168.0.2          192.168.0.1          TCP      54571 > sunrpc [SYN] Seq=0 Len=0 MSS=1460 TSV=136117 TSER=0 WS=7
      4 0.004197    192.168.0.1          192.168.0.2          TCP      sunrpc > 54571 [SYN, ACK] Seq=0 Ack=1 Win=741376 Len=0 MSS=1460
TSV=322531806 TSER=136117 WS=7
      5 0.004221    192.168.0.2          192.168.0.1          TCP      54571 > sunrpc [ACK] Seq=1 Ack=1 Win=5888 Len=0 TSV=136117 TSER=322531806
      6 0.004299    192.168.0.2          192.168.0.1          Portmap  V2 GETPORT Call (Reply In 8) NFS(100003) V:3 TCP
      7 0.004439    192.168.0.1          192.168.0.2          TCP      sunrpc > 54571 [ACK] Seq=1 Ack=61 Win=5888 Len=0 TSV=322531806 TSER=136117
      8 0.004565    192.168.0.1          192.168.0.2          Portmap  V2 GETPORT Reply (Call In 6) Port:2049
      9 0.004575    192.168.0.2          192.168.0.1          TCP      54571 > sunrpc [ACK] Seq=61 Ack=33 Win=5888 Len=0 TSV=136117 TSER=322531806
     10 0.004609    192.168.0.2          192.168.0.1          TCP      54571 > sunrpc [FIN, ACK] Seq=61 Ack=33 Win=5888 Len=0
TSV=136117 TSER=322531806
     11 0.004668    192.168.0.2          192.168.0.1          TCP      37769 > nfs [SYN] Seq=0 Len=0 MSS=1460 TSV=136118 TSER=0 WS=7
     12 0.004815    192.168.0.1          192.168.0.2          TCP      nfs > 37769 [SYN, ACK] Seq=0 Ack=1 Win=741376 Len=0 MSS=1460
TSV=322531806 TSER=136118 WS=7
     13 0.004831    192.168.0.2          192.168.0.1          TCP      37769 > nfs [ACK] Seq=1 Ack=1 Win=5888 Len=0 TSV=136118 TSER=322531806
     14 0.004847    192.168.0.1          192.168.0.2          TCP      sunrpc > 54571 [FIN, ACK] Seq=33 Ack=62 Win=5888 Len=0
TSV=322531806 TSER=136117
     15 0.004857    192.168.0.2          192.168.0.1          TCP      54571 > sunrpc [ACK] Seq=62 Ack=34 Win=5888 Len=0 TSV=136118 TSER=322531806
     16 0.004888    192.168.0.2          192.168.0.1          NFS      V3 NULL Call (Reply In 18)
     17 0.005064    192.168.0.1          192.168.0.2          TCP      nfs > 37769 [ACK] Seq=1 Ack=45 Win=5888 Len=0 TSV=322531806 TSER=136118
     18 0.005076    192.168.0.1          192.168.0.2          NFS      V3 NULL Reply (Call In 16)
     19 0.005083    192.168.0.2          192.168.0.1          TCP      37769 > nfs [ACK] Seq=45 Ack=29 Win=5888 Len=0 TSV=136118 TSER=322531806
     20 0.005110    192.168.0.2          192.168.0.1          TCP      37769 > nfs [FIN, ACK] Seq=45 Ack=29 Win=5888 Len=0 TSV=136118 TSER=322531806
     21 0.005159    192.168.0.2          192.168.0.1          TCP      46439 > sunrpc [SYN] Seq=0 Len=0 MSS=1460 TSV=136118 TSER=0 WS=7
     22 0.005314    192.168.0.1          192.168.0.2          TCP      sunrpc > 46439 [SYN, ACK] Seq=0 Ack=1 Win=741376 Len=0 MSS=1460
TSV=322531806 TSER=136118 WS=7
     23 0.005329    192.168.0.2          192.168.0.1          TCP      46439 > sunrpc [ACK] Seq=1 Ack=1 Win=5888 Len=0 TSV=136118 TSER=322531806
     24 0.005344    192.168.0.1          192.168.0.2          TCP      nfs > 37769 [FIN, ACK] Seq=29 Ack=46 Win=5888 Len=0
TSV=322531806 TSER=136118
     25 0.005353    192.168.0.2          192.168.0.1          TCP      37769 > nfs [ACK] Seq=46 Ack=30 Win=5888 Len=0 TSV=136118 TSER=322531806
     26 0.005378    192.168.0.2          192.168.0.1          Portmap  V2 GETPORT Call (Reply In 28) MOUNT(100005) V:3 TCP
     27 0.005563    192.168.0.1          192.168.0.2          TCP      sunrpc > 46439 [ACK] Seq=1 Ack=61 Win=5888 Len=0 TSV=322531806 TSER=136118
     28 0.005574    192.168.0.1          192.168.0.2          Portmap  V2 GETPORT Reply (Call In 26) Port:676
     29 0.005581    192.168.0.2          192.168.0.1          TCP      46439 > sunrpc [ACK] Seq=61 Ack=33 Win=5888 Len=0 TSV=136118 TSER=322531806
     30 0.005609    192.168.0.2          192.168.0.1          TCP      46439 > sunrpc [FIN, ACK] Seq=61 Ack=33 Win=5888 Len=0
TSV=136118 TSER=322531806
     31 0.005655    192.168.0.2          192.168.0.1          TCP      11429 > vpps-via [SYN] Seq=0 Len=0 MSS=1460 TSV=136118 TSER=0 WS=7
     32 0.005814    192.168.0.1          192.168.0.2          TCP      vpps-via > 11429 [SYN, ACK] Seq=0 Ack=1 Win=741376 Len=0
MSS=1460 TSV=322531807 TSER=136118 WS=7
     33 0.005829    192.168.0.2          192.168.0.1          TCP      11429 > vpps-via [ACK] Seq=1 Ack=1 Win=5888 Len=0 TSV=136118 TSER=322531807
     34 0.005844    192.168.0.1          192.168.0.2          TCP      sunrpc > 46439 [FIN, ACK] Seq=33 Ack=62 Win=5888 Len=0
TSV=322531807 TSER=136118
     35 0.005853    192.168.0.2          192.168.0.1          TCP      46439 > sunrpc [ACK] Seq=62 Ack=34 Win=5888 Len=0 TSV=136118 TSER=322531807
     36 0.005879    192.168.0.2          192.168.0.1          MOUNT    V3 NULL Call (Reply In 38)
     37 0.006065    192.168.0.1          192.168.0.2          TCP      vpps-via > 11429 [ACK] Seq=1 Ack=45 Win=5888 Len=0
TSV=322531807 TSER=136118
     38 0.006076    192.168.0.1          192.168.0.2          MOUNT    V3 NULL Reply (Call In 36)
     39 0.006085    192.168.0.2          192.168.0.1          TCP      11429 > vpps-via [ACK] Seq=45 Ack=29 Win=5888 Len=0 TSV=136118 TSER=322531807
     40 0.006162    192.168.0.2          192.168.0.1          TCP      11429 > vpps-via [FIN, ACK] Seq=45 Ack=29 Win=5888 Len=0
TSV=136118 TSER=322531807
     41 0.006272    192.168.0.2          192.168.0.1          TCP      mdbs_daemon > vpps-via [SYN] Seq=0 Len=0 MSS=1460 TSV=136118
TSER=0 WS=7
     42 0.006317    192.168.0.1          192.168.0.2          TCP      vpps-via > 11429 [FIN, ACK] Seq=29 Ack=46 Win=5888 Len=0
TSV=322531807 TSER=136118
     43 0.006331    192.168.0.2          192.168.0.1          TCP      11429 > vpps-via [ACK] Seq=46 Ack=30 Win=5888 Len=0 TSV=136118 TSER=322531807
     44 0.006342    192.168.0.1          192.168.0.2          TCP      vpps-via > mdbs_daemon [SYN, ACK] Seq=0 Ack=1 Win=741376 Len=0
MSS=1460 TSV=322531807 TSER=136118 WS=7
     45 0.006357    192.168.0.2          192.168.0.1          TCP      mdbs_daemon > vpps-via [ACK] Seq=1 Ack=1 Win=5888 Len=0
TSV=136118 TSER=322531807
     46 0.006431    192.168.0.2          192.168.0.1          MOUNT    V3 MNT Call (Reply In 48) /export/data
     47 0.006566    192.168.0.1          192.168.0.2          TCP      vpps-via > mdbs_daemon [ACK] Seq=1 Ack=149 Win=6912 Len=0
TSV=322531807 TSER=136118
     48 0.036798    192.168.0.1          192.168.0.2          MOUNT    V3 MNT Reply (Call In 46)
     49 0.036816    192.168.0.2          192.168.0.1          TCP      mdbs_daemon > vpps-via [ACK] Seq=149 Ack=73 Win=5888 Len=0
TSV=136126 TSER=322531814
     50 0.036889    192.168.0.2          192.168.0.1          TCP      mdbs_daemon > vpps-via [FIN, ACK] Seq=149 Ack=73 Win=5888 Len=0
TSV=136126 TSER=322531814
     51 0.037042    192.168.0.1          192.168.0.2          TCP      vpps-via > mdbs_daemon [FIN, ACK] Seq=73 Ack=150 Win=6912 Len=0
TSV=322531814 TSER=136126
     52 0.037057    192.168.0.2          192.168.0.1          TCP      mdbs_daemon > vpps-via [ACK] Seq=150 Ack=74 Win=5888 Len=0
TSV=136126 TSER=322531814
--

Thanks,
Paarvai

----- Original Message ----
From: Open Source <opensource3141 <at> yahoo.com>
To: J. Bruce Fields <bfields <at> fieldses.org>
Cc: nfsv4 <at> linux-nfs.org
Sent: Monday, November 13, 2006 12:24:02 PM
Subject: Re: "mount: File exists" when trying to mount a second krb5 volume!

Hi Bruce,

Thanks for your email from a couple weeks back.
I apologize for the very sluggish reply.  I was out-of-town.

In response to your questions:

1) I tried wireshark.  I see some traffic when I do the second
mount.  But I don't know what to look for.  I could send it to you
but my company is a stickler for protecting information like
internal IP addresses.  Can you tell me what to look for?

2) Changing the export to root_squash instead of all_squash
doesn't help.

Looking forward to your reply.  I really need to be able to upgrade
my kernel from 2.6.17 to 2.6.18 for other reasons and fixing
this issue is therefore critical.

Thanks,
Paarvai

----- Original Message ----
From: J. Bruce Fields <bfields <at> fieldses.org>
To: Open Source <opensource3141 <at> yahoo.com>
Cc: nfsv4 <at> linux-nfs.org
Sent: Friday, October 27, 2006 12:51:26 PM
Subject: Re: "mount: File exists" when trying to mount a second krb5 volume!

On Wed, Oct 25, 2006 at 06:56:43PM -0700, Open Source wrote:
> I am having a very similar problem to the one reported
> by Joachim Selke on this list (2006/10/21).
> 
> I recently upgraded my client and server side kernels
> to 2.6.18.  I am unable to mount a second NFSv3+krb5
> share after already mounting one on the system.  I get
> the error
> 
> mount.nfs: File exists

Have you checked in wireshark/ethereal to see what's happening
on the wire while this is going on?

> I have been using NFSv3+krb5 for a long time with no
> problems.  My exports file on the server looks like:
> 
> /export/data gss/krb5(secure,rw,sync,wdelay,hide,no_subtree_check,auth_nlm,root_squash,anonuid=65534,anongid=65534)
> /export/data 192.168.0.0/24(secure,ro,sync,all_squash,anonuid=65534,anongid=65534)

Hm.  Does it change anything if you change the second all_squash to a
root_squash?

--b.
J. Bruce Fields | 13 Nov 2006 22:08

Re: "mount: File exists" when trying to mount a second krb5 volume!

On Mon, Nov 13, 2006 at 12:31:20PM -0800, Open Source wrote:
> Here's a sanitized summary of my traffic.  I don't know how useful
> this might be, but if there is a specific line that might be helpful
> I can expand that and possibly send it to you.

OK, so none of those server replies are errors?  Then I guess it's the
client complaining.

Are you trying to mount the same export in two different places?  I
think some of the recent client changes may prevent that.

--b.
Open Source | 13 Nov 2006 21:24
Picon
Favicon

Re: "mount: File exists" when trying to mount a second krb5 volume!

Hi Bruce,

Thanks for your email from a couple weeks back.
I apologize for the very sluggish reply.  I was out-of-town.

In response to your questions:

1) I tried wireshark.  I see some traffic when I do the second
mount.  But I don't know what to look for.  I could send it to you
but my company is a stickler for protecting information like
internal IP addresses.  Can you tell me what to look for?

2) Changing the export to root_squash instead of all_squash
doesn't help.

Looking forward to your reply.  I really need to be able to upgrade
my kernel from 2.6.17 to 2.6.18 for other reasons and fixing
this issue is therefore critical.

Thanks,
Paarvai

----- Original Message ----
From: J. Bruce Fields <bfields <at> fieldses.org>
To: Open Source <opensource3141 <at> yahoo.com>
Cc: nfsv4 <at> linux-nfs.org
Sent: Friday, October 27, 2006 12:51:26 PM
Subject: Re: "mount: File exists" when trying to mount a second krb5 volume!

On Wed, Oct 25, 2006 at 06:56:43PM -0700, Open Source wrote:
> I am having a very similar problem to the one reported
> by Joachim Selke on this list (2006/10/21).
> 
> I recently upgraded my client and server side kernels
> to 2.6.18.  I am unable to mount a second NFSv3+krb5
> share after already mounting one on the system.  I get
> the error
> 
> mount.nfs: File exists

Have you checked in wireshark/ethereal to see what's happening
on the wire while this is going on?

> I have been using NFSv3+krb5 for a long time with no
> problems.  My exports file on the server looks like:
> 
> /export/data gss/krb5(secure,rw,sync,wdelay,hide,no_subtree_check,auth_nlm,root_squash,anonuid=65534,anongid=65534)
> /export/data 192.168.0.0/24(secure,ro,sync,all_squash,anonuid=65534,anongid=65534)

Hm.  Does it change anything if you change the second all_squash to a
root_squash?

--b.
J. Bruce Fields | 13 Nov 2006 21:38

Re: "mount: File exists" when trying to mount a second krb5 volume!

On Mon, Nov 13, 2006 at 12:24:02PM -0800, Open Source wrote:
> Hi Bruce,
> 
> Thanks for your email from a couple weeks back.
> I apologize for the very sluggish reply.  I was out-of-town.
> 
> In response to your questions:
> 
> 1) I tried wireshark.  I see some traffic when I do the second
> mount.  But I don't know what to look for.  I could send it to you
> but my company is a stickler for protecting information like
> internal IP addresses.  Can you tell me what to look for?

There should be a series of rpc calls and replies.  Look at the replies
for errors.  I'd especially like to know which call failed (e.g. was it
a lookup, a getattr, or something else?), and what error the server
returned in that case.

> 2) Changing the export to root_squash instead of all_squash
> doesn't help.

Hm.  You also remembered to re-export (exportfs -r) before retrying the
mount?

What are the permissions on /export/data?

--b.
Open Source | 27 Oct 2006 16:59
Picon
Favicon

Re: "mount: File exists" when trying to mount a second krb5 volume!

Hi,

I sent the following on Wed but haven't seen any response
yet.  Sorry to bug you, but I know you guys on this list are
pretty responsive so I was wondering if there were any
suggestions on what I could try to get to the bottom of this.

Thanks!
Paarvai

----- Original Message ----
From: Open Source <opensource3141 <at> yahoo.com>
To: nfsv4 <at> linux-nfs.org
Sent: Wednesday, October 25, 2006 6:56:43 PM
Subject: "mount: File exists" when trying to mount a second krb5 volume!

Hi,

I am having a very similar problem to the one reported
by Joachim Selke on this list (2006/10/21).

I recently upgraded my client and server side kernels
to 2.6.18.  I am unable to mount a second NFSv3+krb5
share after already mounting one on the system.  I get
the error

mount.nfs: File exists

I have no problems when performing the same with the
client running 2.6.17 and the server running 2.6.18.  The
one thing I have noticed new for 2.6.18 is the fscache
module.  I have not enabled it but it is getting loaded
automatically by nfs.  Might this be a problem?  Does
anyone know how to turn it off entirely (e.g., a kernel
boot option or a modprobe.conf option)?

I have been using NFSv3+krb5 for a long time with no
problems.  My exports file on the server looks like:

/export/data gss/krb5(secure,rw,sync,wdelay,hide,no_subtree_check,auth_nlm,root_squash,anonuid=65534,anongid=65534)
/export/data 192.168.0.0/24(secure,ro,sync,all_squash,anonuid=65534,anongid=65534)

which is the accepted way to export a NFSv3+krb5
volume since the non-krb5 export is used for mounting
and the krb5 export is used for actual directory browsing.

(Also, for completeness my distribution is FC5 on the
client and the server except for a slight version upgrade
of util-linux and nfs-utils on the server to get around the
following problem:
http://linux-nfs.org/pipermail/nfsv4/2006-July/004694.html.)

This is a very important issue for me so whatever advice
you can provide would be much appreciated.  I am happy
to provide more debugging information if you can tell me
what to turn on.  With my current installation I see *nothing*
in /var/log/messages on either the server or the client
when mount spits out its error.

Thanks in advance,
Paarvai

_______________________________________________
NFSv4 mailing list
NFSv4 <at> linux-nfs.org
http://linux-nfs.org/cgi-bin/mailman/listinfo/nfsv4

Open Source | 21 Nov 2006 16:16
Picon
Favicon

Re: [NFS] "mount: File exists" when trying to mount a second krb5 volume!

Hi Trond (and Bruce),

Not sure if you saw my email from yesterday (as well as
Kostas' email previous to mine).

Actually it turns out that the problem I am seeing is much more
severe than I had first thought.  I switched to NFSv4+krb5 and
I saw the same issue there.  Without your patch, the behavior
is basically the same as in NFSv3+krb5.  Namely, you cannot
have a pseudofilesystem with more than 1 directory export.
If you do, you can mount the pseudofilesystem on the client
but when you run "ls" on the mount point you get a "file exists"
error.  A quick look at the rpc_pipe_fs directory shows
that only one clnt directory exists!  Basically we have the
same problem as before.

Your patch does fix the problem but when unmounting the
filesystem (NFSv3) or pseudofilesystem (NFSv4), the kernel
crashes.

It appears that this is a very urgent problem since it prevents
many people from using krb5 at all.  Is it possible for you to provide
a more stable fix soon?  Kernel 2.6.19 is already in rc6.  We really
need to get this thing fixed and back into the upstream sources ASAP!

Thanks in advance for your help.

Best regards,
Paarvai

----- Original Message ----
From: Open Source <opensource3141 <at> yahoo.com>
To: Trond Myklebust <trond.myklebust <at> fys.uio.no>
Cc: nfsv4 <at> linux-nfs.org; nfs <at> lists.sourceforge.net; Kostas Georgiou <k.georgiou <at> imperial.ac.uk>
Sent: Monday, November 20, 2006 11:47:00 AM
Subject: Re: [NFS] "mount: File exists" when trying to mount a second krb5 volume!

Hi Trond,

I can confirm that I also see a crash with your patch file in place!
I'm not sure if that's because it didn't apply cleanly to begin with
and my massaging might have caused a problem.  I don't think
so though.

Basically if you mount a couple NFSv3+krb5 partitions and
then unmount one of them, the system locks up after about 2
seconds.  I didn't see this before since I didn't use the
automounter utility.

Thanks,
Paarvai

----- Original Message ----
From: Kostas Georgiou <k.georgiou <at> imperial.ac.uk>
To: Open Source <opensource3141 <at> yahoo.com>
Cc: Trond Myklebust <trond.myklebust <at> fys.uio.no>; nfs <at> lists.sourceforge.net; nfsv4 <at> linux-nfs.org
Sent: Saturday, November 18, 2006 7:15:04 AM
Subject: Re: [NFS] "mount: File exists" when trying to mount a second krb5 volume!

On Fri, Nov 17, 2006 at 11:59:25AM -0800, Open Source wrote:

> Thanks Trond.  Saving the patch did the trick.  I had
> to do some manual hacking to get the patch to
> apply because you must have done your diff
> against a different kernel tree revision.  I'm using
> 2.6.18 from FC5 updates.
> 
> Once I massaged things, the patch compiled and it
> works.  I am able to mount more than one partition
> with no problems now.  However, I cannot speak
> to the finer points (like memory leaks, etc.) since
> I don't know the code so well.  I trust someone else
> will independently verify it (i.e., code review) before
> it gets into the kernel tree.

I did the same with the FC6 2.6.18 kernel and while it does allow
me to have more than one mount from the server autofs decides that
my home is not in use any more and it unmounts it, somehow this
causes the system to freeze as well.

Nov 17 16:28:14 thufir automount[2483]: mount still busy /home
Nov 17 16:29:29 thufir automount[2483]: expiring path /home/georgiou
Nov 17 16:29:29 thufir automount[2483]: unmounting dir = /home/georgiou
Nov 17 16:29:32 thufir automount[2483]: expired /home/georgiou

Here is the patch with my changes to apply in FC6 which most likely is
bad since I really don't know the code at all :(

Kostas Georgiou

diff -u a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h
--- a/include/linux/sunrpc/clnt.h
+++ b/include/linux/sunrpc/clnt.h
 <at>  <at>  -64,6 +64,7  <at>  <at> 
     struct dentry *        cl_dentry;    /* inode */
     struct rpc_clnt *    cl_parent;    /* Points to parent of clones */
     struct rpc_rtt        cl_rtt_default;
+    struct rpc_program *    cl_program;
     struct rpc_portmap    cl_pmap_default;
     char            cl_inline_name[32];
 };
diff -u a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
 <at>  <at>  -154,6 +154,7  <at>  <at> 
     clnt->cl_prot     = xprt->prot;
     clnt->cl_stats    = program->stats;
     clnt->cl_metrics  = rpc_alloc_iostats(clnt);
+    clnt->cl_program  = program;
     rpc_init_wait_queue(&clnt->cl_pmap_default.pm_bindwait, "bindwait");

     if (!clnt->cl_port)
 <at>  <at>  -235,6 +236,7  <at>  <at> 
 rpc_clone_client(struct rpc_clnt *clnt)
 {
     struct rpc_clnt *new;
+    int err;

     new = kmalloc(sizeof(*new), GFP_KERNEL);
     if (!new)
 <at>  <at>  -242,6 +244,11  <at>  <at> 
     memcpy(new, clnt, sizeof(*new));
     atomic_set(&new->cl_count, 1);
     atomic_set(&new->cl_users, 0);
+    err = rpc_setup_pipedir(new, clnt->cl_program->pipe_dir_name);
+    if (err != 0) {
+        kfree(new);
+        return ERR_PTR(err);
+    }
     new->cl_parent = clnt;
     atomic_inc(&clnt->cl_count);
     /* Duplicate portmapper */
 <at>  <at>  -250,8 +257,6  <at>  <at> 
     new->cl_autobind = 0;
     new->cl_oneshot = 0;
     new->cl_dead = 0;
-    if (!IS_ERR(new->cl_dentry))
-        dget(new->cl_dentry);
     rpc_init_rtt(&new->cl_rtt_default, clnt->cl_xprt->timeout.to_initval);
     if (new->cl_auth)
         atomic_inc(&new->cl_auth->au_count);
 <at>  <at>  -313,12 +318,6  <at>  <at> 
         rpcauth_destroy(clnt->cl_auth);
         clnt->cl_auth = NULL;
     }
-    if (clnt->cl_parent != clnt) {
-        if (!IS_ERR(clnt->cl_dentry))
-            dput(clnt->cl_dentry);
-        rpc_destroy_client(clnt->cl_parent);
-        goto out_free;
-    }
     if (!IS_ERR(clnt->cl_dentry)) {
         rpc_rmdir(clnt->cl_dentry);
         rpc_put_mount();
 <at>  <at>  -327,6 +326,10  <at>  <at> 
         xprt_destroy(clnt->cl_xprt);
         clnt->cl_xprt = NULL;
     }
+    if (clnt->cl_parent != clnt) {
+        rpc_destroy_client(clnt->cl_parent);
+        goto out_free;
+    }
     if (clnt->cl_server != clnt->cl_inline_name)
         kfree(clnt->cl_server);
 out_free:

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
NFS maillist  -  NFS <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
Open Source | 20 Nov 2006 20:47
Picon
Favicon

Re: [NFS] "mount: File exists" when trying to mount a second krb5 volume!

Hi Trond,

I can confirm that I also see a crash with your patch file in place!
I'm not sure if that's because it didn't apply cleanly to begin with
and my massaging might have caused a problem.  I don't think
so though.

Basically if you mount a couple NFSv3+krb5 partitions and
then unmount one of them, the system locks up after about 2
seconds.  I didn't see this before since I didn't use the
automounter utility.

Thanks,
Paarvai

----- Original Message ----
From: Kostas Georgiou <k.georgiou <at> imperial.ac.uk>
To: Open Source <opensource3141 <at> yahoo.com>
Cc: Trond Myklebust <trond.myklebust <at> fys.uio.no>; nfs <at> lists.sourceforge.net; nfsv4 <at> linux-nfs.org
Sent: Saturday, November 18, 2006 7:15:04 AM
Subject: Re: [NFS] "mount: File exists" when trying to mount a second krb5 volume!

On Fri, Nov 17, 2006 at 11:59:25AM -0800, Open Source wrote:

> Thanks Trond.  Saving the patch did the trick.  I had
> to do some manual hacking to get the patch to
> apply because you must have done your diff
> against a different kernel tree revision.  I'm using
> 2.6.18 from FC5 updates.
> 
> Once I massaged things, the patch compiled and it
> works.  I am able to mount more than one partition
> with no problems now.  However, I cannot speak
> to the finer points (like memory leaks, etc.) since
> I don't know the code so well.  I trust someone else
> will independently verify it (i.e., code review) before
> it gets into the kernel tree.

I did the same with the FC6 2.6.18 kernel and while it does allow
me to have more than one mount from the server autofs decides that
my home is not in use any more and it unmounts it, somehow this
causes the system to freeze as well.

Nov 17 16:28:14 thufir automount[2483]: mount still busy /home
Nov 17 16:29:29 thufir automount[2483]: expiring path /home/georgiou
Nov 17 16:29:29 thufir automount[2483]: unmounting dir = /home/georgiou
Nov 17 16:29:32 thufir automount[2483]: expired /home/georgiou

Here is the patch with my changes to apply in FC6 which most likely is
bad since I really don't know the code at all :(

Kostas Georgiou

diff -u a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h
--- a/include/linux/sunrpc/clnt.h
+++ b/include/linux/sunrpc/clnt.h
 <at>  <at>  -64,6 +64,7  <at>  <at> 
     struct dentry *        cl_dentry;    /* inode */
     struct rpc_clnt *    cl_parent;    /* Points to parent of clones */
     struct rpc_rtt        cl_rtt_default;
+    struct rpc_program *    cl_program;
     struct rpc_portmap    cl_pmap_default;
     char            cl_inline_name[32];
 };
diff -u a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
 <at>  <at>  -154,6 +154,7  <at>  <at> 
     clnt->cl_prot     = xprt->prot;
     clnt->cl_stats    = program->stats;
     clnt->cl_metrics  = rpc_alloc_iostats(clnt);
+    clnt->cl_program  = program;
     rpc_init_wait_queue(&clnt->cl_pmap_default.pm_bindwait, "bindwait");

     if (!clnt->cl_port)
 <at>  <at>  -235,6 +236,7  <at>  <at> 
 rpc_clone_client(struct rpc_clnt *clnt)
 {
     struct rpc_clnt *new;
+    int err;

     new = kmalloc(sizeof(*new), GFP_KERNEL);
     if (!new)
 <at>  <at>  -242,6 +244,11  <at>  <at> 
     memcpy(new, clnt, sizeof(*new));
     atomic_set(&new->cl_count, 1);
     atomic_set(&new->cl_users, 0);
+    err = rpc_setup_pipedir(new, clnt->cl_program->pipe_dir_name);
+    if (err != 0) {
+        kfree(new);
+        return ERR_PTR(err);
+    }
     new->cl_parent = clnt;
     atomic_inc(&clnt->cl_count);
     /* Duplicate portmapper */
 <at>  <at>  -250,8 +257,6  <at>  <at> 
     new->cl_autobind = 0;
     new->cl_oneshot = 0;
     new->cl_dead = 0;
-    if (!IS_ERR(new->cl_dentry))
-        dget(new->cl_dentry);
     rpc_init_rtt(&new->cl_rtt_default, clnt->cl_xprt->timeout.to_initval);
     if (new->cl_auth)
         atomic_inc(&new->cl_auth->au_count);
 <at>  <at>  -313,12 +318,6  <at>  <at> 
         rpcauth_destroy(clnt->cl_auth);
         clnt->cl_auth = NULL;
     }
-    if (clnt->cl_parent != clnt) {
-        if (!IS_ERR(clnt->cl_dentry))
-            dput(clnt->cl_dentry);
-        rpc_destroy_client(clnt->cl_parent);
-        goto out_free;
-    }
     if (!IS_ERR(clnt->cl_dentry)) {
         rpc_rmdir(clnt->cl_dentry);
         rpc_put_mount();
 <at>  <at>  -327,6 +326,10  <at>  <at> 
         xprt_destroy(clnt->cl_xprt);
         clnt->cl_xprt = NULL;
     }
+    if (clnt->cl_parent != clnt) {
+        rpc_destroy_client(clnt->cl_parent);
+        goto out_free;
+    }
     if (clnt->cl_server != clnt->cl_inline_name)
         kfree(clnt->cl_server);
 out_free:
Trond Myklebust | 22 Nov 2006 21:43
Picon
Picon

Re: "mount: File exists" when trying to mount a second krb5 volume!

On Mon, 2006-11-20 at 11:47 -0800, Open Source wrote:
> Hi Trond,
> 
> I can confirm that I also see a crash with your patch file in place!
> I'm not sure if that's because it didn't apply cleanly to begin with
> and my massaging might have caused a problem.  I don't think
> so though.
> 
> Basically if you mount a couple NFSv3+krb5 partitions and
> then unmount one of them, the system locks up after about 2
> seconds.  I didn't see this before since I didn't use the
> automounter utility.

I'm unable to reproduce whether using the automounter or not. Can you be
a bit more specific about what hangs? Are you seeing an Oops or anything
like that?

Trond

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
NFS maillist  -  NFS <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

Paarvai Naai | 22 Nov 2006 23:43
Picon

Re: [NFS] "mount: File exists" when trying to mount a second krb5 volume!

Hi Trond,

I'm certain the problem is causing a crash on my machine.
When I am on the console and just do an umount the machine is okay
for about 2 seconds and then it crashes.  If I instead just try to do
/sbin/reboot then I see a big OOPS when the initscripts end up
unmounting the NFS filesystems, although it's hard to make sense
of it or write any info down at that point.

There is clearly something wrong but I'm starting to suspect it's
because the patch might not be appropriate for the kernels
that Kostas and I are using.  What version of the kernel (and
CITI patch, if applicable) are you making the patch against?
I'm using:

http://mirrors.kernel.org/fedora/core/updates/5/SRPMS/kernel-2.6.18-1.2200.fc5.src.rpm

Regards,
Paarvai


On 11/22/06, Trond Myklebust < trond.myklebust <at> fys.uio.no> wrote:
On Mon, 2006-11-20 at 11:47 -0800, Open Source wrote:
> Hi Trond,
>
> I can confirm that I also see a crash with your patch file in place!
> I'm not sure if that's because it didn't apply cleanly to begin with
> and my massaging might have caused a problem.  I don't think
> so though.
>
> Basically if you mount a couple NFSv3+krb5 partitions and
> then unmount one of them, the system locks up after about 2
> seconds.  I didn't see this before since I didn't use the
> automounter utility.

I'm unable to reproduce whether using the automounter or not. Can you be
a bit more specific about what hangs? Are you seeing an Oops or anything
like that?

Trond

_______________________________________________
NFSv4 mailing list
NFSv4 <at> linux-nfs.org
http://linux-nfs.org/cgi-bin/mailman/listinfo/nfsv4

_______________________________________________
NFSv4 mailing list
NFSv4 <at> linux-nfs.org
http://linux-nfs.org/cgi-bin/mailman/listinfo/nfsv4
Ian Kent | 27 Nov 2006 12:58
Favicon

Re: "mount: File exists" when trying to mount a second krb5 volume!

On Wed, 2006-11-22 at 14:43 -0800, Paarvai Naai wrote:
> Hi Trond,
> 
> I'm certain the problem is causing a crash on my machine.
> When I am on the console and just do an umount the machine is okay
> for about 2 seconds and then it crashes.  If I instead just try to do
> /sbin/reboot then I see a big OOPS when the initscripts end up 
> unmounting the NFS filesystems, although it's hard to make sense
> of it or write any info down at that point.

Doesn't it get logged.
syslog should shutdown after autofs and NFS.

Ian

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
NFS maillist  -  NFS <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

Paarvai Naai | 29 Nov 2006 04:50
Picon

Re: [NFS] "mount: File exists" when trying to mount a second krb5 volume!

Hi,

I bit the bullet and compiled 2.6.19-rc6 (which was a rather
frustrating experience for a number of unrelated reasons).  In
any case, I don't see the crash there.  Hence, I'm fairly confident
that the crash had to do with an incompatibility between the
patch and 2.6.18.

Now that the patch has been verified can we do something to
get it into 2.6.19 before the final release.  This is a very serious
bug that prevents people from using krb5 on a server with two
such exports.  It needs to be fixed!

Thanks again to all the help on this list.  Hopefully we can get this
thing into the upstream kernel ASAP.

Thoughts?

Paarvai


On 11/27/06, Ian Kent <raven <at> themaw.net> wrote:
On Wed, 2006-11-22 at 14:43 -0800, Paarvai Naai wrote:
> Hi Trond,
>
> I'm certain the problem is causing a crash on my machine.
> When I am on the console and just do an umount the machine is okay
> for about 2 seconds and then it crashes.  If I instead just try to do
> /sbin/reboot then I see a big OOPS when the initscripts end up
> unmounting the NFS filesystems, although it's hard to make sense
> of it or write any info down at that point.

Doesn't it get logged.
syslog should shutdown after autofs and NFS.

Ian



_______________________________________________
NFSv4 mailing list
NFSv4 <at> linux-nfs.org
http://linux-nfs.org/cgi-bin/mailman/listinfo/nfsv4
Paarvai Naai | 1 Dec 2006 19:34
Picon

Re: [NFS] "mount: File exists" when trying to mount a second krb5 volume!

Hi all,

I really do appreciate the high quality technical assistance
I have gotten to date from this list.  But at the same time,
I am getting somewhat frustrated with the very spotty
attention I am getting for a *critical* bug that somehow
made it into the upstream kernel sources.  This is directly
affecting the ability to use krb5 on either NFSv3 or NFSv4.

First I had to actually dig through the source and find the
bug.  Then I was offered a patch but when it didn't work
there was very little response/assistance to help with my
investigation into which kernel that patch is compatible with.
Finally, I have been insisting that we get the fix back into the
upstream sources and it appears that no one appreciates
the importance.

Can someone please help me attend to this?  I'm happy to
assist with open source projects, but given that I have other
industry responsibilities it's hard to stay totally on top of a
problem that never should have been mine to contend with.

Thanks for understanding.

Best regards,
Paarvai



On 11/28/06, Paarvai Naai <opensource3141 <at> gmail.com > wrote:
Hi,

I bit the bullet and compiled 2.6.19-rc6 (which was a rather
frustrating experience for a number of unrelated reasons).  In
any case, I don't see the crash there.  Hence, I'm fairly confident
that the crash had to do with an incompatibility between the
patch and 2.6.18.

Now that the patch has been verified can we do something to
get it into 2.6.19 before the final release.  This is a very serious
bug that prevents people from using krb5 on a server with two
such exports.  It needs to be fixed!

Thanks again to all the help on this list.  Hopefully we can get this
thing into the upstream kernel ASAP.

Thoughts?

Paarvai



On 11/27/06, Ian Kent <raven <at> themaw.net> wrote:
On Wed, 2006-11-22 at 14:43 -0800, Paarvai Naai wrote:
> Hi Trond,
>
> I'm certain the problem is causing a crash on my machine.
> When I am on the console and just do an umount the machine is okay
> for about 2 seconds and then it crashes.  If I instead just try to do
> /sbin/reboot then I see a big OOPS when the initscripts end up
> unmounting the NFS filesystems, although it's hard to make sense
> of it or write any info down at that point.

Doesn't it get logged.
syslog should shutdown after autofs and NFS.

Ian




_______________________________________________
NFSv4 mailing list
NFSv4 <at> linux-nfs.org
http://linux-nfs.org/cgi-bin/mailman/listinfo/nfsv4
Trond Myklebust | 1 Dec 2006 19:43
Picon
Picon

Re: [NFS] "mount: File exists" when trying to mount a second krb5 volume!

On Fri, 2006-12-01 at 10:34 -0800, Paarvai Naai wrote:
> Hi all,
> 
> I really do appreciate the high quality technical assistance
> I have gotten to date from this list.  But at the same time,
> I am getting somewhat frustrated with the very spotty
> attention I am getting for a *critical* bug that somehow 
> made it into the upstream kernel sources.  This is directly
> affecting the ability to use krb5 on either NFSv3 or NFSv4.
> 
> First I had to actually dig through the source and find the
> bug.  Then I was offered a patch but when it didn't work 
> there was very little response/assistance to help with my
> investigation into which kernel that patch is compatible with.
> Finally, I have been insisting that we get the fix back into the
> upstream sources and it appears that no one appreciates 
> the importance.

2.6.19 is already out (and by the time this bug was found, the 2.6.19-rc
series was way into injury time).

The patch will go into 2.6.20, then we can look into sending it in as a
stable update to 2.6.19.x. Not before.

Trond
Paarvai Naai | 1 Dec 2006 20:04
Picon

Re: [NFS] "mount: File exists" when trying to mount a second krb5 volume!

Thank you for your quick response.  I'm not too familiar with the
term "injury time" and the like.  But regardless, what is the
purpose of a rc series if we can't get an important bug fix into it.

Here's what I propose and I am happy to help facilitate to
some degree.  We should definitely get it into 2.6.19.x ASAP
and obviously into 2.6.20.  And Fedora often adds extra
patches into their source RPMs.  This is the most important
for my company.  Even if we don't have it in 2.6.19 vanilla,
if I had a "certified" patch from you, we can try to take it
to Fedora and get it into their source RPM.

Thoughts?

Thanks,
Paarvai




On 12/1/06, Trond Myklebust <trond.myklebust <at> fys.uio.no> wrote:
On Fri, 2006-12-01 at 10:34 -0800, Paarvai Naai wrote:
> Hi all,
>
> I really do appreciate the high quality technical assistance
> I have gotten to date from this list.  But at the same time,
> I am getting somewhat frustrated with the very spotty
> attention I am getting for a *critical* bug that somehow
> made it into the upstream kernel sources.  This is directly
> affecting the ability to use krb5 on either NFSv3 or NFSv4.
>
> First I had to actually dig through the source and find the
> bug.  Then I was offered a patch but when it didn't work
> there was very little response/assistance to help with my
> investigation into which kernel that patch is compatible with.
> Finally, I have been insisting that we get the fix back into the
> upstream sources and it appears that no one appreciates
> the importance.

2.6.19 is already out (and by the time this bug was found, the 2.6.19-rc
series was way into injury time).

The patch will go into 2.6.20, then we can look into sending it in as a
stable update to 2.6.19.x. Not before.

Trond


_______________________________________________
NFSv4 mailing list
NFSv4 <at> linux-nfs.org
http://linux-nfs.org/cgi-bin/mailman/listinfo/nfsv4
Open Source | 16 Nov 2006 16:45
Picon
Favicon

Re: [NFS] "mount: File exists" when trying to mount a second krb5 volume!

Hi Kostas,

Understood.  But from what I know, usually people only
mount one pseudofilesystem from an nfsv4 server
onto their client.  I think that's why many people
haven't seen this problem with nfsv4+krb5!

Paarvai

----- Original Message ----
From: Kostas Georgiou <k.georgiou <at> imperial.ac.uk>
To: Open Source <opensource3141 <at> yahoo.com>
Cc: nfsv4 <at> linux-nfs.org; nfs <at> lists.sourceforge.net
Sent: Thursday, November 16, 2006 7:35:28 AM
Subject: Re: [NFS] "mount: File exists" when trying to mount a second krb5 volume!

On Wed, Nov 15, 2006 at 06:31:17PM -0800, Open Source wrote:

....

> This bug does not exist under 2.6.17 since client directories
> in /var/lib/nfs/rpc_pipefs/nfs are not reused across different
> nfsv3+krb5 mounts to the same server.

For the record I have the same problem with nfs4+krb5 in 2.6.18
so it's not just nfs3.

Kostas

Gmane