← Back to team overview

touch-packages team mailing list archive

[Bug 1416657] [NEW] apt-get fails on lucid i386 with large filesystem (statvfs (75: Value too large for defined data type))

 

Public bug reported:

Using Lucid-i386, apt version:
ii  apt                    0.7.25.3ubuntu7        Advanced front-end for dpkg

Attempting to get a package:
# apt-get install sudo                                             
Reading package lists... Done
Building dependency tree... Done
The following NEW packages will be installed:
  sudo
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 312kB of archives.
After this operation, 602kB of additional disk space will be used.
W: Couldn't determine free space in /var/cache/apt/archives/ - statvfs (75: Value too large for defined data type)
E: Handler silently failed

This bug has been reported and fixed in Debian: https://bugs.debian.org
/cgi-bin/bugreport.cgi?bug=590513

Reply to this bug report is reproduced here for convenience:

On Mo, 2010-07-26 at 15:23 -0700, David Bronaugh wrote:
> Package: apt
> Version: 0.7.25.3
> 
> When I try to install a package inside an i386 chroot on this machine
> (which resides on a 20TB XFS filesystem), it fails to even get to
> downloading the package with the following error messages:
> 
> root@windy:~# apt-get install tinywm
> Reading package lists... Done
> Building dependency tree       
> Reading state information... Done
> The following extra packages will be installed:
>   libx11-6 libx11-data libxau6 libxcb1 libxdmcp6
> The following NEW packages will be installed:
>   libx11-6 libx11-data libxau6 libxcb1 libxdmcp6 tinywm
> 0 upgraded, 6 newly installed, 0 to remove and 6 not upgraded.
> Need to get 1131kB of archives.
> After this operation, 4346kB of additional disk space will be used.
> W: Couldn't determine free space in /var/cache/apt/archives/ - statvfs
> (75: Value too large for defined data type)
> E: Handler silently failed
> root@windy:~#
> 
> It seems like this is likely a result of integer overflow in the data
> structure that statvfs returns. Therefore, it would seem the path
> forward is to use statvfs64().

Fixed in bzr:

=== modified file 'cmdline/apt-get.cc'
--- cmdline/apt-get.cc	2010-07-05 09:34:35 +0000
+++ cmdline/apt-get.cc	2010-07-27 11:21:03 +0000
@@ -25,6 +25,9 @@
    ##################################################################### */
 									/*}}}*/
 // Include Files							/*{{{*/
+#define _LARGEFILE_SOURCE
+#define _LARGEFILE64_SOURCE
+
 #include <apt-pkg/error.h>
 #include <apt-pkg/cmndline.h>
 #include <apt-pkg/init.h>
@@ -63,6 +66,9 @@
 #include <regex.h>
 #include <sys/wait.h>
 #include <sstream>
+
+#define statfs statfs64
+#define statvfs statvfs64
 									/*}}}*/
 
 #define RAMFS_MAGIC     0x858458f6

=== modified file 'debian/changelog'
--- debian/changelog	2010-07-23 14:13:15 +0000
+++ debian/changelog	2010-07-27 11:27:18 +0000
@@ -5,6 +5,9 @@ apt (0.7.26~exp11) experimental; urgency
     - Add to history whether a change was automatic or not.
   * apt-pkg/contrib/fileutl.cc:
     - Add FileFd::OpenDescriptor() (needed for python-apt's #383617).
+  * cmdline/apt-get.cc:
+    - Support large filesystems by using statvfs64() instead of statvfs()
+      and statfs64() instead of statfs() (Closes: #590513).
 
  -- Julian Andres Klode <jak@xxxxxxxxxx>  Wed, 21 Jul 2010 17:09:11 +0200

** Affects: apt (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: i386 lucid

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1416657

Title:
  apt-get fails on lucid i386 with large filesystem (statvfs (75: Value
  too large for defined data type))

Status in apt package in Ubuntu:
  New

Bug description:
  Using Lucid-i386, apt version:
  ii  apt                    0.7.25.3ubuntu7        Advanced front-end for dpkg

  Attempting to get a package:
  # apt-get install sudo                                             
  Reading package lists... Done
  Building dependency tree... Done
  The following NEW packages will be installed:
    sudo
  0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
  Need to get 312kB of archives.
  After this operation, 602kB of additional disk space will be used.
  W: Couldn't determine free space in /var/cache/apt/archives/ - statvfs (75: Value too large for defined data type)
  E: Handler silently failed

  This bug has been reported and fixed in Debian:
  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=590513

  Reply to this bug report is reproduced here for convenience:

  On Mo, 2010-07-26 at 15:23 -0700, David Bronaugh wrote:
  > Package: apt
  > Version: 0.7.25.3
  > 
  > When I try to install a package inside an i386 chroot on this machine
  > (which resides on a 20TB XFS filesystem), it fails to even get to
  > downloading the package with the following error messages:
  > 
  > root@windy:~# apt-get install tinywm
  > Reading package lists... Done
  > Building dependency tree       
  > Reading state information... Done
  > The following extra packages will be installed:
  >   libx11-6 libx11-data libxau6 libxcb1 libxdmcp6
  > The following NEW packages will be installed:
  >   libx11-6 libx11-data libxau6 libxcb1 libxdmcp6 tinywm
  > 0 upgraded, 6 newly installed, 0 to remove and 6 not upgraded.
  > Need to get 1131kB of archives.
  > After this operation, 4346kB of additional disk space will be used.
  > W: Couldn't determine free space in /var/cache/apt/archives/ - statvfs
  > (75: Value too large for defined data type)
  > E: Handler silently failed
  > root@windy:~#
  > 
  > It seems like this is likely a result of integer overflow in the data
  > structure that statvfs returns. Therefore, it would seem the path
  > forward is to use statvfs64().

  Fixed in bzr:

  === modified file 'cmdline/apt-get.cc'
  --- cmdline/apt-get.cc	2010-07-05 09:34:35 +0000
  +++ cmdline/apt-get.cc	2010-07-27 11:21:03 +0000
  @@ -25,6 +25,9 @@
      ##################################################################### */
   									/*}}}*/
   // Include Files							/*{{{*/
  +#define _LARGEFILE_SOURCE
  +#define _LARGEFILE64_SOURCE
  +
   #include <apt-pkg/error.h>
   #include <apt-pkg/cmndline.h>
   #include <apt-pkg/init.h>
  @@ -63,6 +66,9 @@
   #include <regex.h>
   #include <sys/wait.h>
   #include <sstream>
  +
  +#define statfs statfs64
  +#define statvfs statvfs64
   									/*}}}*/
   
   #define RAMFS_MAGIC     0x858458f6

  === modified file 'debian/changelog'
  --- debian/changelog	2010-07-23 14:13:15 +0000
  +++ debian/changelog	2010-07-27 11:27:18 +0000
  @@ -5,6 +5,9 @@ apt (0.7.26~exp11) experimental; urgency
       - Add to history whether a change was automatic or not.
     * apt-pkg/contrib/fileutl.cc:
       - Add FileFd::OpenDescriptor() (needed for python-apt's #383617).
  +  * cmdline/apt-get.cc:
  +    - Support large filesystems by using statvfs64() instead of statvfs()
  +      and statfs64() instead of statfs() (Closes: #590513).
   
    -- Julian Andres Klode <jak@xxxxxxxxxx>  Wed, 21 Jul 2010 17:09:11 +0200

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1416657/+subscriptions


Follow ups

References