Topic: A question that demands an answer, I guess...

Without getting too emotional about it, I'd just like to ask, what others think about the following situation.

1. Today I ran "sudo apt-get update", to install an xml editor, quanta.
2.

 E: Dynamic MMap ran out of room. Please increase the size of APT::Cache-Limit. Current value: 38797312. (man 5 apt.conf)

3. Being hinted with man 5 apt.conf I ran that.
4. Skimming the manual... manual too long, found nothing. Minutes gone.
5. Learning to highlight patterns in a manual, reskimming and finding the following:

Cache-Start, Cache-Grow and 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 to which size the
           Cache will grow and is therefore the amount of memory APT will request at
           startup. The default value is 20971520 bytes (~20 MB). Note that these amount
           of space need to be available for APT otherwise it will likely fail
           ungracefully, so for memory restricted devices these value should be lowered
           while on systems with a lot of configured sources this might be increased.
           Cache-Grow defines in byte 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. These 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 grow of the cache is disabled.

6. I've been through the manual 2 times with "cache" highlighted and couldn't find how to increase it. I also found something else in Chinese about directories, but I still don't see the file to be edited:

DIRECTORIES
       The Dir::State section has directories that pertain to local state information.
       lists is the directory to place downloaded package lists in and status is the
       name of the dpkg status file.  preferences is the name of the APT preferences
       file.  Dir::State contains the default directory to prefix on all sub items if
       they do not start with / or ./.

       Dir::Cache contains locations pertaining to local cache information, such as the
       two package caches srcpkgcache and pkgcache as well as the location to place
       downloaded archives, Dir::Cache::archives. Generation of caches can be turned off
       by setting their names to be blank. This will slow down startup but save disk
       space. It is probably preferred to turn off the pkgcache rather than the
       srcpkgcache. Like Dir::State the default directory is contained in Dir::Cache

       Dir::Etc contains the location of configuration files, sourcelist gives the
       location of the sourcelist and main is the default configuration file (setting
       has no effect, unless it is done from the config file specified by APT_CONFIG).

       The Dir::Parts setting reads in all the config fragments in lexical order from
       the directory specified. After this is done then the main config file is loaded.

       Binary programs are pointed to by Dir::Bin.  Dir::Bin::Methods specifies the
       location of the method handlers and gzip, bzip2, lzma, dpkg, apt-get dpkg-source
       dpkg-buildpackage and apt-cache specify the location of the respective programs.

       The configuration item RootDir has a special meaning. If set, all paths in Dir::
       will be relative to RootDir, even paths that are specified absolutely. So, for
       instance, if RootDir is set to /tmp/staging and Dir::State::status is set to
       /var/lib/dpkg/status, then the status file will be looked up in
       /tmp/staging/var/lib/dpkg/status.

       The Ignore-Files-Silently list can be used to specify which files APT should
       silently ignore while parsing the files in the fragment directories. Per default
       a file which end with .disabled, ~, .bak or .dpkg-[a-z]+ is silently ignored. As
       seen in the last default value these patterns can use regular expression syntax.

Skimming for something useful vainly another 5-10 minutes have already have gone by. Granted, I just learnt how to search for patterns in a manual, but I'm still stuck.

7. Tik-tak. Running apt-clean command in the hopes that something residual gets freed-up and current limit will be sufficient upon new attempt.
8. Meanwhile googling for solution.
9. Experimenting with apt-clean fails, running apt-get update again wastes another 3 minutes, and I still can't install what I need.
10. editing /etc/apt/apt.conf, filename finally found on a blog.
12. starting to write this post so that I have an idea of where my time is going this time.
trying to find an appropriate subsection, going through the manual for pastes, etc, etc. Somehow another 15 minutes are gone.
13. noticing that I misspelled my sudo password so it's still not updated.
14. installing package - running into broken depencies
15. googling for solution a pop-up window freezez up iceweasel,
16. experiencing panic over loosing the post, getting up to get a glass of water
17. getting back to the computer, finding terminator gone,
18. running apt-get clean all
19. running apt-get autoremove - cursor starts skipping: apt-get is reading 6MB/s from local drive. Stuck for another 2 minutes.
20. Deciding to post before loosing the post.

Last edited by crunchworksyeay (2012-01-25 11:57:00)

What is truth? said jesting Pilate; and would not stay for an answer. - Francis Bacon.

Re: A question that demands an answer, I guess...

Broken packages and other adventures aside, my question is: Why can't apt-get ask you a simple question:

