Boaz Harrosh | 25 May 12:12
Favicon
Gravatar

BUG: At key_instantiate_and_link+0x2e/0xa0

I got the below on a 3.4-rc7 based Benny's pnfs tree.

During normal nfs4 only operations. (Just my development trees mounted on client machine)

If it will happen again I will investigate. I'll leave it off for now (busy with other stuff)

Just wanted to know if it might have already been fix or seen by someone else

[ 3830.441139] BUG: unable to handle kernel NULL pointer dereference at 0000000000000078
[ 3830.442024] IP: [<ffffffff812894ce>] key_instantiate_and_link+0x2e/0xa0
[ 3830.442024] PGD 0 
[ 3830.442024] Oops: 0000 [#1] SMP 
[ 3830.442024] CPU 1 
[ 3830.442024] Modules linked in: osd libosd nfsd nfs lockd fscache auth_rpcgss nfs_acl sunrpc
ip6t_REJECT be2iscsi nf_conntrack_ipv6 nf_defrag_ipv6 iscsi_boot_sysfs xt_state bnx2i
nf_conntrack cnic uio cxgb3i libcxgbi cxgb3 mdio ip6table_filter ib_iser rdma_cm ib_cm iw_cm ib_sa
ib_mad ib_core ib_addr ip6_tables iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi joydev
virtio_balloon i2c_piix4 i2c_core pcspkr virtio_net microcode floppy virtio_blk [last unloaded: libosd]
[ 3830.442024] 
[ 3830.442024] Pid: 1288, comm: rpc.idmapd Not tainted 3.4.0-rc7-pnfs+ #50 Bochs Bochs
[ 3830.442024] RIP: 0010:[<ffffffff812894ce>]  [<ffffffff812894ce>] key_instantiate_and_link+0x2e/0xa0
[ 3830.442024] RSP: 0018:ffff88003a327d98  EFLAGS: 00010286
[ 3830.442024] RAX: 0000000000000002 RBX: 0000000000000000 RCX: ffff8800378579c0
[ 3830.442024] RDX: 0000000000000003 RSI: ffff88003a327e75 RDI: 0000000000000000
[ 3830.442024] RBP: ffff88003a327dd8 R08: ffff88003a26a9c0 R09: 000000000000fffd
[ 3830.442024] R10: 000000000000000a R11: 0000000000000246 R12: ffff8800378579c0
[ 3830.442024] R13: 0000000000000003 R14: ffff88003a327e75 R15: ffff88003a26a9c0
[ 3830.442024] FS:  00007f8c539d1720(0000) GS:ffff88003e500000(0000) knlGS:0000000000000000
[ 3830.442024] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 3830.442024] CR2: 0000000000000078 CR3: 00000000379fe000 CR4: 00000000000006e0
(Continue reading)

Michael Tokarev | 25 May 08:53
Picon

3.0+ NFS issues

Hello.

I updated my nfs server machine to kernel 3.0, and
noticed that its main usage become, well, problematic.

While trying to dig deeper, I also found a few other
interesting issues, which are mentioned below.

But first thing first: nfs.

i686pae kernel, lots of RAM, Atom-based (cedar trail)
machine with usual rtl8169 NIC.  3.0 or 3.2 kernel
(I will try current 3.4 but I don't have much hopes
there).  NFSv4.

When a client machine (also 3.0 kernel) does some reading,
the process often stalls somewhere in the read syscall,
or, rarer, during close, for up to two MINUTES.  During
this time, the client (kernel) reports "NFS server <foo>
does not respond" several times, and finally "NFS server
<foo> ok", client process "unstucks" from the read(2),
and is able to perform a few more reads till the whole
thing repeats.

While this happens, ie, while the client process is stuck,
any access to the mounted filesystem results in an
uninterruptible sleep - all processes including the
initial client are unkillable.  This is very annoying,
but I was never able to fix this, including the real
case when the server becomes unreachable - "intr" mount
(Continue reading)

Picon

[PATCH 1/2] nfs4.1: add BIND_CONN_TO_SESSION operation

This patch adds the BIND_CONN_TO_SESSION operation which is needed for
upcoming SP4_MACH_CRED work and useful for recovering from broken connections
without destroying the session.

