Red Hat Bugzilla – Bug 236643
OSError discarded, making real problem (out of memory) harder to discern
Last modified: 2007-11-30 17:12:02 EST
Description of problem:
This occurred on another distro (rPath Linux 2 alpha 3) (see URL), but I
examined the source code in the anaconda SRPM in rawhide and the issue is
present there too.
Basically anaconda used to error out with "OSError: Out of memory" or similar
when there was not enough memory to run a process like lvm. This no longer
happens - now you just get
LvmError: vgchange failed
and then nothing (of course the capture of stdout is empty!) - which is unhelpful.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Try to install with not enough memory (512MB for an x86_64 default install of
rpath linux 2 alpha 3, in my case)
Some kind of error that mentions "out of memory"
The relevant code in my case was in lvm.py:
return iutil.execWithRedirect("lvm", args, stdout = output,
stderr = output, searchPath = 1)
raise LvmError, args
and there may be other places that need patching as well.
I was able to reproduce this trying to install rPath Linux 2 alpha 3 on x86_64
in text mode with a cap on memory of 512MB. Even though free says that I have
around 83MB of free memory trying to run the iutil.execWithRedirect as above in
the debugger results in "RuntimeError: error running lvm: Cannot allocate
memory". Running lvm on the command line with the same options exits without error.
Seeing the same problem here with F7 test 4 under VMware... I was running with a
cap on 384MB and doing textmode install from local DVD media. I tried all sorts
of things and the only thing that made it work was to add more memory - 512MB in
this case sorted the problem out. Seems a little excessive to require 512M for a
text mode install, or???
This is what's failing:
= -1 ENOMEM (Cannot allocate memory)
540 is the anaconda worker process. Its current RSS according to top is 123M.
top reports 4804k free, 3700k buff, and 95980k cached on this 256MB machine
doing a PXE/NFS install.
Is there currently any hope that text mode installs should be able to be done
with 256MB RAM?
It looks like it's near or just after the end of the "Checking Dependencies"
step that memory usage jumps from about 64MB to around 120MB for the anaconda
process. Found an extra 64MB of RAM and that was enough to get the install to
complete in my case.
The latest rawhide now installs for me fine with 512MB memory on x86_64, whereas
in FC7 test 4 it would fail with the lvm error because of insufficient memory.
I think that you should ignore my previous comment (#5). What happened was that
when using the mirror at mirrorservice.org it gets beyond where I thought it
failed before (with the unhandled exception), but the mirror is clearly
incomplete (many messages about missing packages). During the "starting install"
phase it fails not being able to open glibc-headers-2.5.90-21.x86_64.rpm.
Using the mirror at ftp.funet.fi the install fails with an unhandled exception
and LvmError: vgachange failed in the gui window. I can see right at
the top of the F3 screen that there is a message: "ERROR: Running lvm:
Cannot allocate memory".
I guess I was mistaken about where the failure occurred, and based on
the seemingly complete mirror at ftp.funet.fi, the install still
fails with 512MB.
Sorry for the confusion.
We make the error a little bit better visible in the logs now