Skip to contentSkip to conversation

NFS corruption in 2.6.18.2?

DISCUSSION Fredrik Lindgren 4 participants 15 messages Nov 14, 2006 – Jan 22, 2007 1 message not in the archive

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

Hello

We're running a mail system with Linux machines being served by two NetApps. (Debian stable, our "own" kernel off kernel.org)

At present we're running 2.6.13 kernels, we had some corruption issues before that was fixed in 2.6.13. However when we tried to upgrade to 2.6.18.2 the we see corruption again.

pre 2.6.13 the problem seemed to be that the file size was being cached, which meant that sometimes there were blocks of NULL characters in the files.

With 2.6.18.2 we see blocks of NULL chars in the data again, this time it's sometimes in the middle of a message. pre 2.6.13 that didn't happen,
then there were just big blocks of NULL chars between two messages. The only consistent thing is that it only occurs when the 1 machine running 2.6.18.2 (out of 5) has delivered a message to the spool-file.

I don't know if it's relevant, but when checking the NFS stats I see the 2.6.18.2 machine doing almost precisely half the amount of "GetAttr" calls compared to the 2.6.13 machines.

Is this something anyone else has seen?

Also on a side note, the statistics still seem to be using signed values, so we're seeing negative numbers on some stats after some uptime. This is true for both using "nfsstat" and "cat /proc/net/rpc/nfs.

Regards,
Fredrik Lindgren

-------------------------------------------------------------------------
SF.net email is sponsored by: A Better Job is Waiting for You - Find it Now. Check out Slashdot's new job board. Browse through tons of technical jobs posted by companies looking to hire people just like you.
http://jobs.slashdot.org/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

#1 lore raw
Quoted 24 lines · Fredrik Lindgren

Hello

We're running a mail system with Linux machines being served by two NetApps. (Debian stable, our "own" kernel off kernel.org)

At present we're running 2.6.13 kernels, we had some corruption issues before that was fixed in 2.6.13. However when we tried to upgrade to 2.6.18.2 the we see corruption again.

pre 2.6.13 the problem seemed to be that the file size was being cached, which meant that sometimes there were blocks of NULL characters in the files.

With 2.6.18.2 we see blocks of NULL chars in the data again, this time it's sometimes in the middle of a message. pre 2.6.13 that didn't happen,
then there were just big blocks of NULL chars between two messages. The only consistent thing is that it only occurs when the 1 machine running 2.6.18.2 (out of 5) has delivered a message to the spool-file.

I don't know if it's relevant, but when checking the NFS stats I see the 2.6.18.2 machine doing almost precisely half the amount of "GetAttr" calls compared to the 2.6.13 machines.

Quoted 6 lines

Is this something anyone else has seen?

Also on a side note, the statistics still seem to be using signed values, so we're seeing negative numbers on some stats after some uptime. This is true for both using "nfsstat" and "cat /proc/net/rpc/nfs.

I have seen this behaviour with kernel 2.6.18 and above up to 19-rc4. Reported this, but no response.

http://lkml.org/lkml/2006/9/28/89

Signature · 17 lines
  Tomas Kasparek, PhD student  E-mail: [email protected]
  CVT FIT VUT Brno, BI/140a    Web:    http://www.fit.vutbr.cz/~kasparek
  Bozetechova 2, 612 66        Fax:    +420 54114-1270
  Brno, Czech Republic         Phone:  +420 54114-1220

  ICQ: 293092805  jabber: [email protected]
  GPG: 2F1E 1AAF FD3B CFA3 1537  63BD DCBE 18FF A035 53BC


