From: Ian Campbell Subject: Re: RPC retransmission of write requests containing bogus data Date: Mon, 20 Oct 2008 15:25:08 +0100 Message-ID: <1224512708.15736.12.camel@zakaz.uk.xensource.com> References: <1224241273.9053.109.camel@zakaz.uk.xensource.com> <1224247725.7722.4.camel@localhost> <1224248469.9053.119.camel@zakaz.uk.xensource.com> <1224249772.7722.9.camel@localhost> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-lPUuSgwiRxToO3Fb1SSp" Cc: linux-nfs@vger.kernel.org, mchan-dY08KVG/lbpWk0Htik3J/w@public.gmane.org To: Trond Myklebust Return-path: Received: from smtp02.citrix.com ([66.165.176.63]:12226 "EHLO SMTP02.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750895AbYJTOZS (ORCPT ); Mon, 20 Oct 2008 10:25:18 -0400 In-Reply-To: <1224249772.7722.9.camel@localhost> Sender: linux-nfs-owner@vger.kernel.org List-ID: --=-lPUuSgwiRxToO3Fb1SSp Content-Type: text/plain Content-Transfer-Encoding: 7bit On Fri, 2008-10-17 at 09:22 -0400, Trond Myklebust wrote: > On Fri, 2008-10-17 at 14:01 +0100, Ian Campbell wrote: > > On Fri, 2008-10-17 at 08:48 -0400, Trond Myklebust wrote: > > > I don't see how this could be an RPC bug. The networking layer is > > > supposed to either copy the data sent to the socket, or take a reference > > > to any pages that are pushed via the ->sendpage() abi. > > > > > > IOW: the pages are supposed to be still referenced by the networking > > > layer even if the NFS layer and page cache have dropped their > > > references. > > > > The pages are still referenced by the networking layer. The problem is > > that the userspace app has been told that the write has completed so it > > is free to write new data to those pages. > > > > Ian. > > OK, I see your point. > > Does this happen at all with NFSv4? I ask because the NFSv4 client will > always ensure that the TCP connection gets broken before a > retransmission. I wouldn't therefore expect any races between a reply to > the previous transmission and the new one... It does seem to happen with NFSv4 too (see attached). Ian. --=-lPUuSgwiRxToO3Fb1SSp Content-Disposition: attachment; filename=corrupt-over-nfsv4.pcap Content-Type: application/octet-stream; name=corrupt-over-nfsv4.pcap Content-Transfer-Encoding: base64 1MOyoQIABAAAAAAAAAAAAAAKAAABAAAAhpP8SFTzCwDqBQAA6gUAAAAdCfGEzQAY/v0TOAgARQAF 3IdkQABABtUQClDhHApQ4uoDXwgBAv2NhaKsfh2AEAwx3nUAAAEBCAoBjmhOAAZ/f4AAELjIi1Bq AAAAAAAAAAIAAYajAAAABAAAAAEAAAABAAAAOAAD++wAAAAId2FyY3JhZnQAAAAAAAAAAAAAAAcA AAAAAAAAAQAAAAIAAAADAAAABAAAAAYAAAAKAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAWAAAAEAEA AQEAAAAAg3UDADbzvW4AAAAmAAAAAXCH/EgDAAAAAwAAAAAAAAAACGAAAAAAAgAAEACGF63ehhet 3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63e hhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6G F63ehhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYX rd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet 3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63e hhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6G F63ehhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYX rd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet 3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63e hhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6G F63ehhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYX rd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet 3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63e hhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6G F63ehhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYX rd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet 3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63e hhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6G F63ehhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYX rd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet 3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63e hhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6GF63ehhet3oYXrd6G F63ehhet3oYXrd6GF63ehpP8SJ31CwAyAQAAMgEAAAAY/v0TOAAdCfGEzQgARQABJK1XQABABrPV ClDi6gpQ4RwIAQNfoqx+HQL9nkGAGAH1xukAAAEBCAoABn+AAY5oToAAAOzIi1BqAAAAAQAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAWAAAAAA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t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7v vq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++ rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t 3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e 776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7v vq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++ rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t 3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e 776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7v vq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++ rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t 3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e 776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7v vq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++ rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t 3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e 776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7v vq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++ rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t 3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e 776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7v vq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++ rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t 3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e 776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7v vq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++ rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t 3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e 776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7v vq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++ rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t 3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e 776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7v vq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++ rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t 3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e 776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7v vq3e776t3u++rd7vvq3e777Hk/xI0w4MADIBAAAyAQAAABj+/RM4AB0J8YTNCABFAAEkrWxAAEAG s8AKUOLqClDhHAgBA1+irH89Av26iYAYAfV19AAAAQEICgAGmOUBjoGzgAAA7MiLUGoAAAABAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAABYAAAAAAAAAJgAAAAAAABAAAAAAAnCH/EgPDgkA AAAACQAAAAAAAAACABABGgAwojoAAACQAAAAAUj8k8cAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAADdYMAAAGkAAAAAQAAABByb290QGxvY2FsZG9tYWluAAAAEHJvb3RAbG9jYWxkb21h aW4AAAAAAAAAAAAAAAAAEBAAAAAAAEj8h5EAAAAAAAAAAEj8k8cAAAAAAAAAAEj8k8cAAAAA --=-lPUuSgwiRxToO3Fb1SSp--