"Would you like to increase the cache-limit? Please specify increase in MB and hit Y"

or rather:

Press U to set the limit to unlimited, E to edit your /etc/apt/apt.conf or alternatively consider removing some sources from your /etc/apt/sources.list

Just how hard would that be ?

Since I started typing at least 40 minutes have gone by, and I haven't even started doing what I wanted to. People have walked the dog and bought the milk meanwhile, while I'm doing WHAT ?...

Last edited by crunchworksyeay (2012-01-25 13:24:49)

What is truth? said jesting Pilate; and would not stay for an answer. - Francis Bacon.

Re: A question that demands an answer, I guess...

I'm looking at the apt.conf man page right now.  In the snippet you already pasted above, I see this:

The default of Cache-Limit is 0 which stands for no limit.

This and the other problems you're having suggest you may be critically short on disk space?

while ( ! ( succeed = try() ) );

Re: A question that demands an answer, I guess...

Let's see output of

df -h

Re: A question that demands an answer, I guess...

In case it is diskspace:

I always invoke

aptitude autoclean

during my scripted updates to delete extraneous package files.    Before this I've filled up a partition or two if I wasn't paying attention... 

I also run

dpkg --list | grep "^ii.*linux-image"

at the end of each update script to look at how many kernels are installed, removing the oldest ones once more than a few are installed. 


Dunno if it's related

brother mouse
new to crunchbang.
my first linux kernel build was on a 386-16sx with 6MB SIPP RAM ($50/MB!)

Re: A question that demands an answer, I guess...

Put this in /etc/apt/apt.conf

Debug::pkgInitConfig "true";

this will make apt dump its configuration parameters every time it is invoked.
then run

sudo apt-get update

Search the output for settings of the parameters

APT::Cache-Start 
APT::Cache-Grow
APT::Cache-Limit 

If they are not there, set them explicitly in /etc/apt/apt.conf:

Debug::pkgInitConfig "true";
APT::Cache-Start "20971520";
APT::Cache-Grow "1048576";
APT::Cache-Limit "0";

Run

sudo apt-get update

again, and verify that it took your settings.

Then try to install whatever it was you wanted to install.

If it still returns that error, post again.

When you want to get rid of the dump, comment the first line in /etc/apt/apt.conf
Use // in front of the line, not # (c-style comment)!

The sizes you specify are for memory, not disk.
If you are short on memory, make sure that you have a swap file enabled.

hth

Last edited by xaos52 (2012-01-25 17:22:39)

If you poke the bear it is going to come after you.

Re: A question that demands an answer, I guess...

I hope raising questions won't be considered arrogance. I honestly think the questions are justified. I am step for step presenting a situation and ask questions logically following questions. If anything tastes like trolling, it's unintentional. The questions are not rhetorical. Either in black or red.

pvsage wrote:

I'm looking at the apt.conf man page right now.  In the snippet you already pasted above, I see this:

The default of Cache-Limit is 0 which stands for no limit.

This and the other problems you're having suggest you may be critically short on disk space?

Thank you all for trying to help, it wasn't freespace.
The cache limit was set from 0 to a different number months ago, because that's what somewhere someone suggested when I had a go for apt-pinning. Why ? Because there's no manual either...

If I google apt-pinning right now, "I'm lucky" to arrive at this page:
http://jaqque.sbih.org/kplug/apt-pinning.html

E: Dynamic MMap ran out of room

You may find that you receive an error like the following:

E: Dynamic MMap ran out of room
E: Error occured while processing sqlrelay-sqlite (NewPackage)
E: Problem with MergeList /var/lib/apt/lists/ftp.us.debian.org_debian_dists_woody_contrib_binary-i386_Packages
E: The package lists or status file could not be parsed or opened.

This is caused because apt's cache is too small to handle all of the packages that are included with stable, testing, and unstable. This is also very easy to fix. Add the following line to /etc/apt/apt.conf

APT::Cache-Limit "8388608";

Thanks to R (Chandra) Chandras for pointing out this problem

My limit was 10 times larger.

But I didn't post in the HELP section - I posted in the feedback one. I already solved the issues.

I posted because I can't rely on man pages, and it seems I can't rely on "google" either.
apt-get is a central piece of every debian based distro, yet the very manual is a dead end.

My question in red is ignored. The problem is that you never run into a (edit: single) problem. Once you're forced to USE your system, for example, read a manual, you'll discover it's missing the very information you were sent there for. And so on. This is no longer a nooby issue.

