Bug 236643 - OSError discarded, making real problem (out of memory) harder to discern
OSError discarded, making real problem (out of memory) harder to discern
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: anaconda (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Peter Jones
https://issues.rpath.com/browse/RPL-1257
:
Depends On:
Blocks: FC7Blocker
  Show dependency treegraph
 
Reported: 2007-04-16 18:16 EDT by Robin Green
Modified: 2007-11-30 17:12 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-05-18 12:05:00 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Robin Green 2007-04-16 18:16:32 EDT
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

Log:

and then nothing (of course the capture of stdout is empty!) - which is unhelpful.

Version-Release number of selected component (if applicable):
anaconda-11.2.0.49

How reproducible:
Always

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)
  
Actual results:
See above

Expected results:
Some kind of error that mentions "out of memory"

Additional info:

The relevant code in my case was in lvm.py:

def lvmExec(*args):
    try:
        return iutil.execWithRedirect("lvm", args, stdout = output,
            stderr = output, searchPath = 1)
    except:
        raise LvmError, args[0]

and there may be other places that need patching as well.
Comment 1 Elliot Peele 2007-04-16 19:31:53 EDT
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.
Comment 2 Thomas M Steenholdt 2007-05-01 16:02:54 EDT
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???
Comment 3 Orion Poplawski 2007-05-10 16:49:40 EDT
This is what's failing:

540   clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb7f6f708)
= -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?
Comment 4 Orion Poplawski 2007-05-10 17:18:55 EDT
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.
Comment 5 Roderick Johnstone 2007-05-14 06:18:40 EDT
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.
Comment 6 Roderick Johnstone 2007-05-14 09:29:57 EDT
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.
Comment 7 Jeremy Katz 2007-05-18 12:05:00 EDT
We make the error a little bit better visible in the logs now

Note You need to log in before you can comment on or make changes to this bug.