[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#172777: apt: Patch to tell user how to fix MMap problem



Followup-For: Bug #172777
Package: apt
Version: 0.5.4.1

I have also run into the problem with Dynamic MMap running out of room
with two many things in my sources.list; a solution is to specify an
increased APT::Cache-Limit; the attached patch will tell the user how
to do that if the current workspace size is the default of 6MB.  Another
patch would be to fix apt-pkg/pkgcachegen.cc to increase the default.
The best fix would be to make the mmap fully dynamic so that exactly the
needed amount of space is used.

You may want to remove the if test and always provide the more detailed 
error message; I thought to only apply it in the case where the current
default is being used.

The package version 0.5.4.1 is my testing bump on the version to make
sure the patch compiles, installs, and runs correctly.
     -Eric

*** mmap.cc-orig	2003-02-06 15:35:43.000000000 -0800
--- mmap.cc	2003-02-06 15:38:37.000000000 -0800
***************
*** 211,217 ****
     // Just in case error check
     if (Result + Size > WorkSpace)
     {
!       _error->Error("Dynamic MMap ran out of room");
        return 0;
     }
  
--- 211,223 ----
     // Just in case error check
     if (Result + Size > WorkSpace)
     {
!       if (WorkSpace == 6*1024*1024) {
!           _error->Error("Dynamic MMap ran out of room\n"
! 	                " you may be able to put the line 'APT::Cache-Limit 12582912;'\n"
! 			" into a file in /etc/apt.conf.d to fix this problem.\n");
!       } else {
!           _error->Error("Dynamic MMap ran out of room");
!       }
        return 0;
     }
  

-- System Information
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux eric-6100 2.4.20 #1 Sat Dec 14 21:36:04 PST 2002 i686
Locale: LANG=en_US, LC_CTYPE=en_US

Versions of packages apt depends on:
ii  libc6                        2.3.1-10    GNU C Library: Shared libraries an
ii  libstdc++2.10-glibc2.2       1:2.95.4-11 The GNU stdc++ library



Reply to: