All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Bligh <alex@alex.org.uk>
To: Eric Dumazet <eric.dumazet@gmail.com>,
	Ian Campbell <Ian.Campbell@citrix.com>
Cc: Joe Jin <joe.jin@oracle.com>,
	Frank Blaschka <frank.blaschka@de.ibm.com>,
	"David S. Miller" <davem@davemloft.net>,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	zheng.x.li@oracle.com, Xen Devel <xen-devel@lists.xen.org>,
	Jan Beulich <JBeulich@suse.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	Alex Bligh <alex@alex.org.uk>
Subject: Re: kernel panic in skb_copy_bits
Date: Thu, 04 Jul 2013 13:57:16 +0100	[thread overview]
Message-ID: <06F8DA5DD1D9E277F2AF6F1E@Ximines.local> (raw)
In-Reply-To: <1372932730.4979.96.camel@edumazet-glaptop>



--On 4 July 2013 03:12:10 -0700 Eric Dumazet <eric.dumazet@gmail.com> wrote:

> It looks like a typical COW issue to me.
>
> If the page content is written while there is still a reference on this
> page, we should allocate a new page and copy the previous content.
>
> And this has little to do with networking.

I suspect this would get more attention if we could make Ian's case
below trigger (a) outside Xen, (b) outside networking.

> 	memset(buf, 0xaa, 4096);
> 	write(fd, buf, 4096)
> 	memset(buf, 0x55, 4096);
> (where fd is O_DIRECT on NFS) Can result in 0x55 being seen on the wire
> in the TCP retransmit.

We know this should fail using O_DIRECT+NFS. We've had reports suggesting
it fails in O_DIRECT+iSCSI. However, that's been with a kernel panic
(under Xen) rather than data corruption as per the above.

Historical trawling suggests this is an issue with DRDB (see Ian's
original thread from the mists of time).

I don't quite understand why we aren't seeing corruption with standard
ATA devices + O_DIRECT and no Xen involved at all.

My memory is a bit misty on this but I had thought the reason why
this would NOT be solved simply by O_DIRECT taking a reference to
the page was that the O_DIRECT I/O completed (and thus the reference
would be freed up) before the networking stack had actually finished
with the page. If the O_DIRECT I/O did not complete until the
page was actually finished with, we wouldn't see the problem in the
first place. I may be completely off base here.

-- 
Alex Bligh

  parent reply	other threads:[~2013-07-04 12:57 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-27  2:58 kernel panic in skb_copy_bits Joe Jin
2013-06-27  2:58 ` Joe Jin
2013-06-27  5:31 ` Eric Dumazet
2013-06-27  5:31   ` Eric Dumazet
2013-06-27  7:15   ` Joe Jin
2013-06-27  7:15     ` Joe Jin
2013-06-28  4:17   ` Joe Jin
2013-06-28  4:17     ` Joe Jin
2013-06-28  6:52     ` Eric Dumazet
2013-06-28  6:52       ` Eric Dumazet
2013-06-28  9:37       ` Eric Dumazet
2013-06-28  9:37       ` Eric Dumazet
2013-06-28 11:33         ` Joe Jin
2013-06-28 11:33         ` Joe Jin
2013-06-28 23:36         ` Joe Jin
2013-06-28 23:36           ` Joe Jin
2013-06-29  7:04           ` Eric Dumazet
2013-06-29  7:04           ` Eric Dumazet
2013-06-29  7:20           ` Eric Dumazet
2013-06-29  7:20           ` Eric Dumazet
2013-06-29  7:20             ` Eric Dumazet
2013-06-29 16:11             ` Ben Greear
2013-06-29 16:11             ` Ben Greear
2013-06-29 16:11               ` Ben Greear
2013-06-29 16:26               ` Eric Dumazet
2013-06-29 16:31                 ` Ben Greear
2013-06-29 16:31                 ` Ben Greear
2013-06-29 16:26               ` Eric Dumazet
2013-06-30  0:26             ` Joe Jin
2013-06-30  0:26               ` Joe Jin
2013-06-30  7:50               ` Eric Dumazet
2013-06-30  7:50               ` Eric Dumazet
2013-06-30  0:26             ` Joe Jin
2013-06-28 23:36         ` Joe Jin
2013-07-01 20:36         ` David Miller
2013-07-01 20:36         ` David Miller
2013-06-28  6:52     ` Eric Dumazet
2013-06-30  9:13     ` Alex Bligh
2013-06-30  9:13       ` Alex Bligh
2013-06-30  9:35       ` Alex Bligh
2013-06-30  9:35       ` Alex Bligh
2013-07-01  3:18       ` Joe Jin
2013-07-01  8:11         ` Ian Campbell
2013-07-01  8:11         ` Ian Campbell
2013-07-01 13:00           ` Joe Jin
2013-07-01 13:00           ` Joe Jin
2013-07-04  8:55           ` Joe Jin
2013-07-04  8:55           ` Joe Jin
2013-07-04  8:59             ` Ian Campbell
2013-07-04  8:59             ` Ian Campbell
2013-07-04  9:34               ` Eric Dumazet
2013-07-04  9:34               ` Eric Dumazet
2013-07-04  9:52                 ` Ian Campbell
2013-07-04  9:52                 ` Ian Campbell
2013-07-04 10:12                   ` Eric Dumazet
2013-07-04 10:12                   ` Eric Dumazet
2013-07-04 12:57                     ` Alex Bligh
2013-07-04 12:57                     ` Alex Bligh [this message]
2013-07-04 21:32                     ` David Miller
2013-07-04 21:32                     ` David Miller
2013-07-01  8:29         ` Alex Bligh
2013-07-01  8:29         ` Alex Bligh
2013-07-01  3:18       ` Joe Jin
2013-06-28  4:17   ` Joe Jin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=06F8DA5DD1D9E277F2AF6F1E@Ximines.local \
    --to=alex@alex.org.uk \
    --cc=Ian.Campbell@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=frank.blaschka@de.ibm.com \
    --cc=joe.jin@oracle.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xen.org \
    --cc=zheng.x.li@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.