Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* Re: Shared Memory remains when using local:0 for X under DEC OSF/1
@ 1993-08-20  1:37 Joel McCormack
  0 siblings, 0 replies; 3+ messages in thread
From: Joel McCormack @ 1993-08-20  1:37 UTC (permalink / raw)


The old MIPS local:0 shared memory code did not leave segments lying around. 
The OSF code does.  Upon further investigation, Sam Hsu discovered the
following code in the shared memory transport:


    sds.shm_perm.mode = 0;                      /* for security */
    shmctl(chan->smid, IPC_SET, &sds);
    /* I don't understand what this is doing
     * shmctl(chan->smid, IPC_RMID, 0);
     */

The commented-out code wasn't commented out on Ultrix, and ``removed'' the
shared memory segment.  But like files that have been removed, the shared
memory doesn't really go away until all references go away.  With this code
commented out, it segment stays, because the shared memory semantics say that
you have to leave the segment lying around, just in case some program might
want to link to it later.

We hope that reuncommenting the code (and putting in an explanatory comment
above it, so that this problem never reoccurs) will fix the problem on OSF,
and we'll try to contact the appropriate release people to get this fix out
as soon as possible.

In the meantime, here's a quick and dirty script that will get rid of a lot of
your defunct shared memory segments:

set a=""
foreach n (`ipcs -m | sed '1,/MODE/d' | awk '{ print $2 }'`)
        set a="$a -m $n"
end
if ( "$a" != "" ) then
        ipcrm $a
endif


-- 
- Joel McCormack (decwrl!joel, joel@decwrl.dec.com)


^ permalink raw reply	[flat|nested] 3+ messages in thread
* Shared Memory remains when using local:0 for X under DEC OSF/1
@ 1993-08-14 23:19 Cris Circle
  1993-08-16 21:04 ` Martin Mohring
  0 siblings, 1 reply; 3+ messages in thread
From: Cris Circle @ 1993-08-14 23:19 UTC (permalink / raw)


Beware of the local:0 DISPLAY setting. This indeed speeds up graphics
performance, but if the program terminates without closing the
connection properly (e.g. if killed), it leaves a 1-MB shared memory
segment behind THAT WON'T DISAPPEAR until it is explicitely deleted!

--
panic: user is not intelligent enough to edit .signature file
panic: system going down in -10 seconds because of previous error
panic: don't know how to go down when t=0 is not in future
panic: don't know what to do now. Stop.


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

end of thread, other threads:[~1993-08-20  1:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1993-08-20  1:37 Shared Memory remains when using local:0 for X under DEC OSF/1 Joel McCormack
  -- strict thread matches above, loose matches on Subject: below --
1993-08-14 23:19 Cris Circle
1993-08-16 21:04 ` Martin Mohring

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