Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

What is APT::Cache-Start ?

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
shirish
Posts: 845
Joined: 2010-12-08 12:59

What is APT::Cache-Start ?

#1 Post by shirish »

Hi all,
I was running my updates and got this :-

Code: Select all

$ sudo aptitude update
[sudo] password for shirish: 
Hit http://qt-kde.debian.net experimental-snapshots Release.gpg
Hit http://qt-kde.debian.net experimental-snapshots Release
Get: 1 http://ftp.debian.org wheezy Release.gpg [836 B]
Hit http://qt-kde.debian.net experimental-snapshots/main Sources
Get: 2 http://ftp.debian.org unstable Release.gpg [836 B]
Hit http://qt-kde.debian.net experimental-snapshots/main amd64 Packages
Get: 3 http://ftp.debian.org experimental Release.gpg [836 B]
Get: 4 http://ftp.debian.org stable Release.gpg [1,672 B]  
...............
.............
............
Get: 18 http://ftp.debian.org unstable/main 2013-03-20-1412.12.pdiff [1,148 B]                                                                                
Get: 19 http://ftp.debian.org experimental/main amd64 2013-03-20-1412.12.pdiff [5,438 B]                                                                      
Fetched 704 kB in 14s (49.2 kB/s)
E: Dynamic MMap ran out of room. Please increase the size of APT::Cache-Start. Current value: 38797312. (man 5 apt.conf)
Unable to increase the size of the MMap as the limit of 38388608 bytes is already reached.
Dynamic MMap ran out of room. Please increase the size of APT::Cache-Start. Current value: 38797312. (man 5 apt.conf)
Error occurred while processing knetwalk (NewFileVer1)
Problem with MergeList /var/lib/dpkg/status
The package lists or status file could not be parsed or opened.
Can't call method "policy" on an undefined value at /usr/bin/apt-show-versions line 56.
E: Problem executing scripts APT::Update::Post-Invoke-Success 'test -x /usr/bin/apt-show-versions || exit 0 ; apt-show-versions -i'
E: Sub-process returned an error code
E: Couldn't rebuild package cache
E: Dynamic MMap ran out of room. Please increase the size of APT::Cache-Start. Current value: 38797312. (man 5 apt.conf)
E: Unable to increase the size of the MMap as the limit of 38388608 bytes is already reached.
E: Dynamic MMap ran out of room. Please increase the size of APT::Cache-Start. Current value: 38797312. (man 5 apt.conf)
E: Error occurred while processing knetwalk (NewFileVer1)
E: Problem with MergeList /var/lib/dpkg/status
E: The package lists or status file could not be parsed or opened.
E: Dynamic MMap ran out of room. Please increase the size of APT::Cache-Start. Current value: 38797312. (man 5 apt.conf)

E: Unable to increase the size of the MMap as the limit of 38388608 bytes is already reached.
E: Dynamic MMap ran out of room. Please increase the size of APT::Cache-Start. Current value: 38797312. (man 5 apt.conf)
E: Error occurred while processing knetwalk (NewFileVer1)
E: Problem with MergeList /var/lib/dpkg/status
E: The package lists or status file could not be parsed or opened.
Now while I promptly changed the APT::Cache-Start from 38797312 to 78797312, I was not able to understand what MMap is and how did it reach there ? MMap is some kind of memory as in Memory Map or something ?

What could have made it reach the limit, looking for answers.
Intel Dual-Core CPU E5400 (soc 775) @ 2.70GHz, onboard Intel G33, Asus MB P5KPL-AM IN (Intel G31), D-Link 2750u modem+router, 64-bit Debian Testing, Mate 1.26

kmathern
Posts: 603
Joined: 2011-02-05 19:20

Re: What is APT::Cache-Start ?

#2 Post by kmathern »

Maybe this will help.

Code: Select all

