Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* getting rid of shared memory
@ 1994-03-09  2:33 Stephen Reagan
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Reagan @ 1994-03-09  2:33 UTC (permalink / raw)


We have occasional problems with shared memory that just won't go
away - the keys become zero and the ipcrm command won't get rid of
them.  Obviously (I guess, anyway...) there are bugs somewhere in
our software which lead to this situation, but until we can find and
fix them we need a way to get rid of these things without having to
constantly reboot the machine (we're using DEC OSF 1.3).  Any ideas?

--Steve


^ permalink raw reply	[flat|nested] 2+ messages in thread
* Re: getting rid of shared memory
@ 1994-03-09 10:35 BediaB
  0 siblings, 0 replies; 2+ messages in thread
From: BediaB @ 1994-03-09 10:35 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2787 bytes --]

In article <CMDLsn.1G5@unix.portal.com> sdr@shell.portal.com (Stephen Reagan) writes:
>We have occasional problems with shared memory that just won't go
>away - the keys become zero and the ipcrm command won't get rid of
>them.  Obviously (I guess, anyway...) there are bugs somewhere in
>our software which lead to this situation, but until we can find and
>fix them we need a way to get rid of these things without having to
>constantly reboot the machine (we're using DEC OSF 1.3).  Any ideas?
>
>--Steve
We have this problem too. Basically, we have 3 networked Dec Alphas 
running OSF 1.3 using NFS. Each Alpha has a development area which is mounted 
on the other two ie you can see anything from anywhere.
 
Given that my development area is on Alpha1, the ipc/shared memory routines 
use ftok() to create a key for shmget(). The ftpk() function requires a 
pathname of an existing file.

if I log on to Alpha2 and create a process which creates shared memory etc, 
then the ftok files are on Alpha1's disks. If I kill -9 the the Alpha2 process 
then when I do a 'ps -fu bharat' I see the following on Alpha2 :-

USER       PID  PPID %CPU STARTED  TT       TIME COMMAND
bharat   27543     1  0.0   Mar 01 ??    0:59.01 <exiting>

where process 27543 was my original process which I created. 

When I do a 'ipcs � grep bharat' on Alpha2 I see :-

Shared Memory:
T     ID     KEY      MODE       OWNER    GROUP
m    903 0x       0 --rw-rw-rw-   bharat user
m    904 0x       0 --rw-rw-rw-   bharat user
m    905 0x       0 --rw-rw-rw-   bharat user
m    906 0x       0 --rw-rw-rw-   bharat user
m    907 0x       0 --rw-rw-rw-   bharat user
m    808 0x       0 --rw-rw-rw-   bharat user
m    809 0x       0 --rw-rw-rw-   bharat user
m    610 0x       0 --rw-rw-rw-   bharat user
m    611 0x       0 --rw-rw-rw-   bharat user

Which I just can't get rid of.

In contrast, if I log onto Alpha1 (where my development area really is) and
do the same thing, ie create a process, (loads of shared mem etc), 
kill -9 the process then this situation does not happen. No outstanding shared 
memory usage and no funny <exiting> process.

The above scenarios are consistent ie whenever I've tried the above the same 
thing always happens.

Like you, the only way to get rid of the shared mem. and <exiting> process
is to reboot Alpha2. Does anyone know how to clear up shared memory in a
better way ? 

I guess all that I've said is worthless if you only have standalone alphas!!


Bharat Bedia.


__________________________________________________________
Bharat Bedia 
Logica UK, 68 Newman St, London W1A 4SE, UK
Tel:   +44-71-637-9111
Email: BediaB@Lilhd.Logica.Com

Disclaimer:-
"Opinions expressed are my own and NOT Logica's"
__________________________________________________________


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1994-03-09 10:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1994-03-09  2:33 getting rid of shared memory Stephen Reagan
  -- strict thread matches above, loose matches on Subject: below --
1994-03-09 10:35 BediaB

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox