Bug 125827 - losetup, memlock: Cannot allocate memory
losetup, memlock: Cannot allocate memory
Product: Fedora
Classification: Fedora
Component: util-linux (Show other bugs)
athlon Linux
medium Severity medium
: ---
: ---
Assigned To: Elliot Lee
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2004-06-11 17:29 EDT by Ivan Gyurdiev
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-06-24 04:32:59 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Ivan Gyurdiev 2004-06-11 17:29:10 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6)
Gecko/20040518 Firefox/0.8

Description of problem:
Hi. I am running Core with 128 MB of RAM which is rather low, but I
think sufficient. 

However, in lomount.c , part of losetup, 

this fails with ENOMEM:

         * Oh-oh, sensitive data coming up. Better lock into memory to
         * passwd etc being swapped out and left somewhere on disk.
        if(mlockall(MCL_CURRENT | MCL_FUTURE)) {
                fprintf(stderr, _("Couldn't lock into memory,

causing this:
[root@cobra mount]# free
             total       used       free     shared    buffers     cached
Mem:        127096     119556       7540          0       6416      53872
-/+ buffers/cache:      59268      67828
Swap:       512024      64616     447408
[root@cobra mount]# ./losetup /dev/loop0 /initrd2
memlock: Cannot allocate memory
Couldn't lock into memory, exiting.
[root@cobra mount]# ls

causing mkinitrd to fail

causing new-kernel-pkg to fail

causing me to not be able to install a new kernel properly, which
sucks, because I can't test SElinux :)

So - what should be done. I hope the answer is not "get more RAM". 

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

How reproducible:
Comment 1 Ivan Gyurdiev 2004-06-20 21:27:41 EDT
Please help me out here - I can't install any new kernels properly...
Some clue as to what can be done?

Thanks for any help in advance.


Comment 2 Ivan Gyurdiev 2004-06-24 04:32:59 EDT
Fixed in newer kernels.

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