$ man apt.conf | grep Cache-Start -B1 -A5

       Cache-Start, Cache-Grow, Cache-Limit
           APT uses since version 0.7.26 a resizable memory mapped cache file to store the
           available information.  Cache-Start acts as a hint of the size the cache will grow to,
           and is therefore the amount of memory APT will request at startup. The default value
           is 20971520 bytes (~20 MB). Note that this amount of space needs to be available for
           APT; otherwise it will likely fail ungracefully, so for memory restricted devices this
           value should be lowered while on systems with a lot of configured sources it should be
           increased.  Cache-Grow defines in bytes with the default of 1048576 (~1 MB) how much
           the cache size will be increased in the event the space defined by Cache-Start is not
           enough. This value will be applied again and again until either the cache is big
           enough to store all information or the size of the cache reaches the Cache-Limit. The
           default of Cache-Limit is 0 which stands for no limit. If Cache-Grow is set to 0 the
           automatic growth of the cache is disabled.


shirish
Posts: 845
Joined: 2010-12-08 12:59

Re: What is APT::Cache-Start ?

#3 Post by shirish »

@kmathern, thanx. The man page does tell what happens but it doesn't tell the whole story. Does it have anything to do with user-session being spread over days and using aptitude update over time or what? The man page seems to be a bit muddled or unclear about that (or my understanding is not to the point) . I would be glad if somebody tells me.

Also is there a way to know how much of the cache is already done/used up other than aptitude suddenly screeching up?

Code: Select all

~$ uptime
 05:26:12 up 3 days, 20:16, 1 user, load average: 0.77, 0.66, 0.72
Looking forward to more info.
Intel Dual-Core CPU E5400 (soc 775) @ 2.70GHz, onboard Intel G33, Asus MB P5KPL-AM IN (Intel G31), D-Link 2750u modem+router, 64-bit Debian Testing, Mate 1.26

User avatar
llivv
Posts: 5340
Joined: 2007-02-14 18:10
Location: cold storage

Re: What is APT::Cache-Start ?

#4 Post by llivv »

shirish wrote:Also is there a way to know how much of the cache is already done/used up other than aptitude suddenly screeching up?
apt-cache stats
In memory of Ian Ashley Murdock (1973 - 2015) founder of the Debian project.

shirish
Posts: 845
Joined: 2010-12-08 12:59

Re: What is APT::Cache-Start ?

#5 Post by shirish »

llivv wrote:
shirish wrote:Also is there a way to know how much of the cache is already done/used up other than aptitude suddenly screeching up?
apt-cache stats
Thanx for sharing that. That command has some 'interesting' results :)

Code: Select all

$ apt-cache stats
Total package names: 59041 (1,181 k)
Total package structures: 59041 (3,306 k)
  Normal packages: 43280
  Pure virtual packages: 2200
  Single virtual packages: 5758
  Mixed virtual packages: 1353
  Missing: 6450
Total distinct versions: 77583 (5,586 k)
Total distinct descriptions: 93677 (2,248 k)
Total dependencies: 496625 (13.9 M)
Total ver/file relations: 118059 (2,833 k)
Total Desc/File relations: 93677 (2,248 k)
Total Provides mappings: 16633 (333 k)
Total globbed strings: 183 (1,912 )
Total dependency version space: 2,004 k
Total slack space: 39.3 k
Total space accounted for: 26.0 M
I think the last one is the one which I am/was concerned about :-

Code: Select all

Total space accounted for: 26.0 M
So guess it means that the apt-cache has taken 26 MB of my space.
Intel Dual-Core CPU E5400 (soc 775) @ 2.70GHz, onboard Intel G33, Asus MB P5KPL-AM IN (Intel G31), D-Link 2750u modem+router, 64-bit Debian Testing, Mate 1.26

User avatar
Francewhoa
Posts: 33
Joined: 2013-04-12 17:59
Location: Sept-Iles, Quebec, Canada
Has thanked: 6 times

Re: What is APT::Cache-Start ?

#6 Post by Francewhoa »

Same challenge here. The following three steps fixed it for me.

1. Run this command to clear all apt-get caches. This would remove or add anything. It's just for cleaning.

Code: Select all

sudo apt-get clean
2. Try again whatever was not working before. For example.

Code: Select all

sudo apt-get update
3. This error is now resolved the challenge with this error: "E: Problem executing scripts APT:"

The above won't resolve all the challenges you listed above. Only "E: Problem executing scripts APT:"
- - -
Loving back your Debian community result in multiple benefits for you. https://www.debian.org/intro/help

Post Reply