Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: BediaB@Lilhd.Logica.Com
Subject: Re: getting rid of shared memory
Date: Wed, 9 Mar 1994 10:35:36 GMT	[thread overview]
Message-ID: <CME83C.Bx2@carmen.logica.co.uk> (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"
__________________________________________________________


             reply	other threads:[~1994-03-09 10:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-03-09 10:35 BediaB [this message]
  -- strict thread matches above, loose matches on Subject: below --
1994-03-09  2:33 getting rid of shared memory Stephen Reagan
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