2

Possible Duplicate:
deleting shared memory with ipcrm in Linux

I am running Fedora 15 64 bit. I have some shared memory that wasn't cleaned up by a process. You can see the shared memory when you call ipcs -m:

------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch     status      
0x51012a29 294919     trevor     666        194400     2                       

When I call ipcrm -m 294919 and then check to see if the shared memory is deleted you see:

------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch     status      
0x00000000 294919     trevor     666        194400     2          dest   

IMO the shared memory is still there... because it shows up when i call ipcs -m. Is this shared memory actually deleted?

Community
  • 1
  • 1
Trevor Boyd Smith
  • 18,164
  • 32
  • 127
  • 177
  • (if I am missing some nuance please explain. like for example. maybe 'it is deleted but due to linux convention the shared memory you deleted still shows up because... $INSERT_EXPLANATION'. or maybe 'it is deleted ... the 'dest' means the shared memory is destroyed... it won't ever get deleted from ipcs -m unless you do so and so.'). – Trevor Boyd Smith Sep 16 '11 at 20:36

1 Answers1

2

Do a little bit of googling. Here's what I found;

dest apparently means marked to be destroyed. I am guessing it will not be destroyed unless it is being referenced or a transitory state.

http://www.puschitz.com/TuningLinuxForOracle.shtml

Ender Wiggin
  • 414
  • 1
  • 6
  • 16
  • ya I just found out that "dest" means marked for destruction. To actually make the shared memory segment go away you need to kill the process using the shared memory segment. – Trevor Boyd Smith Sep 16 '11 at 20:45
  • soln: when you call `ipcs -mp` you get a list of the PIDs associated with the shared memory segment. Then you can kill based on the PID or lookup the name of the PID by doing `ps -ef | grep PID`. I checked to see who is using the shared memory and then killed it. – Trevor Boyd Smith Sep 16 '11 at 20:47