Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 30985 - Wget dies with "file size limit exceeded" on files > 2 gigs
Summary: Wget dies with "file size limit exceeded" on files > 2 gigs
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Seemant Kulleen (RETIRED)
URL:
Whiteboard:
Keywords:
: 75596 86569 92525 (view as bug list)
Depends on: 14606
Blocks:
  Show dependency tree
 
Reported: 2003-10-12 13:24 UTC by katerina
Modified: 2005-11-06 11:20 UTC (History)
8 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to fix 2G limit (wget-1.9.1-2Glimit.diff,18.74 KB, patch)
2003-11-19 18:24 UTC, Greg Fitzgerald (RETIRED)
Details | Diff
patch to fix 2GB download limit (wget-1.9.1-2Glimit.diff,18.13 KB, patch)
2003-11-19 18:30 UTC, Greg Fitzgerald (RETIRED)
Details | Diff
wget-cvs_LFS.diff (for wget-cvs version) (wget-cvs_LFS.diff,23.76 KB, patch)
2004-05-22 21:37 UTC, Octavio Ruiz (Ta^3)
Details | Diff
LFS patch against wget-1.9.1 from Fedora Core 2 (wget-1.9.1-LFS.patch,47.60 KB, patch)
2005-03-28 00:10 UTC, Mike Gilbert
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description katerina 2003-10-12 13:24:14 UTC
When attempting to download a file of over two gigabytes, wget dies, and I see:
zsh: file size limit exceeded wget --ignore-length
http://not.the.real.url/bigfile.tar.
Also, wget without --ignore-length thinks that a 2.5 gig file has a negative
length, and dies at zero bytes.  This seems to be a known bug in wget;
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=137989 mentions it and has a
patch (which I've not tried).

Reproducible: Always
Steps to Reproduce:
1. Try to download a file over 2 gigabytes in size with wget.
2. Try again with --ignore-length as it will have downloaded 0 bytes, claiming a
negative length.
3. At 2 gigabytes, it will stop downloading and you will recieve a "file size
limit exceeded" message.
Actual Results:  
Wget refuses to download more than zero bytes of the file without
--ignore-length, as it thinks that the Content-Length header is a negative
number.  With --ignore-length, it downloads two gigabytes and stops.

Expected Results:  
Wget should correctly deal with large files and long Content-Length headers.

I can create files larger than this using dd, which do not appear to cause any
problems; there are no limits/ulimits/quotas/etc which prevent me from having
files > 2 gigabytes large.

Portage 2.0.49-r10 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r1, 2.4.22)
=================================================================
System uname: 2.4.22 i686 AMD Athlon(TM) XP 2500+
Gentoo Base System version 1.4.3.10p1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-mcpu=athlon-xp -O2 -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config
/usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
/usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-mcpu=athlon-xp -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="sandbox ccache autoaddcvs"
GENTOO_MIRRORS="http://www.mirror.ac.uk/sites/www.ibiblio.org/gentoo/
ftp://gentoo.inode.at/source/ http://ftp.uni-erlangen.de/pub/mirrors/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 apm avi gif jpeg libg++ mad mikmod mpeg ncurses pdflib png xml2 xmms
zlib gdbm berkdb slang readline tetex bonobo X sdl gpm tcpd pam libwww ssl perl
imlib oggvorbis gtk qt mozilla 3dnow acl alsa -arts canna cdr cjk crypt csope
cups dvd encode -esd foomaticdb freewnn gatos -gnome guile ipv6 java jikes junit
-kde -motif nls opengl -oss python quicktime ruby scanner -svga spell tcltk
truetype usb videos xinerama xv video_cards_radeon"
Comment 1 Seemant Kulleen (RETIRED) gentoo-dev 2003-10-14 21:39:05 UTC
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=181634

We need a hacker :/
Comment 2 Seemant Kulleen (RETIRED) gentoo-dev 2003-10-14 22:42:17 UTC
wget-1.8.2-r3 in portage should solve this.
Comment 3 Aaron Brice 2003-11-16 10:55:07 UTC
Still have this problem with wget 1.9.1.  Download died when it got to 2GB,
with error: "File size limit exceeded"

