On Sat 21 Jun 2008 at 09:55PM, Chris Ridd wrote:
> OSError: [Errno 12] Not enough space
> 
> That's a bit confusing - errno 12 is ENOMEM, not ENOSPC. Sun's xVM  
> VirtualBox is running and probably using lots of memory so I'll shut  
> it down on Monday and try again. I suspect it won't be useful, but I  
> can take a look at /tmp/tmph-X54F if you'd like.

Chris,

The standard message for ENOMEM is:

ENOMEM  12      "Not enough space"

But I agree.  Confusing.  fork(2) says:

     ENOMEM    There is not enough swap space.

We should change the top level error handler to perhaps translate this
into a more useful message, or to recommend further action to the user.
I filed http://defect.opensolaris.org/bz/show_bug.cgi?id=2297 on your
behalf for an improvement to the error messaging.

So: it is likely that you've got insufficient swap reservation free for
the process that is trying to be forked-- at fork(2) time we have to
establish swap reservation for the child of the parent.  This is a
problem commonly seen when a large executable forks children who may
be very small.  So it may be compounded by your 'pkg' process using a
lot of memory and/or low memory on the machine.  You have insufficient
swap space available-- an easy fix is to close some programs, or to
add some more swap.  If we were building this in C, then we'd be using
vfork(2) instead of fork(2), which would nicely avoid this problem,
although if you are truly out of memory, there isn't much we can do.
We'll have to do some digging to see if there's any way to get this
behavior out of python.

Another problem is that pkg isn't very memory efficient-- most of plan
creation (on my box) takes about 28M of RSS.  At the end of the plan
creation, this swells up to 180MB.  I'm sure some of that memory could
be released once the plan is done-- we'll have to do some further
investigation.

        -dp

-- 
Daniel Price - Solaris Kernel Engineering - [EMAIL PROTECTED] - blogs.sun.com/dp
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to