cancel
Showing results for 
Search instead for 
Did you mean: 

Memory segment error.

Memory segment error.

shmsegCreateNewSeg(): ERRNO=12
Failed to get another shared memory segment (required size=100761552 bytes)
*** LIBSHMADM - IPC Error
shmAlloc(): Cannot create new SHM segment


The above error keeps generated some oftens in our billing servers using BSCS_iX. However rebooting the server solves the issue for some time then it appears again after 2 weeks or less.

Has any one came through such error and how to resolve it?
20 REPLIES
Kapil Jha
Honored Contributor

Re: Memory segment error.

do you see high memory usage in this time?

Seems ur memory is filled up and can no more allocate a chunck of required size.

BR,
Kapil+
I am in this small bowl, I wane see the real world......
Horia Chirculescu
Honored Contributor

Re: Memory segment error.

Hello,

You should check the kernel param.

shmseg and shmmni

Maybe try to increment those.

shmmax should be just about the size of your installed phys. memory

Use sam to check/modify those parameters.

Horia.
Best regards from Romania,
Horia.
Dennis Handly
Acclaimed Contributor

Re: Memory segment error.

>Has any one came through such error and how to resolve it?

You could be running out of 32 bit shared memory virtual address space.

What does "ipcs -ma" show?

Re: Memory segment error.

The platform is ia64 rx6600
Memory is 8GB.

top command output for memory is:
Memory: 3912832K (3838796K) real, 5650048K (5364812K) virtual, 1141256K free Page# 1/6

Kernal Values:
shmmax 3398046511104
shmmni 1024
shmseg 600

ipcs -ma output: attached
Dennis Handly
Acclaimed Contributor

Re: Memory segment error.

>ipcs -ma output: attached

The sum is: Total: 2627789020 count: 47
This is more than 2 Gb and doesn't include any 32 bit shlibs or mapped files.

You have 32 segments all created by:
thurate bscs 3 67108864
They still have attached processes.
Kapil Jha
Honored Contributor

Re: Memory segment error.

I would still like to know if you had any memory crunch, when this error comes.

If it is then your process is not releasing the memory and in that case you have to check with vendor or maually clear the shared memory.

BR,
Kapil+
I am in this small bowl, I wane see the real world......
Dennis Handly
Acclaimed Contributor

Re: Memory segment error.

>Kapil: I would still like to know if you had any memory crunch

You can run out of 32 bit shared memory virtual addresses before you run out of swap, 2 Gb vs 8 Gb. Unless using memory windows.

Re: Memory segment error.

Thanks for you replies, but today I have a new output for ipcs-ma it shows 0 values in NATTCH column.Do I have to clear these processes manually or the system will take care?

Regarding the memory crunch I dont notice any thing like this, but i will consider that in future.
Dennis Handly
Acclaimed Contributor

Re: Memory segment error.

>I have a new output for ipcs -ma it shows 0 values in NATTCH column. Do I have to clear these processes manually or the system will take care?

You'll have to clean those up with ipcrm(1), unless the application in question wants to keep those segments around. But if so, there should only be a few of them.

Re: Memory segment error.

thanks, but if I go back and ask about (Failed to get another shared memory segment (required size=100761552 bytes)

What does it mean by required size=100761552 bytes ? where is this required size?
Kapil Jha
Honored Contributor

Re: Memory segment error.

@Dennis>> how do we find whether its using 32bit address space or 64 bit.
I could not find this out.

BR,
Kapil+
I am in this small bowl, I wane see the real world......
Dennis Handly
Acclaimed Contributor

Re: Memory segment error.

>What does it mean by required size=100761552 bytes?

The application is trying to tell you the size it wants but didn't get.

>Kapil: how do we find whether its using 32bit address space or 64 bit.

You can do a file(1) on the executable, if 32 then it's 32. If 64, then you must use tusc to see if it wants to share a 32 bit address space, shmget(2) with IPC_SHARE32.

You can also look at the address to find if it is 32 or 64 bit.
Horia Chirculescu
Honored Contributor

Re: Memory segment error.

@Dennis

>You can do a file(1) on the executable, if 32 then it's 32.

Sample:

#file /oraprod/prod/oracle/product/805/bin/oracle
/oraprod/prod/oracle/product/805/bin/oracle: PA-RISC1.1 shared executable dynamically linked -not stripped

Can you tell from file() output it is 32 bit or 64 bit executable? What would be your guess on this executable?

Horia.
Best regards from Romania,
Horia.
Dennis Handly
Acclaimed Contributor

Re: Memory segment error.

>Horia: PA-RISC1.1 shared executable dynamically linked -not stripped

>Can you tell from file output it is 32 bit or 64 bit executable?

PA1.1 can only do 32 bit mode. For more, see my reply here:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1160370
Horia Chirculescu
Honored Contributor

Re: Memory segment error.

@Dennis:>PA1.1 can only do 32 bit mode.

What do you think about this:

# file /oraprod/prod/oracle/product/805/bin/oracle
/oraprod/prod/oracle/product/805/bin/oracle: PA-RISC1.1 shared executable dynamically linked -not stripped

# su - ora9prod
You have mail.
$ sqlplus /nolog

SQL*Plus: Release 9.2.0.4.0 - Production on Mon Feb 22 12:24:47 2010

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

SQL> connect / as sysdba;
Connected.
SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
$

Horia.
Best regards from Romania,
Horia.
Horia Chirculescu
Honored Contributor

Re: Memory segment error.

.. and:

$ getconf HW_CPU_SUPP_BITS
64

Horia.
Best regards from Romania,
Horia.
Dennis Handly
Acclaimed Contributor

Re: Memory segment error.

>Horia: What do you think about this:
>oracle: PA-RISC1.1

Strangely this didn't change, still 32. :-)

>$ sqlplus /nolog
>Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit

This claims to be 64 bit.
Dennis Handly
Acclaimed Contributor

Re: Memory segment error.

>Horia: getconf HW_CPU_SUPP_BITS -> 64

Since this always returns "black" (on Integrity or 11.23), it is a waste of time using it, unless you have 11.11 and an obsolete PA1.1 box or one that still allows a 32 bit kernel.
Horia Chirculescu
Honored Contributor

Re: Memory segment error.

$ file /stand/vmunix
/stand/vmunix: ELF-64 executable object file - PA-RISC 2.0 (LP64)
Best regards from Romania,
Horia.
Horia Chirculescu
Honored Contributor

Re: Memory segment error.

It is correct.

file /ora/home/ora9dba/product/9i/bin/oracle

shows clearly:

/ora/home/ora9dba/product/9i/bin/oracle: ELF-64 executable object file - PA-RISC 2.0 (LP64)

on the same hardware.

Thank you.

Horia.
Best regards from Romania,
Horia.