Press U to set the limit to unlimited, E to edit your /etc/apt/apt.conf or alternatively consider removing some sources from your /etc/apt/sources.list

So again, is it a cost of implementation issue ? doubting it. So what's the philosophy behind blindfolding users or ,,,am I blind ? I'm really curious if I'm alone in this. Please correct me if I have a biased view on something... but it's always 50 steps till I get something done.

We are both running #! - so what are you doing differently ? What's your secret ? ...and again, why can't we automate some basic stuff ?

Pretty please !

Last edited by crunchworksyeay (2012-01-25 21:12:46)

What is truth? said jesting Pilate; and would not stay for an answer. - Francis Bacon.

Re: A question that demands an answer, I guess...

crunchworksyeay wrote:

My question in red is ignored. The problem is that you never run into a problem. Once you're forced to USE your system, for example, read a manual, you'll discover it's missing the very information you were sent there for. And so on. This is no longer a nooby issue.

Press U to set the limit to unlimited, E to edit your /etc/apt/apt.conf or alternatively consider removing some sources from your /etc/apt/sources.list

So again, is it a cost of implementation issue ? doubting it. So what's the philosophy behind blindfolding users or ,,,am I blind ? I'm really curious if I'm alone in this. Please correct me if I have a biased view on something... but it's always 50 steps till I get something done.

I guess the problem hasn't occurred enough times for anyone to properly debug the issue and send it as a bug report. If it even is a bug, I can't really understand what happened and how you solved the problem, as you went with the angry approach, solved the issue in a way, you don't wanna talk about the solution, you're just angry bad stuff has happened to you. While this may be understandable, it's certainly not helpful as a way of solving problems for the whole community to profit.

I don't suggest you rant all over the Debian mailing lists, but if you do wanna point the devs to the problem, try doing so in a cool-headed manner.

Re: A question that demands an answer, I guess...

Pointless addition babble:

What El_koraco said, didn't read much of this stuff ... skimmed. Not like anyone is happy you're having problems. Guess it comes with the territory, as gnu/nix, #! and life ARE NOT perfect, nor are people obviously. If you don't understand summin, or go about doing something incorrectly then yep ... you run into issues. This really shouldn't surprise anyone.

Imo and experience gnu/Linux is awesome software. Very talented techie folks have dumped an endless amount of their time and energy into creating all this great FOSS. Then are generous enough to let anyone who wants use it ... w/o limitations ... w/o paying a cent. Which blows my mind actually. So the thing about I spent x mins/hrs trying to figure out abc. When I see stuff like that, I think cry me a river dood.

Imo ... gnu/Linux is NOT free in one respect. If you really wanna learn about it .. Yep, it takes time. More you wanna learn, more time. But it's still awesome software and amazing people let us have access to all this awesome software. Apparently the folks over @ Debian have spent 18 YEARS keeping up Debian. So the few hours you had to spend trying to learn to do something ... SHRUGS.

Just out of curiousity, sometimes I wonder ( and would like to know ) how many wks/months/etc Corenominal has invested in keeping up Crunchbang. Guessing ALOT ...


End lame riot act babble: wink


Edit: Nope how about end on a positive. Not like anyone is mad atcha either. You can figure it out, peeps in the #! community will even try to help someone having probs. All that babble above is just me pointlessly trying to put things into perspective for others. I may or may not be right about any and everything included, more shrugs.

Last edited by CBizgreat! (2012-01-25 20:46:29)

Some common cbiz abbreviations. This will save me time and yet @ same time tell folks what the babble is supposed to mean.

Vll ! = ( Viva la gnu/Linux !)    Vl#!! = ( Viva la #! !)    Last but not least, UD ... OD ! = ( Use Debian ... or die !) tongue

Re: A question that demands an answer, I guess...

^ I've been a Debian user (starting at Woody) and I'm now sitting with #!, using the siduction repositories.  I use it every day for hard-core C++/Java development in my company for both client and server platforms.  When I first came to it, I had 0, nada, nil, experience with *nix. (I was a Windows developer).  Since I started using Debian, I have not even looked back.  Does that make me smart? No.  What is does show is the valuable expertise that one can learn from forums, IRC, and even google.  If it was tougher than other OSes then I would have lost interest a long time ago since I need to spend my time developing, rather than trouble shooting OSes.  #!, and by default Debian, have been rock solid (both out of the box as well as support) no matter how I've sliced it up through the years.
-Hinto

Last edited by hinto (2012-01-25 21:29:48)