-------------------------------------------------------------------------
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  -  [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
#2 lore raw
Quoted 32 lines · On Wed, 15 Nov 2006 18:29:47 +0100 Kasparek Tomas <[email protected]> wrote:
Quoted 24 lines · Fredrik Lindgren

Hello

We're running a mail system with Linux machines being served by two NetApps. (Debian stable, our "own" kernel off kernel.org)

At present we're running 2.6.13 kernels, we had some corruption issues before that was fixed in 2.6.13. However when we tried to upgrade to 2.6.18.2 the we see corruption again.

pre 2.6.13 the problem seemed to be that the file size was being cached, which meant that sometimes there were blocks of NULL characters in the files.

With 2.6.18.2 we see blocks of NULL chars in the data again, this time it's sometimes in the middle of a message. pre 2.6.13 that didn't happen,
then there were just big blocks of NULL chars between two messages. The only consistent thing is that it only occurs when the 1 machine running 2.6.18.2 (out of 5) has delivered a message to the spool-file.

I don't know if it's relevant, but when checking the NFS stats I see the 2.6.18.2 machine doing almost precisely half the amount of "GetAttr" calls compared to the 2.6.13 machines.

Quoted 6 lines

Is this something anyone else has seen?

Also on a side note, the statistics still seem to be using signed values, so we're seeing negative numbers on some stats after some uptime. This is true for both using "nfsstat" and "cat /proc/net/rpc/nfs.

Quoted 5 lines

I have seen this behaviour with kernel 2.6.18 and above up to 19-rc4. Reported this, but no response.

http://lkml.org/lkml/2006/9/28/89

I believe my previous post about NFS root filesystems, and trying to debug it has to do with this very issue.

I've recently noticed that large files copied via ssh to /tmp on the root (/ mounted) NFS file system turn out to be corrupt and can not be untarred. I have no such issues with these same boxes, non root NFS mounted, with 2.6.9 and 2.6.8. I am in the process of compiling 2.6.8 from the same Debian patched sources, in order to do a comparison.

I will let the list know, if my NFS corruption issues disappear. However, it seems likely that this is what is causing my boxes to die....

I've seen this on current Debian 2.6.18 and 2.6.19 kernel packages....

-------------------------------------------------------------------------
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 - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

#3 lore raw
In reply to Kasparek Tomas
Quoted 4 lines · Kasparek Tomas

I have seen this behaviour with kernel 2.6.18 and above up to 19-rc4. Reported this, but no response.

http://lkml.org/lkml/2006/9/28/89

Your test script doesn't use any form of locking. How are you ensuring that only one client has the file open at a time?

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 - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

#4 lore raw
In reply to Fredrik Lindgren
Quoted 8 lines
Quoted 5 lines

have seen this behaviour with kernel 2.6.18 and above up to 19-rc4. Reported this, but no response.

http://lkml.org/lkml/2006/9/28/89

Your test script doesn't use any form of locking. How are you ensuring that only one client has the file open at a time?

I use no locking at all, it's just synthetic test, I don't expect data to be ordered or whatever, but the problem is blocks of zeros inserted. It behaves right with the last 2.6.16.32, zeros are contained if clients are 2.6.18.3 and 2.6.19-rc4.

I'm going to do more testing in next few days, so hoe bring some new info.

As I wrote before, it does not depend on the server (tried with FreeBSD server and several versions of linux 2.6.16.x and 2.6.18.x).

Regards

Signature · 17 lines
  Tomas Kasparek, PhD student  E-mail: [email protected]
  CVT FIT VUT Brno, BI/140a    Web:    http://www.fit.vutbr.cz/~kasparek
  Bozetechova 2, 612 66        Fax:    +420 54114-1270
  Brno, Czech Republic         Phone:  +420 54114-1220

  ICQ: 293092805  jabber: [email protected]
  GPG: 2F1E 1AAF FD3B CFA3 1537  63BD DCBE 18FF A035 53BC


-------------------------------------------------------------------------
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  -  [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
#5 lore raw
Quoted 14 lines · Kasparek Tomas
Quoted 8 lines
Quoted 5 lines

have seen this behaviour with kernel 2.6.18 and above up to 19-rc4. Reported this, but no response.

http://lkml.org/lkml/2006/9/28/89

Your test script doesn't use any form of locking. How are you ensuring that only one client has the file open at a time?

I use no locking at all, it's just synthetic test, I don't expect data to be ordered or whatever, but the problem is blocks of zeros inserted. It behaves right with the last 2.6.16.32, zeros are contained if clients are 2.6.18.3 and 2.6.19-rc4.

Quoted 4 lines

I'm going to do more testing in next few days, so hoe bring some new info.

As I wrote before, it does not depend on the server (tried with FreeBSD server and several versions of linux 2.6.16.x and 2.6.18.x).

Just update: 2.6.17.14 is ok

Signature · 17 lines
  Tomas Kasparek, PhD student  E-mail: [email protected]
  CVT FIT VUT Brno, BI/140a    Web:    http://www.fit.vutbr.cz/~kasparek
  Bozetechova 2, 612 66        Fax:    +420 54114-1270
  Brno, Czech Republic         Phone:  +420 54114-1220

  ICQ: 293092805  jabber: [email protected]
  GPG: 2F1E 1AAF FD3B CFA3 1537  63BD DCBE 18FF A035 53BC


-------------------------------------------------------------------------
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  -  [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
#6 lore raw
Quoted 15 lines · Kasparek Tomas
Quoted 14 lines · Kasparek Tomas
Quoted 8 lines
Quoted 5 lines

have seen this behaviour with kernel 2.6.18 and above up to 19-rc4. Reported this, but no response.

http://lkml.org/lkml/2006/9/28/89

Your test script doesn't use any form of locking. How are you ensuring that only one client has the file open at a time?

I use no locking at all, it's just synthetic test, I don't expect data to be ordered or whatever, but the problem is blocks of zeros inserted. It behaves right with the last 2.6.16.32, zeros are contained if clients are 2.6.18.3 and 2.6.19-rc4.

Quoted 6 lines
Quoted 4 lines

I'm going to do more testing in next few days, so hoe bring some new info.

As I wrote before, it does not depend on the server (tried with FreeBSD server and several versions of linux 2.6.16.x and 2.6.18.x).

Just update: 2.6.17.14 is ok

did git bisect between 2.6.17 and 2.6.18 and found that the commit is:

44b11874ff583b6e766a05856b04f3c492c32b84
NFS: Separate metadata and page cache revalidation mechanisms

will verify (with and without patch) tomorrow.

Bye

Signature · 17 lines
  Tomas Kasparek, PhD student  E-mail: [email protected]
  CVT FIT VUT Brno, BI/140a    Web:    http://www.fit.vutbr.cz/~kasparek
  Bozetechova 2, 612 66        Fax:    +420 54114-1270
  Brno, Czech Republic         Phone:  +420 54114-1220

  ICQ: 293092805  jabber: [email protected]
  GPG: 2F1E 1AAF FD3B CFA3 1537  63BD DCBE 18FF A035 53BC


-------------------------------------------------------------------------
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  -  [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
#7 lore raw
Quoted 21 lines · Kasparek Tomas
Quoted 20 lines · Kasparek Tomas
Quoted 18 lines · Kasparek Tomas
Quoted 8 lines
Quoted 5 lines

have seen this behaviour with kernel 2.6.18 and above up to 19-rc4. Reported this, but no response.

http://lkml.org/lkml/2006/9/28/89

Your test script doesn't use any form of locking. How are you ensuring that only one client has the file open at a time?

I use no locking at all, it's just synthetic test, I don't expect data to be ordered or whatever, but the problem is blocks of zeros inserted. It behaves right with the last 2.6.16.32, zeros are contained if clients are 2.6.18.3 and 2.6.19-rc4.

I'm going to do more testing in next few days, so hoe bring some new info.

As I wrote before, it does not depend on the server (tried with FreeBSD server and several versions of linux 2.6.16.x and 2.6.18.x).

Quoted 8 lines
Quoted 1 line

Just update: 2.6.17.14 is ok

did git bisect between 2.6.17 and 2.6.18 and found that the commit is:

44b11874ff583b6e766a05856b04f3c492c32b84
NFS: Separate metadata and page cache revalidation mechanisms

will verify (with and without patch) tomorrow.

2.6.18.3 with reversed 44b11874ff583b6e766a05856b04f3c492c32b84 is OK.

exact patch used included.

will try to dig deeper yet a bit.

bye

Signature · 7 lines
  Tomas Kasparek, PhD student  E-mail: [email protected]
  CVT FIT VUT Brno, BI/140a    Web:    http://www.fit.vutbr.cz/~kasparek
  Bozetechova 2, 612 66        Fax:    +420 54114-1270
  Brno, Czech Republic         Phone:  +420 54114-1220

  ICQ: 293092805  jabber: [email protected]
  GPG: 2F1E 1AAF FD3B CFA3 1537  63BD DCBE 18FF A035 53BC

This patch reverse the following:

http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=44b11874ff583b6e766a05856b04f3c492c32b84
NFS: Separate metadata and page cache revalidation mechanisms

fs/nfs/dir.c +1 -1
diff -ruN linux-2.6.18.3/fs/nfs/dir.c linux-2.6.18.3-test/fs/nfs/dir.c
@@ -528,7 +528,7 @@
 
 	lock_kernel();
 
-	res = nfs_revalidate_mapping(inode, filp->f_mapping);
+	res = nfs_revalidate_inode(NFS_SERVER(inode), inode);
 	if (res < 0) {
 		unlock_kernel();
 		return res;
fs/nfs/file.c +21 -3
diff -ruN linux-2.6.18.3/fs/nfs/file.c linux-2.6.18.3-test/fs/nfs/file.c
@@ -127,6 +127,23 @@
 }
 
 /**
+ * nfs_revalidate_file - Revalidate the page cache & related metadata
+ * @inode - pointer to inode struct
+ * @file - pointer to file
+ */
+static int nfs_revalidate_file(struct inode *inode, struct file *filp)
+{
+	struct nfs_inode *nfsi = NFS_I(inode);
+	int retval = 0;
+
+	if ((nfsi->cache_validity & (NFS_INO_REVAL_PAGECACHE|NFS_INO_INVALID_ATTR))
+			|| nfs_attribute_timeout(inode))
+		retval = __nfs_revalidate_inode(NFS_SERVER(inode), inode);
+	nfs_revalidate_mapping(inode, filp->f_mapping);
+	return 0;
+}
+
+/**
  * nfs_revalidate_size - Revalidate the file size
  * @inode - pointer to inode struct
  * @file - pointer to struct file
@@ -211,7 +228,7 @@
 		dentry->d_parent->d_name.name, dentry->d_name.name,
 		(unsigned long) count, (unsigned long) pos);
 
-	result = nfs_revalidate_mapping(inode, iocb->ki_filp->f_mapping);
+	result = nfs_revalidate_file(inode, iocb->ki_filp);
 	nfs_add_stats(inode, NFSIOS_NORMALREADBYTES, count);
 	if (!result)
 		result = generic_file_aio_read(iocb, buf, count, pos);
@@ -230,7 +247,7 @@
 		dentry->d_parent->d_name.name, dentry->d_name.name,
 		(unsigned long) count, (unsigned long long) *ppos);
 
-	res = nfs_revalidate_mapping(inode, filp->f_mapping);
+	res = nfs_revalidate_file(inode, filp);
 	if (!res)
 		res = generic_file_sendfile(filp, ppos, count, actor, target);
 	return res;
@@ -246,7 +263,7 @@
 	dfprintk(VFS, "nfs: mmap(%s/%s)\n",
 		dentry->d_parent->d_name.name, dentry->d_name.name);
 
-	status = nfs_revalidate_mapping(inode, file->f_mapping);
+	status = nfs_revalidate_file(inode, file);
 	if (!status)
 		status = generic_file_mmap(file, vma);
 	return status;
@@ -366,6 +383,7 @@
 		if (result)
 			goto out;
 	}
+	nfs_revalidate_mapping(inode, iocb->ki_filp->f_mapping);
 
 	result = count;
 	if (!count)
fs/nfs/inode.c +4 -10
diff -ruN linux-2.6.18.3/fs/nfs/inode.c linux-2.6.18.3-test/fs/nfs/inode.c
@@ -593,7 +593,7 @@
 		status = -ESTALE;
 		/* Do we trust the cached ESTALE? */
 		if (NFS_ATTRTIMEO(inode) != 0) {
-			if (nfsi->cache_validity & (NFS_INO_INVALID_ATTR|NFS_INO_INVALID_ATIME)) {
+			if (nfsi->cache_validity & (NFS_INO_INVALID_ATTR|NFS_INO_INVALID_DATA|NFS_INO_INVALID_ATIME)) {
 				/* no */
 			} else
 				goto out;
@@ -624,6 +624,8 @@
 	}
 	spin_unlock(&inode->i_lock);
 
+	nfs_revalidate_mapping(inode, inode->i_mapping);
+
 	if (nfsi->cache_validity & NFS_INO_INVALID_ACL)
 		nfs_zap_acl_cache(inode);
 
@@ -668,16 +670,9 @@
  * @inode - pointer to host inode
  * @mapping - pointer to mapping
  */
-int nfs_revalidate_mapping(struct inode *inode, struct address_space *mapping)
+void nfs_revalidate_mapping(struct inode *inode, struct address_space *mapping)
 {
 	struct nfs_inode *nfsi = NFS_I(inode);
-	int ret = 0;
-
-	if (NFS_STALE(inode))
-		ret = -ESTALE;
-	if ((nfsi->cache_validity & NFS_INO_REVAL_PAGECACHE)
-			|| nfs_attribute_timeout(inode))
-		ret = __nfs_revalidate_inode(NFS_SERVER(inode), inode);
 
 	if (nfsi->cache_validity & NFS_INO_INVALID_DATA) {
 		nfs_inc_stats(inode, NFSIOS_DATAINVALIDATE);
@@ -698,7 +693,6 @@
 				inode->i_sb->s_id,
 				(long long)NFS_FILEID(inode));
 	}
-	return ret;
 }
 
 /**
fs/nfs/symlink.c +1 -1
diff -ruN linux-2.6.18.3/fs/nfs/symlink.c linux-2.6.18.3-test/fs/nfs/symlink.c
@@ -52,7 +52,7 @@
 {
 	struct inode *inode = dentry->d_inode;
 	struct page *page;
-	void *err = ERR_PTR(nfs_revalidate_mapping(inode, inode->i_mapping));
+	void *err = ERR_PTR(nfs_revalidate_inode(NFS_SERVER(inode), inode));
 	if (err)
 		goto read_failed;
 	page = read_cache_page(&inode->i_data, 0,
include/linux/nfs_fs.h +1 -1
diff -ruN linux-2.6.18.3/include/linux/nfs_fs.h linux-2.6.18.3-test/include/linux/nfs_fs.h
@@ -302,7 +302,7 @@
 extern int nfs_attribute_timeout(struct inode *inode);
 extern int nfs_revalidate_inode(struct nfs_server *server, struct inode *inode);
 extern int __nfs_revalidate_inode(struct nfs_server *, struct inode *);
-extern int nfs_revalidate_mapping(struct inode *inode, struct address_space *mapping);
+extern void nfs_revalidate_mapping(struct inode *inode, struct address_space *mapping);
 extern int nfs_setattr(struct dentry *, struct iattr *);
 extern void nfs_setattr_update_inode(struct inode *inode, struct iattr *attr);
 extern void nfs_begin_attr_update(struct inode *);

-------------------------------------------------------------------------
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 - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

#8 lore raw
Quoted 26 lines · Kasparek Tomas
Quoted 25 lines · Kasparek Tomas
Quoted 15 lines · Kasparek Tomas
Quoted 14 lines · Kasparek Tomas
Quoted 8 lines
Quoted 5 lines

have seen this behaviour with kernel 2.6.18 and above up to 19-rc4. Reported this, but no response.

http://lkml.org/lkml/2006/9/28/89

Your test script doesn't use any form of locking. How are you ensuring that only one client has the file open at a time?

I use no locking at all, it's just synthetic test, I don't expect data to be ordered or whatever, but the problem is blocks of zeros inserted. It behaves right with the last 2.6.16.32, zeros are contained if clients are 2.6.18.3 and 2.6.19-rc4.

Quoted 6 lines
Quoted 4 lines

I'm going to do more testing in next few days, so hoe bring some new info.

As I wrote before, it does not depend on the server (tried with FreeBSD server and several versions of linux 2.6.16.x and 2.6.18.x).

Just update: 2.6.17.14 is ok

did git bisect between 2.6.17 and 2.6.18 and found that the commit is:

Quoted 8 lines
Quoted 4 lines

44b11874ff583b6e766a05856b04f3c492c32b84
NFS: Separate metadata and page cache revalidation mechanisms

will verify (with and without patch) tomorrow.

2.6.18.3 with reversed 44b11874ff583b6e766a05856b04f3c492c32b84 is OK.

exact patch used included.

If you are not using any form of synchronisation, then your test would appear to be violating the close-to-open cache consistency rules (see
http://nfs.sourceforge.net/#faq_a8).

Cheers
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 - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

#9 lore raw
Quoted 10 lines · Trond Myklebust
Quoted 10 lines
Quoted 9 lines
Quoted 2 lines · Kasparek Tomas

Just update: 2.6.17.14 is ok

did git bisect between 2.6.17 and 2.6.18 and found that the commit is:

44b11874ff583b6e766a05856b04f3c492c32b84
NFS: Separate metadata and page cache revalidation mechanisms

will verify (with and without patch) tomorrow.

Quoted 7 lines
Quoted 3 lines

2.6.18.3 with reversed 44b11874ff583b6e766a05856b04f3c492c32b84 is OK.

exact patch used included.

If you are not using any form of synchronisation, then your test would appear to be violating the close-to-open cache consistency rules (see
http://nfs.sourceforge.net/#faq_a8).

Yes, I understand this, but with no synchronization I should get old or somewhat 'not current' data at worst, I don't expect to get some data generated by the kernel. The test is synthetic, it was constructed to be as easy as possible, but this one works well on 2.6.16 (mean no zeros, data are sometimes overwriten or mixed from several clients as a result of no locking, but that's ok for my application).

I think the real bug/problem/misbehaving is somwhere else than in the patch itself I mention, this patch just enables different behaviour that ends with the real bad code having the possibility to show up.

I will try to find this bad code next week.

Regards

Signature · 17 lines
  Tomas Kasparek, PhD student  E-mail: [email protected]
  CVT FIT VUT Brno, BI/140a    Web:    http://www.fit.vutbr.cz/~kasparek
  Bozetechova 2, 612 66        Fax:    +420 54114-1270
  Brno, Czech Republic         Phone:  +420 54114-1220

  ICQ: 293092805  jabber: [email protected]
  GPG: 2F1E 1AAF FD3B CFA3 1537  63BD DCBE 18FF A035 53BC


-------------------------------------------------------------------------
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  -  [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
#15 lore raw
In reply to Trond Myklebust
Quoted 14 lines
Quoted 14 lines
Quoted 13 lines
Quoted 5 lines
Quoted 3 lines

As I wrote before, it does not depend on the server (tried with FreeBSD server and several versions of linux 2.6.16.x and 2.6.18.x).

Just update: 2.6.17.14 is ok

did git bisect between 2.6.17 and 2.6.18 and found that the commit is:

44b11874ff583b6e766a05856b04f3c492c32b84
NFS: Separate metadata and page cache revalidation mechanisms

will verify (with and without patch) tomorrow.

Quoted 8 lines
Quoted 4 lines

2.6.18.3 with reversed
44b11874ff583b6e766a05856b04f3c492c32b84 is OK.

exact patch used included.

If you are not using any form of synchronisation, then your test would appear to be violating the close-to-open cache consistency rules (see
http://nfs.sourceforge.net/#faq_a8).

Hello,

I have tested our application (CommuniGate Pro) with 2.6.18.3 with Mr. Kaspareks patch applied and I'm seeing no corruption after several days of uptime. Without the patch I usually see bogus data in in some files within an hour.

Also, anyone has any input in why 2.6.18.3 (both with and without Mr Kaspareks patch) does about half the amount of GETATTR calls compared to 2.6.13 with our application? Is this an indended change? Not that I'm complaining or anything, but it would be nice to know that it was intentional :)

Wheter CGP voilates the "close-to-open cache consistency rules" or not, I don't know. but the fact is that it works with a stock 2.6.13 and 2.6.18.3 sans patch 44b11874ff583b6e766a05856b04f3c492c32b84, it breaks on 2.6.18.3.

Regards,
Fredrik Lindgren

-------------------------------------------------------------------------
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 - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

#11 lore raw
In reply to a message not in the archive
Quoted 27 lines · Trond Myklebust
Quoted 19 lines · Kasparek Tomas
Quoted 10 lines · Trond Myklebust
Quoted 10 lines
Quoted 9 lines
Quoted 2 lines · Kasparek Tomas

Just update: 2.6.17.14 is ok

did git bisect between 2.6.17 and 2.6.18 and found that the commit is:

44b11874ff583b6e766a05856b04f3c492c32b84
NFS: Separate metadata and page cache revalidation mechanisms

will verify (with and without patch) tomorrow.

Quoted 7 lines
Quoted 3 lines

2.6.18.3 with reversed 44b11874ff583b6e766a05856b04f3c492c32b84 is OK.

exact patch used included.

If you are not using any form of synchronisation, then your test would appear to be violating the close-to-open cache consistency rules (see
http://nfs.sourceforge.net/#faq_a8).

Quoted 6 lines

Yes, I understand this, but with no synchronization I should get old or somewhat 'not current' data at worst, I don't expect to get some data generated by the kernel. The test is synthetic, it was constructed to be as easy as possible, but this one works well on 2.6.16 (mean no zeros, data are sometimes overwriten or mixed from several clients as a result of no locking, but that's ok for my application).

Quoted 3 lines

No. Extending the file on the server while your client has pending background writes can result in exactly the behaviour that you're observing.

Hi, still me with the same problem, sorry for being pain in the ass, but I need to solve it somehow (being not able to change the applications used).

I have tried mounting the share with 'noac' option as mentioned in the FAQ, but the behaviour is the same.

Would you have any other advice how to get the old behaviour (for me that means that of kernel 2.6.16.x)?

(I tested some newer kernels to - 2.6.18.5 and 19.1 just for the case someting changes but no success there.)

Regards.

Signature · 17 lines
  Tomas Kasparek, PhD student  E-mail: [email protected]
  CVT FIT VUT Brno, BI/140a    Web:    http://www.fit.vutbr.cz/~kasparek
  Bozetechova 2, 612 66        Fax:    +420 54114-1270
  Brno, Czech Republic         Phone:  +420 54114-1220

  ICQ: 293092805  jabber: [email protected]
  GPG: 2F1E 1AAF FD3B CFA3 1537  63BD DCBE 18FF A035 53BC


-------------------------------------------------------------------------
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  -  [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
#12 lore raw
Quoted 11 lines · Kasparek Tomas

Hi, still me with the same problem, sorry for being pain in the ass, but I need to solve it somehow (being not able to change the applications used).

I have tried mounting the share with 'noac' option as mentioned in the FAQ, but the behaviour is the same.

Would you have any other advice how to get the old behaviour (for me that means that of kernel 2.6.16.x)?

(I tested some newer kernels to - 2.6.18.5 and 19.1 just for the case someting changes but no success there.)

Could you try 2.6.19 w/ the NFS_ALL patch from
http://client.linux-nfs.org/Linux-2.6.x/2.6.19/ ?

I know of one corruption issue that was happening there due to a race between invalidate_inode_pages2() and the write code.

Cheers
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 - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

#13 lore raw
Quoted 11 lines · Trond Myklebust
Quoted 9 lines · Kasparek Tomas

Hi, still me with the same problem, sorry for being pain in the ass, but I need to solve it somehow (being not able to change the applications used).

I have tried mounting the share with 'noac' option as mentioned in the FAQ, but the behaviour is the same.

Would you have any other advice how to get the old behaviour (for me that means that of kernel 2.6.16.x)?

Quoted 8 lines
Quoted 2 lines

(I tested some newer kernels to - 2.6.18.5 and 19.1 just for the case someting changes but no success there.)

Could you try 2.6.19 w/ the NFS_ALL patch from
http://client.linux-nfs.org/Linux-2.6.x/2.6.19/ ?

I know of one corruption issue that was happening there due to a race between invalidate_inode_pages2() and the write code.

Hi,

sorry it takes so long, I finnaly tried it and results are the same

- 2.6.19 + NFS_ALL (both with/withnout noac)
- 2.6.20-rc1 (both with/withnout noac)

Will try to do more investigations afer Xmas.

Regards

Signature · 17 lines
  Tomas Kasparek, PhD student  E-mail: [email protected]
  CVT FIT VUT Brno, BI/140a    Web:    http://www.fit.vutbr.cz/~kasparek
  Bozetechova 2, 612 66        Fax:    +420 54114-1270
  Brno, Czech Republic         Phone:  +420 54114-1220

  ICQ: 293092805  jabber: [email protected]
  GPG: 2F1E 1AAF FD3B CFA3 1537  63BD DCBE 18FF A035 53BC


-------------------------------------------------------------------------
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  -  [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
#14 lore raw
Quoted 21 lines · Kasparek Tomas
Quoted 11 lines · Trond Myklebust
Quoted 9 lines · Kasparek Tomas

Hi, still me with the same problem, sorry for being pain in the ass, but I need to solve it somehow (being not able to change the applications used).

I have tried mounting the share with 'noac' option as mentioned in the FAQ, but the behaviour is the same.

Would you have any other advice how to get the old behaviour (for me that means that of kernel 2.6.16.x)?

Quoted 8 lines
Quoted 2 lines

(I tested some newer kernels to - 2.6.18.5 and 19.1 just for the case someting changes but no success there.)

Could you try 2.6.19 w/ the NFS_ALL patch from
http://client.linux-nfs.org/Linux-2.6.x/2.6.19/ ?

I know of one corruption issue that was happening there due to a race between invalidate_inode_pages2() and the write code.

Quoted 6 lines

sorry it takes so long, I finnaly tried it and results are the same

- 2.6.19 + NFS_ALL (both with/withnout noac)
- 2.6.20-rc1 (both with/withnout noac)

Will try to do more investigations afer Xmas.

Have tried another versions with interesting results:

- 2.6.19.1 (with/out noac)      - BAD
- 2.6.19.2 (without noac)       - BAD
- 2.6.19.2 (with noac)          - OK !!!!
- 2.6.20-rc5 (with/out noac)    - BAD

so something in 2.6.19.2 corrected the behaviour if mounted with 'noac', but it does not work again in 20-rc5.

Signature · 17 lines
  Tomas Kasparek, PhD student  E-mail: [email protected]
  CVT FIT VUT Brno, BI/140a    Web:    http://www.fit.vutbr.cz/~kasparek
  Bozetechova 2, 612 66        Fax:    +420 54114-1270
  Brno, Czech Republic         Phone:  +420 54114-1220

  ICQ: 293092805  jabber: [email protected]
  GPG: 2F1E 1AAF FD3B CFA3 1537  63BD DCBE 18FF A035 53BC


-------------------------------------------------------------------------
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  -  [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs