FS#8155 - pacman crashes in 64MB environment
Attached to Project:
Pacman
Opened by Tobias Powalowski (tpowa) - Friday, 28 September 2007, 16:40 GMT
Last edited by Dan McGee (toofishes) - Thursday, 04 September 2008, 15:18 GMT
Opened by Tobias Powalowski (tpowa) - Friday, 28 September 2007, 16:40 GMT
Last edited by Dan McGee (toofishes) - Thursday, 04 September 2008, 15:18 GMT
|
Details
While trying to install with 64MB RAM.
pacman installation of packages is just stopping in the middle of installation and exits. dmesg bumps up a huge amount of memory stuff. Adding additional swap to RAM doesn't help either. I don't know if pacman just has bad memory usage at this point. Installing packages one after the other is working so something in memory usage seems to trigger this. Perhaps you ahve an idea why it doesn't work. I used pacman-3.0.6. |
This task depends upon
Closed by Dan McGee (toofishes)
Thursday, 04 September 2008, 15:18 GMT
Reason for closing: Fixed
Additional comments about closing: Works for us, doesn't seem to be an issue anymore with proper environment setup.
Thursday, 04 September 2008, 15:18 GMT
Reason for closing: Fixed
Additional comments about closing: Works for us, doesn't seem to be an issue anymore with proper environment setup.
a) the actual output you're talking about (dmesg)
b) the --debug output
c) a way to replicate this bug
Thanks
dmesg.pacman (27.6 KiB)
so 30 megs for pacman running available.
Also never have a pacman problem, neither during installation nor when installing for ex. xorg-server and it's dependencies.
During this operation the system never use swap space. Maybe only a problem if one have low memory (X running, etc) during pacman usage.
- during installation base+support (0 byte swap)
- xorg-server, xterm (and deps) (0 byte swap)
- xfce4-group (and deps) (about 25MB Swap, xorg+icewm running)
Maybe about 15-20 packages per run.
If it make a sense i could try tomorrow for ex. a complete install of kde.
pacman -Sv kde gnome (would work dep check etc., i don't do the real install)
Then something one would never do in real life:
pacman -Sl extra | cut -d " " -f1 | xargs pacman -Sv
and
pacman -Sl extra | cut -d " " -f1 | xargs pacman -Sdfv
So pacman check for dependencies conflicts and inter-conflicts for about ~2300 packages.
Cause there ARE conflicts, above never got installed.
But i think these are the actions were pacman needs most resources and oom-killer would come.
I've never hat more swap than ~25MB, pacman itself uses about 10-15MB VIRT.
it also happens with quickinst so it's nothing setup specific.
quickinst only installs base
tpowa- if i give you a pacman.static from our development tree, could you test it out? It should have no problem even installing all of [core] (base, base-devel, etc. all at once).
http://toofishes.net/blog/valgrind-330-and-new-massif/
new isos should come finally with 2.6.24 kernel and with this fix it would be so great.
greetings
tpowa
Speaking of new ISOs, did you ever see the archiso scripts that Simo and I got working quite nicely?
http://archlinux.org/pipermail/arch-dev-public/2007-October/002616.html
http://projects.archlinux.org/git/?p=archiso.git;a=summary
Maybe i/we could make some tests with lowmem machines with new iso's and then reopen or file a new report if this become important.
I have had the need for testing again such a enviroment (VM with 64 MB RAM) and with our current install-iso.
By kernelparameter we use 75% from RAM for ramdisk/unionfs later as root-fs(/). With 64 MB RAM this leads to a
Root with araound 54MB.
Package selection and installation give error during copying (BTW: also with error the installer says: Coping/installing successfully at the end - sounds like a installer bug, i investigate this later)
Next try i used a ramdisk size from 90%. This fails also. The reason is easy - the base package files (and other selected by the user) are copied to /tmp (cause /var/cache/pacman/pkg isn't availabe).
But base occupies alone ~110 MB in /tmp.
And this is the problem - / is getting full.
So after a little thinking i found a solution.
After partitioning and before package selection/installing:
mkdir /mnt/tmp
chmod 1777 /mnt/tmp
mount -o bind /mnt/tmp /tmp
So the package installer has enough space for saving downloaded or copied packages and the installation goes
on without errors. The system and installer itself needs during the whole installation process not more than
~15-17MB.
So this i a chance to install Arch now on machines with very little RAM. I don't know if this method were also possible with the on-topic 2007 ISO ("tpowas"), but with the new ISO it is definitely no problem anymore.
If you agree this could be a hint in the installation guide.
After partitioning try: mkdir -p /mnt/var/cache/pacman/pkg/
(Note: this may be /media and not /mnt, I can't remember)
The install may then use that dir as cache (and cache downloaded packages on the new disk. That's the way it SHOULD work
http://code.neotuli.net/gitweb/?p=installer.git;a=commitdiff;h=b677b3e44624608e684de6fb4a5a9b2531ac1257;hp=6cd6408df9686534e8c9a8f05d77e4eec2ba32ab
The new pacman (3.2.0) will definitely be better in the memory usage department as it does everything dynamically, which cuts memory usage by a good 50% on most operations over the 3.1.x series.
I have had the need for testing again such a enviroment (VM with 64 MB RAM) and with our current install-iso.
By kernelparameter we use 75% from RAM for ramdisk/unionfs later as root-fs(/). With 64 MB RAM this leads to a
Root with araound 54MB.
Package selection and installation give error during copying (BTW: also with error the installer says: Coping/installing successfully at the end - sounds like a installer bug, i investigate this later)
Next try i used a ramdisk size from 90%. This fails also. The reason is easy - the base package files (and other selected by the user) are copied to /tmp (cause /var/cache/pacman/pkg isn't availabe).
But base occupies alone ~110 MB in /tmp.
And this is the problem - / is getting full.
So after a little thinking i found a solution.
After partitioning and before package selection/installing:
mkdir /mnt/tmp
chmod 1777 /mnt/tmp
mount -o bind /mnt/tmp /tmp
So the package installer has enough space for saving downloaded or copied packages and the installation goes
on without errors. The system and installer itself needs during the whole installation process not more than
~15-17MB.
So this i a chance to install Arch now on machines with very little RAM. I don't know if this method were also possible with the on-topic 2007 ISO ("tpowas"), but with the new ISO it is definitely no problem anymore.
If you agree this could be a hint in the installation guide.
@Aaron:
mkdir -p /mnt/var/cache/pacman/pkg/ doesn't solved it. Still says: couldn't create package cache, using /tmp instead.
It's this in the current installer i think:
-----------
if [ "$delpkg" = "yes" ]; then
- # set up a symlink to fool pacman so it doesn't copy all the packages to the cache
- ln -sf /src/core/pkg /var/cache/pacman/pkg >/dev/null 2>&1
- else
-------------
I used the option "delete packages", so the symlink is created to an ro-only filesystem. If choosing "keep packages" this symlink goes to /mnt/var/.......
But as Dan mentioned: This part is modified in new installer.
Is it fixed?
"I'd like to push this to Simo and others to actually do some testing
once we do get 3.2 released, so for now leave it open."