Comment 4 Seemant Kulleen (RETIRED) gentoo-dev 2003-11-16 11:21:02 UTC
reopening for new wget
Comment 5 Greg Fitzgerald (RETIRED) gentoo-dev 2003-11-19 17:04:56 UTC
We need someone to wiggle the patch in, doesn't apply clean.
Comment 6 Greg Fitzgerald (RETIRED) gentoo-dev 2003-11-19 18:24:08 UTC
Created attachment 20969 [details, diff]
Patch to fix 2G limit

Patch for the new wget (1.9.1) that resolves the 2G download limit.
Comment 7 Greg Fitzgerald (RETIRED) gentoo-dev 2003-11-19 18:30:58 UTC
Created attachment 20970 [details, diff]
patch to fix 2GB download limit

Cleaned up patch.
Comment 8 Greg Fitzgerald (RETIRED) gentoo-dev 2003-11-20 15:54:10 UTC
seemant / katerina can you please test this new patch? Thanks.
Comment 9 Octavio Ruiz (Ta^3) 2004-05-22 21:37:45 UTC
Created attachment 31870 [details, diff]
wget-cvs_LFS.diff (for wget-cvs version)

Alvaro Lopez <alvaro@gnu.org> hacked wget-cvs to support LFS (Large File
Support)

Patch attached, and you can find it at
http://www.alobbs.com/cherokee/wget-cvs_LFS.diff
Comment 10 Gerry 2004-07-17 06:54:21 UTC
Why isn't the 1.9.1 patch in portage yet ?  Doesn't it work ?
Comment 11 René Marten 2004-11-09 13:43:01 UTC
I've got some problems downloading >2GB files.
After googeling a bit, I've tried a CVS version of wget from here:

http://software.lpetrov.net/wget-LFS/ 

and it works for mit. But it's no solution at all.

So I noticed the patch there and I tried it, but it doesn't work.
A friend of me and I modified it do work with the 1.9.1 in portage.
The patch can be find here:

http://polynomial-c.homelinux.net/pub/gentoo/portage/net-misc/wget/files/wget-LFS-20040909-gentoo.patch.bz2

But I haven't testet it yet.

It might work or not. 


Comment 12 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2004-11-09 13:54:55 UTC
Hi,

there's also an (at least for x86 working) ebuild in http://polynomial-c.homelinux.net/pub/gentoo/portage/net-misc/wget/

The patch Rene mentioned applys against unpatched wget-1.9.1

Testing would be highly appreciated...

Poly
Comment 13 Karol Wojtaszek (RETIRED) gentoo-dev 2005-02-13 11:34:39 UTC
*** Bug 75596 has been marked as a duplicate of this bug. ***
Comment 14 René Marten 2005-03-02 14:17:52 UTC
Hmm, that doesn't work for me and it seems to work with these additional cflags:

-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE 

but I think  -D_FILE_OFFSET_BITS=64  should be enough.

Comment 15 Mike Gilbert gentoo-dev 2005-03-28 00:06:26 UTC
*** Bug 86569 has been marked as a duplicate of this bug. ***
Comment 16 Mike Gilbert gentoo-dev 2005-03-28 00:10:19 UTC
Created attachment 54647 [details, diff]
LFS patch against wget-1.9.1 from Fedora Core 2

