1820658 Members
2394 Online
109626 Solutions
New Discussion юеВ

Failed Call to mmap0

 
SOLVED
Go to solution
Donald Osbourne
Occasional Advisor

Failed Call to mmap0

Seasons Greeting!

I am seeking assistance in understanding, identifying and correcting an error from a system call. The error occurs while starting a third-party application ???Gas Importer???, which is used in conjunction with Oracle. The error started immediately following changes to the Oracle SGA. The SGA size was increased.

??? /usr/lib/dld.sl: Call to mmap() failed - TEXT /u002/zainet/odbc/lib/libclntsh.sl???

???/usr/lib/dld.sl: Not enough space???

Thank You,
Donald

7 REPLIES 7
James Murtagh
Honored Contributor
Solution

Re: Failed Call to mmap0

Hi Donald,

It appears you have hit an address space limit, probably relating to shared memory usage (or 3rd & 4th quadrant virtual address space to be more precise). I take it this is a 32 bit application? Is the server running in 64 or 32 bit mode? You can find out by running :

# getconf KERNEL_BITS

What size was the Oracle SGA increased to?

Regards,

James.
Ashwani Kashyap
Honored Contributor

Re: Failed Call to mmap0

Maybe after the increase in SGA , you maxdsiz kernel parameter is too less fro the app to startup . May be you can try increasing that but it requires a recomplie of the kernel and a reboot .
Nelson Mina
New Member

Re: Failed Call to mmap0

Hi Donald,

My guess is you're running out of Shared Memory. If your system runs 11.x and you're using 32 bit Oracle then you may be able to use "Memory Windows" feature. Refer to "/usr/share/doc/mem_wndws.txt" (HPUX 11.00) for additional info.

To use this feature:
1. Update Kernel parameter "max_mem_window" and set it to say "5" or "10".
2. Shutdown Oracle Database.
3. Create a file "/etc/services.window" and put Oracle SIDs and Window ID. This assumes 32 bit oracle with version > 8.0.6. Ex:

divC 1
db1H 2
nomP 3

3. Start Oracle. This start every Oracle Instance in a separate Windows with an allocation of 1GB of Shared memory per window.

By putting most instances into separate window, you're freeing up memory usage in the global area and making them available into other applications using shared libraries.

If your OS is lower than 11.00 then you don't have much choice. The shared mem may be too fragmented and requires server reboot to fix the problem. And you may have to reduce the SGA.

Good Luck,
Nelson





Donald Osbourne
Occasional Advisor

Re: Failed Call to mmap0

I thank everyone for the prompt response. James to answer your questions, I am ruuning HP/UX 11.0, 64-bit, and Oracle 8.1.7.

The SGA was originally set to 1.0GB without a problem. The failure occurred after increasing it to 1.75Gb. Since then it has been successfully lowered to 1.70GB.

Thank You
James Murtagh
Honored Contributor

Re: Failed Call to mmap0

Hi Donald,

Glad it is working now, however, just a word of warning - the limit for all 32bit process address space in quadrants 3 and 4 (without memory windows) is 1.75GB, hence why you had problems. However, that only leaves 50MB of space in quadrant 4 for 32 bit shared libraries, shared memory etc. If you start to see applications failing, or if you cannot start Oracle apart from straight after a reboot, that is the cause!

regards,

James.
Donald Osbourne
Occasional Advisor

Re: Failed Call to mmap0

James, you are on the money. Now what I need to figure out is how to get by this limitation, and avoid the problems?
James Murtagh
Honored Contributor

Re: Failed Call to mmap0

Hi Donald,

If you need a SGA over a gigabyte in size, memory windowing won't help so you have two choices :

1) Upgrade to a 64bit version of Oracle! This may seem a bit drastic but you are hitting the limits of a 32bit application.

2) Check if Oracle supports the SHMEM_MAGIC feature. The quadrants for a 32bit process are normally allocated (SHARE_MAGIC) as follows :

Quad 1 --> Text
Quad 2 --> Data, Stack, Private mmap
Quad 3 --> Shared Objects
Quad 4 --> Shared Objects

If you apply SHMEM_MAGIC to an executable, this happens :

Quad 1 --> Text + Data
Quad 2 --> Shared Objects
Quad 3 --> Shared Objects
Quad 4 --> Shared Objects

This is turned on by running "chatr -N ", but as I don't know Oracle I can't tell you if this is supported. I also don't know how much text/data a normal instance needs. Maybe someone familiar with Oracle can help?

Regards,

James.