Skip to contentSkip to conversation

"svc: unknown version (3)" when CONFIG_NFSD_V4=y

DISCUSSION Fengguang Wu 4 participants 13 messages Jan 5, 2007 – Jan 14, 2007 5 messages not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Hi Neil,

NFS mounting succeeded, but the kernel gives a warning. I'm running 2.6.20-rc2-mm1.

# mount -o vers=3 localhost:/suse /mnt
[  689.651606] svc: unknown version (3)
# mount | grep suse
localhost:/suse on /mnt type nfs (rw,nfsvers=3,addr=127.0.0.1)

Any clues about it?

Short .config:

#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.20-rc2-mm1
# Thu Jan 4 15:55:02 2007
#
CONFIG_X86_64=y
CONFIG_64BIT=y
CONFIG_X86=y

......

#
# Network File Systems
#
CONFIG_NFS_FS=m
CONFIG_NFS_V3=y
CONFIG_NFS_V3_ACL=y
# CONFIG_NFS_V4 is not set
CONFIG_NFS_DIRECTIO=y
CONFIG_NFSD=m
CONFIG_NFSD_V2_ACL=y
CONFIG_NFSD_V3=y
CONFIG_NFSD_V3_ACL=y
CONFIG_NFSD_V4=y
CONFIG_NFSD_TCP=y
CONFIG_LOCKD=m
CONFIG_LOCKD_V4=y
CONFIG_EXPORTFS=m
CONFIG_NFS_ACL_SUPPORT=m
CONFIG_NFS_COMMON=y
CONFIG_SUNRPC=m
CONFIG_SUNRPC_GSS=m
CONFIG_RPCSEC_GSS_KRB5=m
CONFIG_RPCSEC_GSS_SPKM3=m
CONFIG_SMB_FS=m
# CONFIG_SMB_NLS_DEFAULT is not set
CONFIG_CIFS=m
CONFIG_CIFS_STATS=y
# CONFIG_CIFS_STATS2 is not set
# CONFIG_CIFS_WEAK_PW_HASH is not set
CONFIG_CIFS_XATTR=y
CONFIG_CIFS_POSIX=y
# CONFIG_CIFS_DEBUG2 is not set
# CONFIG_CIFS_EXPERIMENTAL is not set
# CONFIG_NCP_FS is not set
# CONFIG_CODA_FS is not set
# CONFIG_AFS_FS is not set
CONFIG_9P_FS=m

......

Thanks,
Wu

#2 lore raw
In reply to a message not in the archive
Quoted 9 lines · Fengguang Wu

Hi Neil,

NFS mounting succeeded, but the kernel gives a warning. I'm running 2.6.20-rc2-mm1.

# mount -o vers=3 localhost:/suse /mnt
[  689.651606] svc: unknown version (3)
# mount | grep suse
localhost:/suse on /mnt type nfs (rw,nfsvers=3,addr=127.0.0.1)

Are you perhaps running the userland NFS server instead of knfsd? The former will only support NFSv2.

Trond

#3 lore raw
Quoted 6 lines · Trond Myklebust
Quoted 5 lines · Fengguang Wu

Hi Neil,

NFS mounting succeeded, but the kernel gives a warning. I'm running 2.6.20-rc2-mm1.

Quoted 7 lines
Quoted 4 lines
# mount -o vers=3 localhost:/suse /mnt
[  689.651606] svc: unknown version (3)
# mount | grep suse
localhost:/suse on /mnt type nfs (rw,nfsvers=3,addr=127.0.0.1)

Are you perhaps running the userland NFS server instead of knfsd? The former will only support NFSv2.

I'm running kernel nfs servers:

USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root      5451  0.0  0.0      0     0 ?        S    19:30   0:00 [nfsd]
root      5452  0.0  0.0      0     0 ?        S    19:30   0:00 [nfsd]
root      5453  0.0  0.0      0     0 ?        S    19:30   0:00 [nfsd]
root      5454  0.0  0.0      0     0 ?        S    19:30   0:00 [nfsd]
root      5455  0.0  0.0      0     0 ?        S    19:30   0:00 [nfsd]
root      5456  0.0  0.0      0     0 ?        S    19:30   0:00 [nfsd]
root      5457  0.0  0.0      0     0 ?        S    19:30   0:00 [nfsd]
root      5458  0.0  0.0      0     0 ?        S    19:30   0:00 [nfsd]
root      5449  0.0  0.0      0     0 ?        S<   19:30   0:00 [rpciod/0]
root      5450  0.0  0.0      0     0 ?        S<   19:30   0:00 [rpciod/1]
root      5462  0.0  0.0   7940   672 ?        Ss   19:30   0:00 /usr/sbin/rpc.mountd
statd     5527  0.0  0.0   7892  1084 ?        Ss   19:30   0:00 /sbin/rpc.statd
root      5538  0.0  0.0  23168   764 ?        Ss   19:30   0:00 /usr/sbin/rpc.idmapd

