Operating System - HP-UX
1834019 Members
2828 Online
110063 Solutions
New Discussion

shared memory segment not released

 
SOLVED
Go to solution

shared memory segment not released

we have an rp8400 system running hpux11.11
some shared memory segment are not released when NATTCH value is equal to zero. is it a normal behaivor of the system ?

here is a portion of the output of ipcs command

T ID Key MODE OWNER GROUP
m 1013 0x412002e2 --rw-rw-rw- root sys

NATTCH ATIME DTIME CTIME
0 10:21:17 no-entry 0:06:12


this line describe a shared memory segment owned by root.

NATTCH=0 that means that there is no process attaching this segment: so this segment must be released.

ATIME=10:21:17 but DTIME=no-entry: that means that means that NATTCH should not be equal to zero.

could you help me to understand what is happening?

3 REPLIES 3
Steven E. Protter
Exalted Contributor

Re: shared memory segment not released

Shalom,

Sounds like bad programming, or a program that was supposed to be started by a non-priviledged user was started by root, which locked the memory segment.

If you cand identify and kill theprocess, the problem may go away.

You may need to use ipcrm to remove it.
ipcrm -m 1013

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Bill Hassell
Honored Contributor
Solution

Re: shared memory segment not released

Shared memory segments are never 'automatically' removed by the system. All management of these areas is by application programs. This is part of the design of shared resources. And the (very dangerous) kill -9 command will leave segments behind. Note that NATTCH can certainly be zero due to bad program design yet the segment(s) may be needed. You can manually remove unattached segments with the ipcrm if you're sure about current application usage.


Bill Hassell, sysadmin
Emil Velez
Honored Contributor

Re: shared memory segment not released


The IPCRM command should be able to really get rid of the correct shared memory segement if you specify a IP.. IT can also be used for semiphore sets and message queues


good luck

Emil