Signed-off-by: Weston Andros Adamson <dros@...>
---
Updated with comment from Trond

 fs/nfs/nfs4_fs.h        |    1 +
 fs/nfs/nfs4proc.c       |   54 ++++++++++++++++++++++++++
 fs/nfs/nfs4xdr.c        |   95 +++++++++++++++++++++++++++++++++++++++++++++++
 include/linux/nfs4.h    |    5 ++
 include/linux/nfs_xdr.h |    6 +++
 5 files changed, 161 insertions(+), 0 deletions(-)

diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h
index edeef71..ad90bc7 100644
--- a/fs/nfs/nfs4_fs.h
+++ b/fs/nfs/nfs4_fs.h
@@ -215,6 +215,7 @@ struct vfsmount *nfs4_submount(struct nfs_server *, struct dentry *,
 extern int nfs4_proc_setclientid(struct nfs_client *, u32, unsigned short, struct rpc_cred *, struct
nfs4_setclientid_res *);
 extern int nfs4_proc_setclientid_confirm(struct nfs_client *, struct nfs4_setclientid_res *arg,
struct rpc_cred *);
 extern int nfs4_proc_get_rootfh(struct nfs_server *, struct nfs_fh *, struct nfs_fsinfo *);
+extern int nfs4_proc_bind_conn_to_session(struct nfs_client *);
 extern int nfs4_proc_exchange_id(struct nfs_client *clp, struct rpc_cred *cred);
 extern int nfs4_init_clientid(struct nfs_client *, struct rpc_cred *);
 extern int nfs41_init_clientid(struct nfs_client *, struct rpc_cred *);
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
(Continue reading)

Picon

[PATCH 1/2] nfsd: add fault injection for CB_PATH_DOWN

This fault injection hook causes all SEQUENCE operation replies to have the
SEQ4_STATUS_CB_PATH_DOWN flag set until the client calls BIND_CONN_TO_SESSION
or creates a new session.

Signed-off-by: Weston Andros Adamson <dros@...>
---
 fs/nfsd/fault_inject.c |    4 ++++
 fs/nfsd/fault_inject.h |    2 ++
 fs/nfsd/nfs4state.c    |   20 ++++++++++++++++++++
 3 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/fs/nfsd/fault_inject.c b/fs/nfsd/fault_inject.c
index e6c3815..ab81144 100644
--- a/fs/nfsd/fault_inject.c
+++ b/fs/nfsd/fault_inject.c
@@ -38,6 +38,10 @@ static struct nfsd_fault_inject_op inject_ops[] = {
 		.file   = "recall_delegations",
 		.func   = nfsd_recall_delegations,
 	},
+	{
+		.file   = "kill_backchannel",
+		.func   = nfsd_kill_backchannel,
+	},
 };

 static long int NUM_INJECT_OPS = sizeof(inject_ops) / sizeof(struct nfsd_fault_inject_op);
diff --git a/fs/nfsd/fault_inject.h b/fs/nfsd/fault_inject.h
index 90bd057..b058e03 100644
--- a/fs/nfsd/fault_inject.h
+++ b/fs/nfsd/fault_inject.h
(Continue reading)

Chuck Lever | 24 May 21:29
Picon
Favicon

[PATCH] NFSD: TEST_STATEID should not return NFS4ERR_STALE_STATEID

The error values that TEST_STATEID is allowed to return does not
include NFS4ERR_STALE_STATEID.  In addition, RFC 5661 says:

15.1.16.5.  NFS4ERR_STALE_STATEID (Error Code 10023)

   A stateid generated by an earlier server instance was used.  This
   error is moot in NFSv4.1 because all operations that take a stateid
   MUST be preceded by the SEQUENCE operation, and the earlier server
   instance is detected by the session infrastructure that supports
   SEQUENCE.

I triggered the NFS4ERR_STALE_STATEID during nograce recovery testing.
My client had updated its boot verifier, so the server instance hadn't
changed, but the client instance had.  Thus the server allowed the
SEQUENCE operation, but returned NFS4ERR_STALE_STATEID on the
TEST_STATEID operation.

After a client's lease expires, TEST_STATEID should report
NFS4ERR_EXPIRED for state IDs that the client tries to recover.  I
don't see a way to make that happen, though.