My system is Debian etch. And I just found that CONFIG_NFSD_V4 is irrelevant, the message remains even if it is disabled. I'll check more kernel versions.

Thanks,
Wu

#4 lore raw
In reply to a message not in the archive
Quoted 11 lines · On Friday January 5, [email protected] wrote:

Hi Neil,

NFS mounting succeeded, but the kernel gives a warning. I'm running 2.6.20-rc2-mm1.

# mount -o vers=3 localhost:/suse /mnt
[  689.651606] svc: unknown version (3)
# mount | grep suse
localhost:/suse on /mnt type nfs (rw,nfsvers=3,addr=127.0.0.1)

Any clues about it?

Weird.

Please try this patch. It should provide more useful information.

NeilBrown

### Diffstat output

 ./net/sunrpc/svc.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
net/sunrpc/svc.c +2 -1
diff .prev/net/sunrpc/svc.c ./net/sunrpc/svc.c
@@ -910,7 +910,8 @@ err_bad_prog:
 
 err_bad_vers:
 #ifdef RPC_PARANOIA
-	printk("svc: unknown version (%d)\n", vers);
+	printk("svc: unknown version (%d for prog %d, %s)\n", 
+	       vers, prog, progp->pg_name);
 #endif
 	serv->sv_stats->rpcbadfmt++;
 	svc_putnl(resv, RPC_PROG_MISMATCH);
#5 lore raw
Quoted 29 lines · Neil Brown
Quoted 11 lines · On Friday January 5, [email protected] wrote:

Hi Neil,

NFS mounting succeeded, but the kernel gives a warning. I'm running 2.6.20-rc2-mm1.

# mount -o vers=3 localhost:/suse /mnt
[  689.651606] svc: unknown version (3)
# mount | grep suse
localhost:/suse on /mnt type nfs (rw,nfsvers=3,addr=127.0.0.1)

Any clues about it?

Weird.

Please try this patch. It should provide more useful information.

NeilBrown

### Diffstat output

 ./net/sunrpc/svc.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff .prev/net/sunrpc/svc.c ./net/sunrpc/svc.c

net/sunrpc/svc.c err_bad_prog: · line 917

Quoted 9 lines
net/sunrpc/svc.c +2 -1
@@ -910,7 +910,8 @@ err_bad_prog:
 
 err_bad_vers:
 #ifdef RPC_PARANOIA
-	printk("svc: unknown version (%d)\n", vers);
+	printk("svc: unknown version (%d for prog %d, %s)\n", 
+	       vers, prog, progp->pg_name);
 #endif
 	serv->sv_stats->rpcbadfmt++;
 	svc_putnl(resv, RPC_PROG_MISMATCH);

root ~# mount localhost:/suse /mnt

[  132.678204] svc: unknown version (3 for prog 100227, nfsd)

I've confirmed that 2.6.20-rc2-mm1, 2.6.20-rc3-mm1, 2.6.19-rc6-mm1 all have this warning, while 2.6.17-2-amd64 is good.

Thanks,
Wu

#6 lore raw
Quoted 5 lines · Fengguang Wu <fengguang.wu <at> gmail.com> writes:

root ~# mount localhost:/suse /mnt

[  132.678204] svc: unknown version (3 for prog 100227, nfsd)

I've confirmed that 2.6.20-rc2-mm1, 2.6.20-rc3-mm1, 2.6.19-rc6-mm1 all have this warning, while 2.6.17-2-amd64 is good.

I get the same log messages here with 2.6.19. I also noticed the following messages when starting rpc.nfsd:

nfsd[1287]: nfssvc: writting fds to kernel failed: errno 0 (Success) nfsd[1287]: nfssvc: writting fds to kernel failed: errno 0 (Success)

