Why shared memory can not be released by "ipcrm" command ?

Solution Verified - Updated -

Issue

  • Why shared memory can not be released by "ipcrm" command ?
  • How to remove shared memory segment ?
  • What is the meaning of the "dest" seen under status from the output of the "ipcs -m" command ?

Eg:

  • The shared memory segment (4685833) is marked to be destroyed on the system.
# ipcs -m
------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch     status      
0x74000157 3473408    root      600        4          0                       
0x7400012d 4161537    root      600        4          0                       
0x74000190 851970     root      600        4          0                       
0x00000000 4521987    root      644        80         2                       
0x7400012c 4128772    root      600        4          0                       
0x00000000 4554757    root      644        16384      2                       
0x00000000 4587526    root      644        280        2                       
0x00000000 4620295    root      644        64         2          dest         
0x00000000 4653064    root      644        16384      2          dest         
0x00000000 4685833    root      644        280        2          dest         
  • Tried to remove shared memory segment with shmid (4685833) using ipcrm command.
# ipcrm -m 4685833
  • The shared memory segment with shmid (4685833) still present.
# ipcs -m
------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch     status      
0x74000157 3473408    root      600        4          0                       
0x7400012d 4161537    root      600        4          0                       
0x74000190 851970     root      600        4          0                       
0x00000000 4521987    root      644        80         2          dest         
0x7400012c 4128772    root      600        4          0                       
0x00000000 4554757    root      644        16384      2                       
0x00000000 4587526    root      644        280        2                       
0x00000000 4620295    root      644        64         2          dest         
0x00000000 4653064    root      644        16384      2          dest         
0x00000000 4685833    root      644        280        2          dest 

Environment

  • Red Hat Enterprise Linux 5
  • Red Hat Enterprise Linux 6
  • Shared Memory
  • ipcrm, ipcs

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content