Operating System - HP-UX
1834048 Members
2706 Online
110063 Solutions
New Discussion

Re: Receiving mmap failed messages

 
James Miles Taylor
Occasional Contributor

Receiving mmap failed messages

Hey All,
I have an N4000 with 4gb of memory and 6144gb of swap space. I have several programs that when they try to run I get the following error.
/usr/lib/dld.sl: Call to mmap() failed - TEXT /opt/java1.2/bin/../jre/lib/PA_RISC2.0/hotspot/libjvm.sl
/usr/lib/dld.sl: Not enough space
Abort(coredump)

This is also happening when I try to start sam sometimes. I have noticed in the forums that it talks about increasing maxdsiz. What I am wondering is what should I increase this to. Here is my output from swapinfo -tam
and what my kernel setting is.

swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 1024 0 1024 0% 0 - 1 /dev/vg00/lvol2
dev 5120 0 5120 0% 0 - 0 /dev/vgss/swap
reserve - 3039 -3039
memory 3154 2592 562 82%
total 9298 5631 3667 61% - 0 -

Kernel Settings
maxdsiz 0X40000000
maxdsiz_64bit 0X0000000060000000


Any help will be appreciated. Thanks,

Miles Taylor

3 REPLIES 3
Sridhar Bhaskarla
Honored Contributor

Re: Receiving mmap failed messages

Hi Miles,

There might be a good chance that you were running out of swap.

As you can see from the swapinto output, enabling swapmem_on kernel parameter will not give you any advantage if your system uses a lot of memory.

If you have measureware installed, try to dig out the history of swap utilization.

Add little more disk swap and see if the problem persists.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
A. Clay Stephenson
Acclaimed Contributor

Re: Receiving mmap failed messages

This appears to be ENOMEM (12) and the mmap() system call can generate that errno value in two ways: 1) lack of process address space which is limited by maxdsiz or maxdsiz_64bit depending upon whether this is a 32-bit process or 2) lack of contigious virtual address space because of insufficient swap space. Man 2 mmap for details.
If it ain't broke, I can fix that.
Ashwani Kashyap
Honored Contributor

Re: Receiving mmap failed messages

Its a good idea to create another device swap .
I have an HP system with 4 GB memory where my processes used to fail with not enough memory errors .

I inceased the maxdsiz_64bit paramater to 4294967296 and since then I have no problems .