These messages appeared with kernel 2.6.19 too. I however don't know if this could be related to the other messages.
I use nfs-utils 1.0.10 on Debian Etch.

Arnaud Giersch

#8 lore raw
In reply to a message not in the archive
Quoted 6 lines · On Wednesday January 10, [email protected] wrote:

root ~# mount localhost:/suse /mnt

[  132.678204] svc: unknown version (3 for prog 100227, nfsd)

I've confirmed that 2.6.20-rc2-mm1, 2.6.20-rc3-mm1, 2.6.19-rc6-mm1 all have this warning, while 2.6.17-2-amd64 is good.

Thanks. That helps a lot.

This patch should help too. Please let me know.

NeilBrown

### Diffstat output

 ./fs/nfsd/nfssvc.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
fs/nfsd/nfssvc.c +3 -3
diff .prev/fs/nfsd/nfssvc.c ./fs/nfsd/nfssvc.c
@@ -72,7 +72,7 @@ static struct svc_program	nfsd_acl_progr
 	.pg_prog		= NFS_ACL_PROGRAM,
 	.pg_nvers		= NFSD_ACL_NRVERS,
 	.pg_vers		= nfsd_acl_versions,
-	.pg_name		= "nfsd",
+	.pg_name		= "nfsacl",
 	.pg_class		= "nfsd",
 	.pg_stats		= &nfsd_acl_svcstats,
 	.pg_authenticate	= &svc_set_client,