Finally, RFC 5661, section 18.48.3 has this:

 o  Special stateids are always considered invalid (they result in the
    error code NFS4ERR_BAD_STATEID).

Signed-off-by: Chuck Lever <chuck.lever@...>
---

Bruce, would you consider taking something like this?
(Continue reading)

Picon

[PATCH 1/2] nfs4.1: add BIND_CONN_TO_SESSION operation

This patch adds the BIND_CONN_TO_SESSION operation which is needed for
upcoming SP4_MACH_CRED work and useful for recovering from broken connections
without destroying the session.

Signed-off-by: Weston Andros Adamson <dros@...>
---
Reposted with changes addressing Chuck's comments.

 fs/nfs/nfs4_fs.h        |    1 +
 fs/nfs/nfs4proc.c       |   54 ++++++++++++++++++++++++++
 fs/nfs/nfs4xdr.c        |   95 +++++++++++++++++++++++++++++++++++++++++++++++
 include/linux/nfs4.h    |    5 ++
 include/linux/nfs_xdr.h |    6 +++
 5 files changed, 161 insertions(+), 0 deletions(-)

diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h
index edeef71..ad90bc7 100644
--- a/fs/nfs/nfs4_fs.h
+++ b/fs/nfs/nfs4_fs.h
@@ -215,6 +215,7 @@ struct vfsmount *nfs4_submount(struct nfs_server *, struct dentry *,
 extern int nfs4_proc_setclientid(struct nfs_client *, u32, unsigned short, struct rpc_cred *, struct
nfs4_setclientid_res *);
 extern int nfs4_proc_setclientid_confirm(struct nfs_client *, struct nfs4_setclientid_res *arg,
struct rpc_cred *);
 extern int nfs4_proc_get_rootfh(struct nfs_server *, struct nfs_fh *, struct nfs_fsinfo *);
+extern int nfs4_proc_bind_conn_to_session(struct nfs_client *);
 extern int nfs4_proc_exchange_id(struct nfs_client *clp, struct rpc_cred *cred);
 extern int nfs4_init_clientid(struct nfs_client *, struct rpc_cred *);
 extern int nfs41_init_clientid(struct nfs_client *, struct rpc_cred *);
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
(Continue reading)

andros | 24 May 19:13
Picon

[PATCH 0/4] NFSv4.1 add nfs_inode book keeping for mdsthreshold

From: Andy Adamson <andros@...>

Only resending NFSv4.1 add nfs_inode book keeping for mdsthreshold. 
Responded to Trond's comments.
I have not tested the directio nor the memmap io cases. The regular file
i/o works as intended.

Andy Adamson (4):
  NFSv4.1 mdsthreshold attribute xdr
  NFSv4.1 cache mdsthreshold values on OPEN
  NFSv4.1 add nfs_inode book keeping for mdsthreshold
  NFSv4.1 test the mdsthreshold hint parameters

 fs/nfs/direct.c         |    2 +
 fs/nfs/file.c           |    1 +
 fs/nfs/inode.c          |    4 ++
 fs/nfs/nfs4proc.c       |   38 ++++++++++++--
 fs/nfs/nfs4xdr.c        |  125 ++++++++++++++++++++++++++++++++++++++++++++++-
 fs/nfs/pnfs.c           |   94 +++++++++++++++++++++++++++++++++++
 fs/nfs/pnfs.h           |   21 ++++++++
 fs/nfs/read.c           |    2 +
 include/linux/nfs4.h    |    7 +++
 include/linux/nfs_fs.h  |    4 ++
 include/linux/nfs_xdr.h |   10 ++++
 11 files changed, 301 insertions(+), 7 deletions(-)

--

-- 
1.7.7.6

--
(Continue reading)

Picon

[PATCH 1/2] nfs4.1: add BIND_CONN_TO_SESSION operation

This patch adds the BIND_CONN_TO_SESSION operation which is needed for
upcoming SP4_MACH_CRED work and useful for recovering from broken connections
without destroying the session.

Signed-off-by: Weston Andros Adamson <dros@...>
---
 fs/nfs/nfs4_fs.h        |    1 +
 fs/nfs/nfs4proc.c       |   54 ++++++++++++++++++++++++++++
 fs/nfs/nfs4xdr.c        |   90 +++++++++++++++++++++++++++++++++++++++++++++++
 include/linux/nfs4.h    |    5 +++
 include/linux/nfs_xdr.h |    6 +++
 5 files changed, 156 insertions(+), 0 deletions(-)

diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h
index edeef71..ad90bc7 100644
--- a/fs/nfs/nfs4_fs.h
+++ b/fs/nfs/nfs4_fs.h
@@ -215,6 +215,7 @@ struct vfsmount *nfs4_submount(struct nfs_server *, struct dentry *,
 extern int nfs4_proc_setclientid(struct nfs_client *, u32, unsigned short, struct rpc_cred *, struct
nfs4_setclientid_res *);
 extern int nfs4_proc_setclientid_confirm(struct nfs_client *, struct nfs4_setclientid_res *arg,
struct rpc_cred *);
 extern int nfs4_proc_get_rootfh(struct nfs_server *, struct nfs_fh *, struct nfs_fsinfo *);
+extern int nfs4_proc_bind_conn_to_session(struct nfs_client *);
 extern int nfs4_proc_exchange_id(struct nfs_client *clp, struct rpc_cred *cred);
 extern int nfs4_init_clientid(struct nfs_client *, struct rpc_cred *);
 extern int nfs41_init_clientid(struct nfs_client *, struct rpc_cred *);
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 78784e5..7a4b320 100644
--- a/fs/nfs/nfs4proc.c
(Continue reading)

Steve Dickson | 24 May 12:56
Picon
Favicon

Linux pNFS status meeting 05/24/12

Time: 9:30 AM PST (12:30 PM EST)

The call in numbers are:
U.S. and Canada: (800) 451-8679
International dial-in number: (212) 729-5016
Israel Toll-Free: 1-809-462-557
Conference code: 564.272.1552
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@...
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Stanislav Kinsbursky | 24 May 12:15
Favicon

[PATCH v2] NFSd: set nfsd_serv to NULL after service destruction

v2:
1) Set global nfsd_serv pointer to NULL only if no running threads left.

Otherwise we will get NULL pointer dereference.

Signed-off-by: Stanislav Kinsbursky <skinsbursky@...>
---
 fs/nfsd/nfsctl.c |    8 ++------
 fs/nfsd/nfsd.h   |   11 +++++++++++
 fs/nfsd/nfssvc.c |   24 ++++++++----------------
 3 files changed, 21 insertions(+), 22 deletions(-)

diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
index c55298e..fa49cff 100644
--- a/fs/nfsd/nfsctl.c
+++ b/fs/nfsd/nfsctl.c
@@ -673,9 +673,7 @@ static ssize_t __write_ports_addfd(char *buf)

 	err = svc_addsock(nfsd_serv, fd, buf, SIMPLE_TRANSACTION_LIMIT);
 	if (err < 0) {
-		if (nfsd_serv->sv_nrthreads == 1)
-			svc_shutdown_net(nfsd_serv, net);
-		svc_destroy(nfsd_serv);
+		nfsd_destroy(net);
 		return err;
 	}

@@ -744,9 +742,7 @@ out_close:
 		svc_xprt_put(xprt);
 	}
(Continue reading)

Boaz Harrosh | 24 May 02:16
Favicon
Gravatar

Does our Kernel PNFSD-Server supports recurring layout_get with open_state_id


Benny hi

If I remember/understand correctly, there is a mode in the RFC errata
about the layout forgetful-model and a client sending a layout_get with
an open_state_id after he already had previous state (layouts) on the file.

As I understood this is an indication to the server that client has
"forgotten" all it's layouts on a file, and Server can assume their
return.

Is my understanding correct?

If Yes:
	Did we implement the internal return of all layouts, if above
	open_state_id is encountered?
	I thought we did but I can't find this code.

Currently, I always set ROC so there is no leak. But theoretically
ROC does not have to be set. I'm doing some heavy lifting of
layout_return, and I want to make sure I have not missed a spot.

If I'm correct that it is needed, and it's missing:
My suggestion for now is that we always set ROC, disregarding FS so not to
leak layouts and therefor inode-refs, until such time that we implement it.

Thanks
Boaz
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
(Continue reading)


Gmane