netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Al Viro <viro-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org>
To: Christian Lamparter <chunkeey-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
Cc: Alan Curry <rlwinm-WF+c3Tt1nJM@public.gmane.org>,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	alexmcwhirter-O8/uFoRGvHWcqzYg7KEe8g@public.gmane.org
Subject: Re: PROBLEM: network data corruption (bisected to e5a4b0bb803b)
Date: Sun, 24 Jul 2016 20:02:37 +0100	[thread overview]
Message-ID: <20160724190237.GP2356@ZenIV.linux.org.uk> (raw)
In-Reply-To: <1659922.nTqITfJpFk@debian64>

On Sun, Jul 24, 2016 at 07:45:13PM +0200, Christian Lamparter wrote:

> > The symptom is that downloaded files (http, ftp, and probably other
> > protocols) have small corrupted segments (about 1-2 kilobytes long) in
> > random locations. Only downloads that sustain a high speed for at least a
> > few seconds are corrupted. Anything small enough to be received in less
> > than about 5 seconds is not affected.

Can that sucker be reproduced with netcat?  That would eliminate all issues
with multi-iovec recvmsg(2), narrowing the things down quite bit.

Another thing (and if that works, it's *NOT* a proper fix - it would be
papering over the problem, but at least it would show where to look for
it) - try (on top of mainline) the following delta:

diff --git a/net/core/datagram.c b/net/core/datagram.c
index b7de71f..0ee5995 100644
--- a/net/core/datagram.c
+++ b/net/core/datagram.c
@@ -734,7 +734,7 @@ int skb_copy_and_csum_datagram_msg(struct sk_buff *skb,
 	if (!chunk)
 		return 0;
 
-	if (msg_data_left(msg) < chunk) {
+	if (iov_iter_single_seg_count(&msg->msg_iter) < chunk) {
 		if (__skb_checksum_complete(skb))
 			goto csum_error;
 		if (skb_copy_datagram_msg(skb, hlen, msg, chunk))
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2016-07-24 19:02 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-24  3:35 PROBLEM: network data corruption (bisected to e5a4b0bb803b) Alan Curry
     [not found] ` <201607240335.u6O3ZE81014171-WF+c3Tt1nJM@public.gmane.org>
2016-07-24 17:45   ` Christian Lamparter
2016-07-24 19:02     ` Al Viro [this message]
2016-07-26  4:57       ` Alan Curry
2016-07-26 13:59         ` Christian Lamparter
2016-07-26 18:15           ` alexmcwhirter
2016-07-27  6:39             ` Kalle Valo
2016-07-27  1:14           ` Alan Curry
2016-07-27 10:32       ` Alan Curry
2016-07-27 18:04         ` alexmcwhirter
2016-07-27 23:02           ` alexmcwhirter
2016-07-27 23:45             ` David Miller
2016-07-28  0:31               ` Al Viro
2016-07-28  0:26                 ` alexmcwhirter
     [not found]                   ` <8b3126f66186015956e0f8090fb70532-O8/uFoRGvHWcqzYg7KEe8g@public.gmane.org>
2016-07-28  1:22                     ` Al Viro
2016-08-03  3:49                       ` Alan Curry
2016-08-03 12:43                         ` Christian Lamparter
2016-08-03 23:25                           ` Alan Curry
     [not found]                         ` <20160803054118.GG2356@ZenIV.linux.org.uk>
     [not found]                           ` <2363167.YiBS7sFNO2@debian64>
     [not found]                             ` <20160809145836.GQ2356@ZenIV.linux.org.uk>
     [not found]                               ` <20170210081126.GA14157@ZenIV.linux.org.uk>
2017-02-10 21:45                                 ` Al Viro
2017-02-11 19:37                                   ` Christian Lamparter
2017-02-12  5:42                                     ` Al Viro
2017-02-13 21:56                                       ` Christian Lamparter
2017-02-14  1:33                                         ` [PATCH][CFT] Saner error handling in skb_copy_datagram_iter() et.al. (was Re: PROBLEM: network data corruption (bisected to e5a4b0bb803b)) Al Viro
2017-02-17 15:54                                           ` [PATCH][CFT] Saner error handling in skb_copy_datagram_iter() et.al David Miller
2017-02-17 17:03                                             ` Al Viro
2017-02-18  0:02                                               ` Al Viro
2017-02-18  2:24                                                 ` Al Viro
2017-02-19 19:19                                                 ` Christian Lamparter
2017-02-20 15:14                                                 ` David Miller
2017-02-21 13:25                                                 ` David Laight
2016-07-26  4:32     ` PROBLEM: network data corruption (bisected to e5a4b0bb803b) Alan Curry
2016-07-26  4:38     ` alexmcwhirter

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=20160724190237.GP2356@ZenIV.linux.org.uk \
    --to=viro-3bdd1+5odreifsdqtta3olvcufugdwfn@public.gmane.org \
    --cc=alexmcwhirter-O8/uFoRGvHWcqzYg7KEe8g@public.gmane.org \
    --cc=chunkeey-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=rlwinm-WF+c3Tt1nJM@public.gmane.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).