The folks at Redhat are using this, and I've had no problems with it.
Comment 17 Sascha (kn0rki) Hoppe 2005-05-05 00:13:49 UTC
The patch from #16 works fine.
Comment 18 Seemant Kulleen (RETIRED) gentoo-dev 2005-05-11 04:36:33 UTC
ouch, I haven't been monitoring my bugs.  I added wget-1.9.1-r4 into portage yesterday with a set of Mandrake patches, the last one being largefilesupport.  Can you all please test and report?
Comment 19 Seemant Kulleen (RETIRED) gentoo-dev 2005-05-13 05:17:43 UTC
closing due to lack of response
Comment 20 Sven Wegener gentoo-dev 2005-05-13 11:34:56 UTC
*** Bug 92525 has been marked as a duplicate of this bug. ***
Comment 21 Mike Gilbert gentoo-dev 2005-05-14 16:33:10 UTC
Sorry for the lack of of response, it works great. I just finished downloading the SUSE 9.2 DVD iso, no problems.
Comment 22 Marcel Meckel 2005-11-03 01:28:26 UTC
Bug is still present, please reopen.


# wget -c ftp://ftp.freenet.de/pub/ftp.suse.com/pub/suse/i386/10.0/iso/SUSE-10.0-EvalDVD-i386-GM.
iso
--10:17:13--  ftp://ftp.freenet.de/pub/ftp.suse.com/pub/suse/i386/10.0/iso/SUSE-10.0-EvalDVD-i386-
GM.iso
           => `SUSE-10.0-EvalDVD-i386-GM.iso'
Resolving ftp.freenet.de... 194.97.2.68, 194.97.2.67, 194.97.2.70, ...
Connecting to ftp.freenet.de|194.97.2.68|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD /pub/ftp.suse.com/pub/suse/i386/10.0/iso ... done.
==> SIZE SUSE-10.0-EvalDVD-i386-GM.iso ... done.
==> PASV ... done.    ==> REST 2147483647 ... done.
==> RETR SUSE-10.0-EvalDVD-i386-GM.iso ... done.
Length: 3,621,957,632 (3.4G), 1,474,473,985 (1.4G) remaining

59% [++++++++++++++++++++++++++++++++++++++++++++++                                 ] 2,147,483,647  
 --.--K/s

nothing happens.


# emerge info
Portage 2.0.51.22-r3 (default-linux/x86/2005.0, gcc-3.3.6, glibc-2.3.5-r2, 2.6.11-hardened-r15 i686)
=================================================================
System uname: 2.6.11-hardened-r15 i686 Intel(R) Xeon(TM) CPU 3.00GHz
Gentoo Base System version 1.6.13
ccache version 2.3 [disabled]
dev-lang/python:     2.3.5-r2, 2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.20
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/
3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium4 -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="ftp://gentoo-mirror/gentoo ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo"
LANG="C"
LINGUAS="de"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://gentoo-mirror/gentoo-portage"
USE="x86 X acpi acpi4linux apache2 avi bash-completion berkdb bigger-fonts bitmap-fonts 
browserplugin bzlib crypt cups curldevfs26 dnd dvdread eds emboss fam font-server foomaticdb 
fortran freetype ftp gd gdbm gif gimp gimpprint gstreamer gtk gtk2 hardened hardenedphp iconv 
imagemagick imap imlib innodb ithreads java jpeg jpeg2k junit kde libg++ libgd libwww mailbox maildir 
mbox md5sum mime mmx mmx2 mozdevelop mozilla mozsvg mozxmlterm mp3 ncurses network nls 
nocd nsplugin ogg oss pam pam_console pdf pdflib perl png posix python qt quicktime readline rtc 
samba scanner silverxp sse sse2 ssl svg tcpd tga tiff truetype truetype-fonts type1 type1-fonts 
uudeview v4l v4l2 vorbis xml2 xprint xvid zlib linguas_de userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LC_ALL, LDFLAGS, PORTDIR_OVERLAY


# emerge -pv wget

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild   R   ] net-misc/wget-1.10.2  -build -debug -ipv6 +nls -socks5 +ssl -static 4 kB
Comment 23 Mike Gilbert gentoo-dev 2005-11-06 11:20:30 UTC
Your problem is not wget's fault, rather it's the mirror you are using.  Try a
different mirror,
ftp://suse.mirrors.tds.net/pub/suse/i386/10.0/iso/SUSE-10.0-EvalDVD-i386-GM.iso
works well.