@@ -121,13 +121,13 @@ int nfsd_vers(int vers, enum vers_op cha
 		break;
 #if defined(CONFIG_NFSD_V2_ACL) || defined(CONFIG_NFSD_V3_ACL)
 		if (vers < NFSD_ACL_NRVERS)
-			nfsd_acl_version[vers] = nfsd_acl_version[vers];
+			nfsd_acl_versions[vers] = nfsd_acl_version[vers];
 #endif
 	case NFSD_CLEAR:
 		nfsd_versions[vers] = NULL;
 #if defined(CONFIG_NFSD_V2_ACL) || defined(CONFIG_NFSD_V3_ACL)
 		if (vers < NFSD_ACL_NRVERS)
-			nfsd_acl_version[vers] = NULL;
+			nfsd_acl_versions[vers] = NULL;
 #endif
 		break;
 	case NFSD_TEST:
#9 lore raw

Neil,

Quoted 11 lines · Neil Brown
Quoted 6 lines · On Wednesday January 10, [email protected] wrote:

root ~# mount localhost:/suse /mnt

[  132.678204] svc: unknown version (3 for prog 100227, nfsd)

I've confirmed that 2.6.20-rc2-mm1, 2.6.20-rc3-mm1, 2.6.19-rc6-mm1 all have this warning, while 2.6.17-2-amd64 is good.

Thanks. That helps a lot.

This patch should help too. Please let me know.

# mount localhost:/suse /mnt
[ 2058.438236] svc: unknown version (3 for prog 100227, nfsd)
# pss nfs
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root      5488  0.0  0.0      0     0 ?        S    22:16   0:00 [nfsd]
root      5489  0.0  0.0      0     0 ?        S    22:16   0:00 [nfsd]
root      5490  0.0  0.0      0     0 ?        S    22:16   0:00 [nfsd]
root      5491  0.0  0.0      0     0 ?        S    22:16   0:00 [nfsd]
root      5492  0.0  0.0      0     0 ?        S    22:16   0:00 [nfsd]
root      5493  0.0  0.0      0     0 ?        S    22:16   0:00 [nfsd]
root      5494  0.0  0.0      0     0 ?        S    22:16   0:00 [nfsd]
root      5495  0.0  0.0      0     0 ?        S    22:16   0:00 [nfsd]
# pss rpc
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root      5486  0.0  0.0      0     0 ?        S<   22:16   0:00 [rpciod/0]
root      5487  0.0  0.0      0     0 ?        S<   22:16   0:00 [rpciod/1]
root      5499  0.0  0.0   7944   668 ?        Ss   22:16   0:00 /usr/sbin/rpc.mountd
statd     5567  0.0  0.0   7892  1084 ?        Ss   22:16   0:00 /sbin/rpc.statd
root      5578  0.0  0.0  23180   652 ?        Ss   22:16   0:00 /usr/sbin/rpc.idmapd

Thanks,
Wu

Quoted 35 lines

### Diffstat output

 ./fs/nfsd/nfssvc.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff .prev/fs/nfsd/nfssvc.c ./fs/nfsd/nfssvc.c

fs/nfsd/nfssvc.c +3 -3
@@ -72,7 +72,7 @@ static struct svc_program	nfsd_acl_progr
 	.pg_prog		= NFS_ACL_PROGRAM,
 	.pg_nvers		= NFSD_ACL_NRVERS,
 	.pg_vers		= nfsd_acl_versions,
-	.pg_name		= "nfsd",
+	.pg_name		= "nfsacl",
 	.pg_class		= "nfsd",
 	.pg_stats		= &nfsd_acl_svcstats,
 	.pg_authenticate	= &svc_set_client,
@@ -121,13 +121,13 @@ int nfsd_vers(int vers, enum vers_op cha
 		break;
 #if defined(CONFIG_NFSD_V2_ACL) || defined(CONFIG_NFSD_V3_ACL)
 		if (vers < NFSD_ACL_NRVERS)
-			nfsd_acl_version[vers] = nfsd_acl_version[vers];
+			nfsd_acl_versions[vers] = nfsd_acl_version[vers];
 #endif
 	case NFSD_CLEAR:
 		nfsd_versions[vers] = NULL;
 #if defined(CONFIG_NFSD_V2_ACL) || defined(CONFIG_NFSD_V3_ACL)
 		if (vers < NFSD_ACL_NRVERS)
-			nfsd_acl_version[vers] = NULL;
+			nfsd_acl_versions[vers] = NULL;
 #endif
 		break;
 	case NFSD_TEST:
#11 lore raw
In reply to a message not in the archive
Quoted 11 lines · On Thursday January 11, [email protected] wrote:

Neil,

Quoted 8 lines · Neil Brown
Quoted 6 lines · On Wednesday January 10, [email protected] wrote:

root ~# mount localhost:/suse /mnt

[  132.678204] svc: unknown version (3 for prog 100227, nfsd)

I've confirmed that 2.6.20-rc2-mm1, 2.6.20-rc3-mm1, 2.6.19-rc6-mm1 all have this warning, while 2.6.17-2-amd64 is good.

Quoted 6 lines
Quoted 3 lines

Thanks. That helps a lot.

This patch should help too. Please let me know.

# mount localhost:/suse /mnt
[ 2058.438236] svc: unknown version (3 for prog 100227, nfsd)

Are you really really double-plus sure that you are running a kernel with the patch applied?
Because at the very least it should have changed the message to

Quoted 1 line
[ 2058.438236] svc: unknown version (3 for prog 100227, nfsacl)

NeilBrown

#12 lore raw
Quoted 14 lines · Neil Brown
Quoted 13 lines · On Thursday January 11, [email protected] wrote:

Neil,

Quoted 10 lines · Neil Brown
Quoted 6 lines · On Wednesday January 10, [email protected] wrote:

root ~# mount localhost:/suse /mnt

[  132.678204] svc: unknown version (3 for prog 100227, nfsd)

I've confirmed that 2.6.20-rc2-mm1, 2.6.20-rc3-mm1, 2.6.19-rc6-mm1 all have this warning, while 2.6.17-2-amd64 is good.

Thanks. That helps a lot.

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

This patch should help too. Please let me know.

# mount localhost:/suse /mnt
[ 2058.438236] svc: unknown version (3 for prog 100227, nfsd)

Are you really really double-plus sure that you are running a kernel with the patch applied?
Because at the very least it should have changed the message to

Oh, sorry. I recompiled & installed kernel and it output this new message:

[  133.129919] svc: unknown version (3 for prog 100227, nfsacl)

Regards,
Wu

#14 lore raw
In reply to a message not in the archive
Quoted 8 lines · On Friday January 12, [email protected] wrote:
Quoted 3 lines

Are you really really double-plus sure that you are running a kernel with the patch applied?
Because at the very least it should have changed the message to

Oh, sorry. I recompiled & installed kernel and it output this new message:

[  133.129919] svc: unknown version (3 for prog 100227, nfsacl)

Ok, thanks. I must have missed something else wrong in the code......

Probably this 'break' in the wrong place...

Could you try this patch instead please - or just move the 'break' to where it should be.

Thanks,
NeilBrown

### Diffstat output

 ./fs/nfsd/nfssvc.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
fs/nfsd/nfssvc.c +4 -4
diff .prev/fs/nfsd/nfssvc.c ./fs/nfsd/nfssvc.c
@@ -72,7 +72,7 @@ static struct svc_program	nfsd_acl_progr
 	.pg_prog		= NFS_ACL_PROGRAM,
 	.pg_nvers		= NFSD_ACL_NRVERS,
 	.pg_vers		= nfsd_acl_versions,
-	.pg_name		= "nfsd",
+	.pg_name		= "nfsacl",
 	.pg_class		= "nfsd",
 	.pg_stats		= &nfsd_acl_svcstats,
 	.pg_authenticate	= &svc_set_client,
@@ -118,16 +118,16 @@ int nfsd_vers(int vers, enum vers_op cha
 	switch(change) {
 	case NFSD_SET:
 		nfsd_versions[vers] = nfsd_version[vers];
-		break;
 #if defined(CONFIG_NFSD_V2_ACL) || defined(CONFIG_NFSD_V3_ACL)
 		if (vers < NFSD_ACL_NRVERS)
-			nfsd_acl_version[vers] = nfsd_acl_version[vers];
+			nfsd_acl_versions[vers] = nfsd_acl_version[vers];
 #endif
+		break;
 	case NFSD_CLEAR:
 		nfsd_versions[vers] = NULL;
 #if defined(CONFIG_NFSD_V2_ACL) || defined(CONFIG_NFSD_V3_ACL)
 		if (vers < NFSD_ACL_NRVERS)
-			nfsd_acl_version[vers] = NULL;
+			nfsd_acl_versions[vers] = NULL;
 #endif
 		break;
 	case NFSD_TEST:
#15 lore raw
Quoted 7 lines · Neil Brown

Ok, thanks. I must have missed something else wrong in the code......

Probably this 'break' in the wrong place...

Could you try this patch instead please - or just move the 'break' to where it should be.

Now it worked :)

Thanks,
Wu

Quoted 38 lines

### Diffstat output

 ./fs/nfsd/nfssvc.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff .prev/fs/nfsd/nfssvc.c ./fs/nfsd/nfssvc.c

fs/nfsd/nfssvc.c +4 -4
@@ -72,7 +72,7 @@ static struct svc_program	nfsd_acl_progr
 	.pg_prog		= NFS_ACL_PROGRAM,
 	.pg_nvers		= NFSD_ACL_NRVERS,
 	.pg_vers		= nfsd_acl_versions,
-	.pg_name		= "nfsd",
+	.pg_name		= "nfsacl",
 	.pg_class		= "nfsd",
 	.pg_stats		= &nfsd_acl_svcstats,
 	.pg_authenticate	= &svc_set_client,
@@ -118,16 +118,16 @@ int nfsd_vers(int vers, enum vers_op cha
 	switch(change) {
 	case NFSD_SET:
 		nfsd_versions[vers] = nfsd_version[vers];
-		break;
 #if defined(CONFIG_NFSD_V2_ACL) || defined(CONFIG_NFSD_V3_ACL)
 		if (vers < NFSD_ACL_NRVERS)
-			nfsd_acl_version[vers] = nfsd_acl_version[vers];
+			nfsd_acl_versions[vers] = nfsd_acl_version[vers];
 #endif
+		break;
 	case NFSD_CLEAR:
 		nfsd_versions[vers] = NULL;
 #if defined(CONFIG_NFSD_V2_ACL) || defined(CONFIG_NFSD_V3_ACL)
 		if (vers < NFSD_ACL_NRVERS)
-			nfsd_acl_version[vers] = NULL;
+			nfsd_acl_versions[vers] = NULL;
 #endif
 		break;
 	case NFSD_TEST:
#17 lore raw
In reply to a message not in the archive
Quoted 10 lines · On Saturday January 13, [email protected] wrote:
Quoted 7 lines · Neil Brown

Ok, thanks. I must have missed something else wrong in the code......

Probably this 'break' in the wrong place...

Could you try this patch instead please - or just move the 'break' to where it should be.

Now it worked :)

Thanks. I'll try to get those fixes into 2.6.20...

NeilBrown