From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII X-Google-Thread: fee84,500b1131570ffa72 X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1994-03-09 02:35:36 PST Newsgroups: comp.unix.osf.osf1 Path: gmd.de!newsserver.jvnc.net!yale.edu!yale!gumby!newsxfer.itd.umich.edu!gatech!howland.reston.ans.net!pipex!logica.co.uk!news From: BediaB@Lilhd.Logica.Com Subject: Re: getting rid of shared memory Message-ID: Sender: news@carmen.logica.co.uk (News Manager Account) Nntp-Posting-Host: 158.234.49.206 Organization: Logica PLC X-Newsreader: Date: Wed, 9 Mar 1994 10:35:36 GMT In article 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 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 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 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" __________________________________________________________