From: Eric Dumazet <dada1@cosmosbay.com>
To: Holger Hoffstaette <holger@wizards.de>
Cc: linux-kernel@vger.kernel.org, Linux Netdev List <netdev@vger.kernel.org>
Subject: Re: Reproducible data corruption with sendfile+vsftp - splice regression?
Date: Fri, 30 Nov 2007 09:07:53 +0100 [thread overview]
Message-ID: <474FC4D9.3020506@cosmosbay.com> (raw)
In-Reply-To: <pan.2007.11.29.23.42.52.661624@wizards.de>
Holger Hoffstaette a écrit :
> Hi -
>
> This regular Linux user and lkml lurker just noticed data corruption in
> ftp'ed files and narrowed it down to vsftpd using sendfile(). So far this
> has never caused problems in the past; I have not noticed this with
> 2.6.22.x but may have missed it. I do remember reading about some changes
> to the underlying splice stuff since .23 so that may have something to do
> with it.
>
> The scenario:
>
> - created a file with known bit pattern on Linux server
> - ftp-got this file to Windows client: file has bad crc (yes, binary)
> - verified with another client: same result
>
> I have thus far eliminated (to the best of my knowledge) NICs, switches,
> cables, the Windows FTP clients, the hard disk in the server (SATA, ext3):
> nothing suspicious in any logs. Box is an AMD Sempron 2600+ with 1.5 GB
> RAM, added rt8169 card, Gentoo, vsftpd stable 2.0.5 - nothing fancy.
> Transferring the file with samba (interestingly with sendfile enabled) and
> via ftp but from /dev/shm repeatably works fine; pulling from disk creates
> bad crc, every time. The file is readable and can be copied, verified etc.
> over and over so I'm sure that I'm not falling prey to a false positive.
> ifconfig indicates no dropped or otherwise corrupted packets.
> I noticed this first with 2.6.4-rc3, but also just tried the latest stable
> 2.6.23.9 with the same config, with no change in behaviour. After setting
> vsftpd to use_sendfile=NO, gigs can be transferred without corruption.
>
> The data corruption is sporadic, but absolutely repeatable. The file with
> the known good pattern just contains multiple lines of:
>
> 012345678901234567890123456789012345678901234567890
> 012345678901234567890123456789012345678901234567890
> 012345678901234567890123456789012345678901234567890
> ..etc..
>
> A corrupted file is missing random characters, so that the corrupted lines
> looks like this (line numbers added by me):
>
> 19785: 012345678901234567890123456789012345678901234567890
> 19786: 01234567890123456789012345678901234567890123678901234567890
> 19787: 012345678901234567890123456789012345678901234567890
>
> or:
>
> 20074: 012345678901234567890123456789012345678901234567890
> 20075: 01234567890123456789012345678901234567890123012345678901234567890123456789012345678901234567890
> 20076: 012345678901234567890123456789012345678901234567890
>
> Again, other network or hd traffic shows no signs of gremlins; the box is
> perfectly stable, and turning sendfile on or off triggers/untriggers the
> corruption reliably. I will try 2.6.22.x over the weekend, and before I
> bother lkml with dmesg/.config etc. I wanted to fish for initial thoughts.
>
CC to netdev, it might concern network guys
Could you try with a test file containing unique patterns ?
like a 80 MB file :
#include <stdio.h>
main()
{
unsigned long ul;
for (ul = 0 ; ul < 10000000 ; ul++)
printf("%8lu", ul);
return 0;
}
Thank you
next parent reply other threads:[~2007-11-30 8:08 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <pan.2007.11.29.23.42.52.661624@wizards.de>
2007-11-30 8:07 ` Eric Dumazet [this message]
2007-11-30 9:20 ` Reproducible data corruption with sendfile+vsftp - splice regression? Holger Hoffstaette
2007-11-30 10:39 ` Holger Hoffstaette
2007-11-30 18:26 ` Rick Jones
2007-12-02 16:00 ` Holger Hoffstaette
2007-12-02 20:49 ` Holger Hoffstaette
2007-12-05 22:54 ` Francois Romieu
2007-12-06 1:13 ` Francois Romieu
2007-12-06 9:41 ` Holger Hoffstaette
2007-12-06 9:28 ` Holger Hoffstaette
2007-12-06 18:44 ` Francois Romieu
2007-12-08 15:28 ` Mark Lord
2007-12-13 2:19 ` Holger Hoffstaette
2007-12-15 10:24 ` Holger Hoffstaette
2007-12-15 13:43 ` Holger Hoffstaette
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=474FC4D9.3020506@cosmosbay.com \
--to=dada1@cosmosbay.com \
--cc=holger@wizards.de \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.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).