"When any government, or church for that matter, undertakes to say to it's subjects, this you may not read, this you must not see, this you are forbidden to know the end result is tyranny and oppression, no matter how holy the motive."
-Robert A. Heinlein

Re: A question that demands an answer, I guess...

^ Well said hinto...

Re: A question that demands an answer, I guess...

Hinto knows ... of which I babbled there. Edit: and VastOne too no doubt. big_smile


Did think of summin that may help ya, or not. Guess someone could always try installing with apt-get for the program/etc they want. You don't have to dist-upgrade everything on an OS to get one app. Goes summin like this I believe. Add the backport ( if there is one) for the thingy you want. Install it with apt-get. You may have to comment out some repo's in /etc/apt/sources.list

As I found out when trying to add the iceweasel backport and update to a newer version of it. Ended up having to comment out this repo  to get the new packages to install. Just as you see below ...

## Compatible with Debian Squeeze, but use at your own risk.
#deb http://packages.crunchbanglinux.org/statler statler main

If had to guess why ... Guessing has something to do with pin-priority and/or apt-pinning. Something atm I only vaguely understand. No doubt some good how to's in the forum about it. So not gonna even try to babble about how/why or blahblahblah. Yep ... yet more shrugs. wink

Nope ... not so fast, as always, more babble is due. Messing with sources.list is a very handy way to bork your OS in my experience. As the couple times I've managed to mess up #!, fiddling with sources.list and doing a dist-upgrade was involved. So kinda goes w/o saying and makes sense to BACKUP your OS occasionally. Think a decent idea anyway.


(CB) big_smile

Last edited by CBizgreat! (2012-01-25 21:14:15)

Some common cbiz abbreviations. This will save me time and yet @ same time tell folks what the babble is supposed to mean.

Vll ! = ( Viva la gnu/Linux !)    Vl#!! = ( Viva la #! !)    Last but not least, UD ... OD ! = ( Use Debian ... or die !) tongue

Re: A question that demands an answer, I guess...

CBizgreat! wrote:

....

When I see stuff like that, I think cry me a river dood.

...

Just out of curiousity, sometimes I wonder ( and would like to know ) how many wks/months/etc Corenominal has invested in keeping up Crunchbang. Guessing ALOT ...

Exactly because #! is great it's a pity that such experiences are still all over the place.

I believe in feedback. A question is half the answer. I asked the question. Someone smarter might invent an answer. ..or not. But I did what I could. Therefore, no need to cry...
I'm well aware that I am running a LINUX box, (one with tint2 and openbox and limitless personalization options) it's all great. I am not a windows user booing at you. I'm with LINUX. (Still, by the way, fixing windoze never took me 10% of the time to fix something here.)

I'm telling YOU - instead of mocking behind your back. Let's get this straight. I'm on this side. Critique never killed anyone.

There IS something broken somewhere, all these bugs must get in somewhere, what do we do?

Learning is one thing.
Learning is getting from point A to point B, and then, next time knowing how to get there. This was something like walking down dead-end streets you never need to see again if some things are fixed.

Caveats ? Get me the cheats-sheet. But this wasn't learning. It's not the same.

Last edited by crunchworksyeay (2012-01-25 21:48:57)

What is truth? said jesting Pilate; and would not stay for an answer. - Francis Bacon.

Re: A question that demands an answer, I guess...

@crunchworksyeay
for apt-get, aptitude and dpkg, file a defect with http://www.debian.org/Bugs/
for workarounds browse http://crunchbanglinux.org/forums/
#! doesn't own the apt-get, aptitude and dpkg packages.
If you want to make suggestions for theming/out of the box programs/or for custom programs/scripts you don't want write yourself, feel free to post them.
-H

"When any government, or church for that matter, undertakes to say to it's subjects, this you may not read, this you must not see, this you are forbidden to know the end result is tyranny and oppression, no matter how holy the motive."
-Robert A. Heinlein

Re: A question that demands an answer, I guess...

hinto, VastOne, with all due respect, my experiences differ.

If every time I ran into a bug... well, I didn't get a dollar but I ended up learning that I better keep a log of where my time went... I didn't do it to rant. I can take a walk and get it out of my head.

I invested time into logging and posting to prove at least this time that something small here and there can steal you of a lot of time in vain. And I'm afraid I lost at least a few weeks over these "little glitches", and this is just the operating system.

Last edited by crunchworksyeay (2012-01-25 22:21:35)

What is truth? said jesting Pilate; and would not stay for an answer. - Francis Bacon.