Operating System - HP-UX
1833708 Members
2759 Online
110063 Solutions
New Discussion

Re: Cannot free shared memory segment

 
AlanF
New Member

Cannot free shared memory segment

Hi,

I used ipcrm to remove some shared memory segments.

Checking that they were cleared with ipcs -ma showed They were marked 'D' but not deleted. NATTACH =1 and so using LPID (in this case LPID = CPID) I tried to find the processes holding the segments.

As I was pretty sure that i had already killed these processes I was not suprised that I can no longer find them!

Any idea how I can clean up if ipc believes the nonexistant processes are still attached?

Thanks

Alan Formstone

2 REPLIES 2
spex
Honored Contributor

Re: Cannot free shared memory segment

Alan,

You may have to reboot.

PCS
Steve Lewis
Honored Contributor

Re: Cannot free shared memory segment

Check for processes who's parent PID is the one that you stopped. Then check for processes which run with the same username.

Software packages (e.g. SAP) often go through the following procedure: create the shared memory segment, fork child processes which attach to it, mark the process for deletion, then terminate the parent.
This is good for security because it stops other processes connecting to the segment. It is also good for housekeeping, in case the processes crash, the shared memory segment will be cleaned up automatically.