Operating System - HP-UX
1833764 Members
2996 Online
110063 Solutions
New Discussion

Meoemory windows- ipcrm marks for deletion but doesn't delete

 
SOLVED
Go to solution
SSO Montgomery
Advisor

Meoemory windows- ipcrm marks for deletion but doesn't delete

I am trying to remove a certain part of shared memory.


I did a ipcrm -m 1003


$ ipcs
IPC status from /dev/kmem as of Mon Nov 5 16:13:30 2001
T ID KEY MODE OWNER GROUP
Message Queues:
q 0 0x3c1441ec -Rrw--w--w- root root
q 1 0x3e1441ec --rw-r--r-- root root
Shared Memory:
m 0 0x411441cf --rw-rw-rw- root root
m 1 0x4e0c0002 --rw-rw-rw- root root
m 2 0x41180069 --rw-rw-rw- root root
m 1003 0x00000000 D-rw------- oracle8 dba (This is the one
that I was trying to get rid of)
m 604 0x02e6301c --rw------- oracle8 dba
m 405 0x650c0295 --rw-rw---- remedy remedy
m 206 0x02e6301d --rw------- oracle8 dba
Semaphores:
s 0 0x411441cf --ra-ra-ra- root root
s 1 0x4e0c0002 --ra-ra-ra- root root
s 2 0x41180069 --ra-ra-ra- root root
s 3 0x01090522 --ra-r--r-- root root
s 1476 0x0103f436 --ra------- oracle8 dba
s 1029 0x0e73a476 --ra------- oracle8 dba
s 134 0x660c0295 --ra-ra---- remedy remedy
s 263 0x010c04f3 --ra-ra-ra- root root

Is there a way to truly delete this without a reboot?
Am I missing a step?

Lynn


4 REPLIES 4
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Meoemory windows- ipcrm marks for deletion but doesn't delete

Ths is working correctly. Just as a file will not unlink until all the processes that have the file open have closed the file, shared memory segments are not actually removed until all processes have detached the segment. If you kill those processes, then you can remove the segment.

Clay
If it ain't broke, I can fix that.
Uday_S_Ankolekar
Honored Contributor

Re: Meoemory windows- ipcrm marks for deletion but doesn't delete

Hi,

Try with ipcs -moba to display all the shared memeory information. and then try to delete with ipcrm -m followed by number. Delete entries only for those with 0 NATTACH

Goodluck,
-USA..
Good Luck..
James R. Ferguson
Acclaimed Contributor

Re: Meoemory windows- ipcrm marks for deletion but doesn't delete

Hi:

The shared memory isn't removed until the last process detaches. (see 'man ipcrm').

Regards!

...JRF...
Roger Baptiste
Honored Contributor

Re: Meoemory windows- ipcrm marks for deletion but doesn't delete

hi,

Do this to check whether
there are any processes
still using the SM segment:

ipcs -am |grep 1003 |awk '{print $9}'

If it returns a value =>1
then there are processes using
the SM and you cannot remove
it gracefully.

-raj
Take it easy.