1819927 Members
3236 Online
109607 Solutions
New Discussion юеВ

ipcrm fails!

 
SOLVED
Go to solution
Andi Rigauer
Regular Advisor

ipcrm fails!

Hi there,
today I saw 2 dead shared memory segments with ipcs -m. These two segements were nearly 700 Megs big, --> ipcs -ma . the machine has only 2 Gigs memory. OK what I also saw was an key that looked like as follow 0x000000. now when i did an ipcrm -m there was always a message that he couldn't find the ID.
has anybody ever had the same problem yet? how do you fixed it, without reboot?

Thanx in advance
god, root where's the difference
6 REPLIES 6
Steven Sim Kok Leong
Honored Contributor

Re: ipcrm fails!

Hi,

Does the mode of the ID you want to remove contain a D?

ie. D-rw-rw-rw-

If the shared memory segment is already detached, you need not bother about it. It is analogous to a "" process.

If it is not detached, perhaps you would like to show us the ipcs output and the command you type along with the error (screen dump).

Hope this helps. Regards.

Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com
Andi Rigauer
Regular Advisor

Re: ipcrm fails!

Hi,

thanx for the answer, yes it had a D
and I couldn't restart the database because of the shared memory
god, root where's the difference
Steven Sim Kok Leong
Honored Contributor
Solution

Re: ipcrm fails!

Hi,

You cannot remove a shared memory segment that is already detached (released).

Did you also check your semaphores ie. ipcs -b -s?

If these are runaway semaphores, they must similarly be removed via ipcrm.

Hope this helps. Regards.

Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com
Sridhar Bhaskarla
Honored Contributor

Re: ipcrm fails!

You cannot further remove a shared memory segment that is already marked to be "D"eleted. It will be automatically deleted once the last process attached to it is completed. If it is staying long, then the process might have become runaway.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Deepak Extross
Honored Contributor

Re: ipcrm fails!

T. M. Louah
Esteemed Contributor

Re: ipcrm fails!

1- do: ipcs -mop
Look for the KEY and NATTCH column :
If both are 0, then use ipcs to remove the segment.
the following 1Liner will report the ID, KEY & NATTACH :
ipcs -mop|grep -F 0x000000 | awk '{print $2":"$3":"$7}'
2- to delete an ID with the above condition do: ipcrm -m ID
Little learning is dangerous!