Port-xen archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Cannot start xend: ERROR Internal error: Could not lock memory for Xen hypercall (35 = Resource temporarily unavailabl)



On Sun, May 31, 2009 at 11:23:16PM +0200,
 Jean-Yves Migeon <jeanyves.migeon%free.fr@localhost> wrote 
 a message of 25 lines which said:

>> (This is after I tried a 'ulimit -l unlimited', which increased the
>> locked-in-memory size but changed nothing for xend.)
>
> You did it inside the xend script, didn't you?

No, I did it from the shell, then ran xend start from the same shell.

> Use ktruss(1) (# ktruss -i xend), and look for the mlock()/munlock()  
> calls. It should not lock() more than a few pages.

ktruss does find two calls to mlock(), each for 4 kb, the total is
clearly below the ulimit:

# ktruss -i /usr/pkg/etc/rc.d/xend start |& grep lock 
   542      1 python2.5 opERROR Internal error: Could not lock memory for Xen 
hypercall (35 = Resource temporarily unavailabl)
   542      1 python2.5 mlock(0xbfbf5000, 0x1000)  Err#35 EAGAIN
       "ERROR Internal error: Could not lock memory for Xen hypercall (35 = R"
       "em into the queue.\n\n        If optional args 'block' is true and 't"
   806      1 python2.5 mlock(0xbfbfe000, 0x1000)  Err#35 EAGAIN
       "ERROR Internal error: Could not lock memory for version hypercall (35"
       "(1, 'Internal error', 'Could not lock memory for version hypercall (3"

# ulimit -a
-t: cpu time (seconds)         unlimited
-f: file size (blocks)         unlimited
-d: data seg size (kbytes)     262144
-s: stack size (kbytes)        2048
-c: core file size (blocks)    unlimited
-m: resident set size (kbytes) 52316
-l: locked-in-memory size (kb) 52316
-u: processes                  160
-n: file descriptors           128
-N  9: socket buffer size (kb) unlimited
-v: virtual memory size (kb)   unlimited

mlock(2) says:

     [EAGAIN]           Locking the indicated range would exceed either the
                        system or per-process limit for locked memory.

May be it is the system-wide limit which is too low? How can I
increase it?

# vmstat -s | grep wired  
     4475 pages wired
     4422 maximum wired pages


Home | Main Index | Thread Index | Old Index