FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 10-16-2010, 08:49 PM
Pasi Kärkkäinen
 
Default Bug in curl makes Fedora ftp:// URL installations fail with some mirrors

Hello,

This bug is present in Fedora 13, and probably in Fedora 14 aswell.

Initial report about the issue:
"Fedora 13 installer fails to fetch some files from FTP mirror and installation fails, wget works ok":
https://bugzilla.redhat.com/show_bug.cgi?id=624431

Actual bug:
"curl range support (REST) is broken with some FTP servers: "(28) FTP response timeout":
https://bugzilla.redhat.com/show_bug.cgi?id=643656

Short version: Anaconda installer uses urlgrabber to grab the rpms from the mirror site,
and urlgrabber uses pycurl, which uses curl. When anaconda requests urlgrabber
to skip the rpm headers using byte ranges, it makes curl to issue ftp REST
command to skip specific amount of bytes. Curl doesn't seem to work with
some FTP servers when using the REST command, and the transfer times out, and fails,
which makes the whole Fedora installation fail.

Example of failing Fedora mirror: ftp.funet.fi (which is the original home of Linux kernel,
and it's a very well connected FTP mirror site in Europe).

You can reproduce the bug like this:
curl -o iputils-20071127-10.fc13.x86_64.rpm --range 1384-1400 ftp://ftp.funet.fi/pub/mirrors/fedora.redhat.com/pub/fedora/linux/releases/13/Fedora/x86_64/os/Packages/iputils-20071127-10.fc13.x86_64.rpm

It gives error "(28) FTP response timeout" after around one minute.
(1384 is the size of the header in many rpms).

-- Pasi

--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 10-17-2010, 08:29 AM
"Richard W.M. Jones"
 
Default Bug in curl makes Fedora ftp:// URL installations fail with some mirrors

On Sat, Oct 16, 2010 at 11:49:39PM +0300, Pasi Kärkkäinen wrote:
> You can reproduce the bug like this:
> curl -o iputils-20071127-10.fc13.x86_64.rpm --range 1384-1400 ftp://ftp.funet.fi/pub/mirrors/fedora.redhat.com/pub/fedora/linux/releases/13/Fedora/x86_64/os/Packages/iputils-20071127-10.fc13.x86_64.rpm
>
> It gives error "(28) FTP response timeout" after around one minute.
> (1384 is the size of the header in many rpms).

That command worked fine for me, with curl-7.21.0-5.fc14.x86_64, but I
realized that it worked because I was using a proxy. So I would
suggest people do:

unset ftp_proxy

before running the test. The command fails in the way you described
without a proxy.

I looked at the trace (curl -v) and it looks like the FTP server
itself is not responding correctly. The problem does not seem to be
the REST command, but the short RETR: curl only downloads 17 bytes
then closes the connection, but this appears to confuse the FTP
server. The FTP server appears to die when this happens, whereas I
think I would expect it to send an error message on the control
connection.

Rich.

--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
New in Fedora 11: Fedora Windows cross-compiler. Compile Windows
programs, test, and build Windows installers. Over 70 libraries supprt'd
http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 10-18-2010, 02:44 PM
Chris Adams
 
Default Bug in curl makes Fedora ftp:// URL installations fail with some mirrors

Once upon a time, Chuck Anderson <cra@WPI.EDU> said:
> On Sun, Oct 17, 2010 at 02:03:20PM +0300, Pasi Kärkkäinen wrote:
> > Yes, indeed, it seems more likely a bug in the FTP server (pure-ftpd),
> > but it would be very nice to have a workaround in curl or in anaconda for
> > it..
>
> Why not fix the the problem at the source?

Under the "be generous in what you accept", curl should be changed to
handle this (especially if other clients can handle it).

Looking at a packet dump, I'm not sure which side is at fault. FTP
allows you to specify the start of data (start at offset 1384) but not
an end, so the only way to get less than the full rest of the file is to
abort the data transfer. It looks like curl just closes the data socket
without sending an ABOR on the command socket, so I think the server is
allowed to dump the client.

It would be nicer for the server to handle this better as well, but I
think the problem starts with curl.
--
Chris Adams <cmadams@hiwaay.net>
Systems and Network Administrator - HiWAAY Internet Services
I don't speak for anybody but myself - that's enough trouble.
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 10-18-2010, 03:27 PM
John Reiser
 
Default Bug in curl makes Fedora ftp:// URL installations fail with some mirrors

On 10/18/2010 07:44 AM, Chris Adams wrote:
[good analysis snipped]
> It would be nicer for the server to handle this better as well, but I
> think the problem starts with curl.

All _three_ parties have work to do:

1. curl has a bug when terminating a transfer before end-of-file: should
send ABOR on the command channel before early close() on the data channel.
2. The server has a Usability bug in not resuming the command channel
after the timeout on the data channel.
3. anaconda has a bug (installer fails to fetch some files) because
there is no recovery action when pycurl fails. Default should be
to try two or three times, each time skipping over the files
which were fetched successfully.

--
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 

Thread Tools




All times are GMT. The time now is 10:47 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org