From: peyton.bland@med.umich.edu (Peyton Bland)
Subject: Re: Q: "orphaned" shared memory segments
Date: 26 Jul 1994 14:33:14 GMT [thread overview]
Message-ID: <peyton.bland-260794102539@86.12.med.umich.edu> (raw)
In-Reply-To: 311maf$398@news.mic.ucla.edu
In article <311maf$398@news.mic.ucla.edu>, afj@DrMemory.nuc.ucla.edu (Andy
Jacobson) wrote:
>
> In article <peyton.bland-250794142117@86.12.med.umich.edu> peyton.bland@med.umich.edu (Peyton Bland) writes:
> >We are running OSF/1 V1.3a on a DEC Alpha 3000 Model 500. Our main
> >application (avs) uses shared memory extensively. Over time, we run out of
> >shared memory segments. The "ipcs -mo" command shows "orphaned" segments;
> >ie, segments that have no process attached to them. There are other
> >segments that show that they are attached to processes but were created by
> >users that are no longer logged on. I assume these result if the
> >application terminates abnormally.
> >
> >These can be cleaned up manually using the "ipcrm -m <nnn>" command.
> >Anybody else seen this? Is this a problem with OSF or with the
> >application? It's easy to write a short script that uses awk to do some of
>
> This is an AVS thing. I use AVS on both Sun and Alpha AXP and they both
> have this problem. I have confered with AVS about it, and they explain that
> this is what happens anytime you exit AVS not through the main menu.
> I suppose that AVS has a destruct function that cleans these all out, otherwise
> there is nothing to delete them when AVS processes die.
> It would be nice if there were a utility (aside from reboot) that would clean
> out shmsegs that are not attached, but, not knowing of any, I use ipcrm -m
> for all the segs. (Quite a bother).
Andy,
Thanks for the info. I did a little playing around and found that under
some circumstances of exiting AVS "abnormally", segs are deleted. Anyway,
here is a little procedure I worked out on our Alpha to remove segments
that have no processes attached. It's not guaranteed for all systems, it's
not elegant, and it doesn't cleanup all the segments that I would like it
to, but it's a start...
ipcs -mo | tail +4 | awk '{if ($7 == 0) print $2}' | xargs -t -i ipcrm -m
{}
(There are several segments on our system now that show processes attached
to them, but no users or active PIDs associated with them, so a neat
enhancement would be to match-up active PIDs with the PIDs from the ipcs
command and process accordingly. Any takers?) I guess it could be run by
cron periodically. We don't re-boot too often, so this procedure should
help. At one point we had about 30-40 orphaned segments and were running
out of shared memory even though half of our 256Mbytes of main memory are
setup for shared memory, so it's a real problem!
Peyton
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Peyton Bland Digital Image Processing Lab
Dept. of Radiology University of Michigan
-----------------------------------------------------------
"We all have better moments than anybody ever knows, and so
do all the others.... We are a great mystery. Each one of
us is a secret, and on that basis we ought to treat each
other with the deepest respect."
-- Garrison Keillor
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-
next prev parent reply other threads:[~1994-07-26 14:33 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
1994-07-25 18:30 Q: "orphaned" shared memory segments Peyton Bland
1994-07-26 0:45 ` Andy Jacobson
1994-07-26 14:33 ` Peyton Bland [this message]
1994-07-26 15:57 ` David Potter
1994-07-26 16:43 ` Steve Peltz
1994-07-26 22:02 ` Peter da Silva
1994-07-28 0:39 ` Steve Peltz
1994-07-28 14:42 ` Peter da Silva
1994-07-28 20:06 ` Steve Peltz
1994-07-29 15:24 ` Peter da Silva
1994-07-29 8:58 ` Burkhard Neidecker-Lutz
1994-07-29 15:26 ` Peter da Silva
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox