Bug#521073: apt: apt-get fails on large files (>2GB) using http method
Package: apt
Version: 0.6.46.4-0.1
Severity: normal
Hello,
both the etch and lenny versions of apt are affected by this problem.
Downloading large source packages using 'apt-get source' via http leads to
the following error:
----------8<----------
thart@hamilton:mnt$ apt-get source bigpkg
Reading package lists... Done
Building dependency tree... Done
Need to get 2147MB of source archives.
Get:1 http://apt-etch.math.uni-paderborn.de etch/main bigpkg
7.7.0.471-1 (dsc) [284B]
Get:2 http://apt-etch.math.uni-paderborn.de etch/main bigpkg
7.7.0.471-1 (tar) [2147MB]
Err http://apt-etch.math.uni-paderborn.de etch/main bigpkg 7.7.0.471-1
(tar)
Error writing to output file - write (27 File too large)
Fetched 284B in 1m40s (3B/s)
Failed to fetch
http://apt-etch.math.uni-paderborn.de/.../bigpkg_7.7.0.471-1.tar.gz
Error writing to output file - write (27 File too large)
E: Failed to fetch some archives.
----------8<----------
strace reports the following:
----------8<----------
write(4, "\232\17p\31\25\220\313}\346\263\272\261`\351h\277_x_\370"...,
11334) = 949
write(4, "\346\266M\343\240\371\217-\7TX*}\"\332\265ko\2631\213s"...,
10385) = -1 EFBIG (File too large)
fcntl64(4, F_GETFL) = 0x802 (flags
O_RDWR|O_NONBLOCK)
fcntl64(4, F_SETFL, O_RDWR) = 0
write(4, "\346\266M\343\240\371\217-\7TX*}\"\332\265ko\2631\213s"...,
10385) = -1 EFBIG (File too large)
close(4) = 0
time([1237911654]) = 1237911654
utime("bigpkg_7.7.0.471-1.tar.gz", [2008/11/04-19:18:05,
2008/11/04-19:18:05]) = 0
----------8<----------
A rebuild of apt with _LARGEFILE_SOURCE and _FILE_OFFSET_BITS=64 defined
succeeded, but calling apt-get as shown above leads to wired behavior and a
(possible) infinite loop at the end of the download process.
-- Package-specific info:
-- apt-config dump --
APT "";
APT::Architecture "i386";
APT::Build-Essential "";
APT::Build-Essential:: "build-essential";
APT::Cache-Limit "25165824";
APT::Install-Recommends "false";
APT::Install-Suggests "false";
APT::Get "";
APT::Get::Show-Upgraded "true";
APT::Get::List-Cleanup "true";
APT::Get::ReInstall "false";
APT::Get::AllowUnauthenticated "true";
Dir "/";
Dir::State "var/lib/apt/";
Dir::State::lists "lists/";
Dir::State::cdroms "cdroms.list";
Dir::State::userstatus "status.user";
Dir::State::status "/var/lib/dpkg/status";
Dir::Cache "var/cache/apt/";
Dir::Cache::archives "archives/";
Dir::Cache::srcpkgcache "srcpkgcache.bin";
Dir::Cache::pkgcache "pkgcache.bin";
Dir::Etc "etc/apt/";
Dir::Etc::sourcelist "sources.list";
Dir::Etc::sourceparts "sources.list.d";
Dir::Etc::vendorlist "vendors.list";
Dir::Etc::vendorparts "vendors.list.d";
Dir::Etc::main "apt.conf";
Dir::Etc::parts "apt.conf.d";
Dir::Etc::preferences "preferences";
Dir::Bin "";
Dir::Bin::methods "/usr/lib/apt/methods";
Dir::Bin::dpkg "/usr/bin/dpkg";
DPkg "";
DPkg::Pre-Install-Pkgs "";
DPkg::Pre-Install-Pkgs:: "/usr/sbin/dpkg-preconfigure --apt || true";
DPkg::Options "";
DPkg::Options:: "--abort-after=4711";
DPkg::Options:: "--force-overwrite";
-- (/etc/apt/preferences present, but not submitted) --
-- (/etc/apt/sources.list present, but not submitted) --
-- System Information:
Debian Release: 4.0
APT prefers oldstable
APT policy: (500, 'oldstable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.27.5-client
Locale: LANG=C, LC_CTYPE=de_DE@euro (charmap=ISO-8859-15)
Versions of packages apt depends on:
ii debian-archive-keyr 2007.07.31~etch1 GnuPG archive keys of the Debian a
ii libc6 2.3.6.ds1-13etch9+b1 GNU C Library: Shared libraries
ii libgcc1 1:4.1.1-21 GCC support library
ii libstdc++6 4.1.1-21 The GNU Standard C++ Library v3
apt recommends no packages.
-- no debconf information
Reply to: