* 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
* Re: Shared Memory remains when using local:0 for X under DEC OSF/1
1993-08-14 23:19 Shared Memory remains when using local:0 for X under DEC OSF/1 Cris Circle
@ 1993-08-16 21:04 ` Martin Mohring
0 siblings, 0 replies; 3+ messages in thread
From: Martin Mohring @ 1993-08-16 21:04 UTC (permalink / raw)
In article <rang.745370397@alpha.ipk.fhg.de> rang@alpha.ipk.fhg.de (Cris Circle) writes:
> Path: informatik.tu-muenchen.de!math.fu-berlin.de!fub!mailgzrz.TU-Berlin.DE!gmdtub!sunplt!alpha.ipk.fhg.de!rang
> From: rang@alpha.ipk.fhg.de (Cris Circle)
> Newsgroups: comp.unix.osf.osf1
> Date: 14 Aug 93 23:19:57 GMT
> Sender: usenet@sunplt.ipk.fhg.de
> Organization: IPK-Berlin, Fraunhofer Gesellschaft, Germany
> Lines: 10
> 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!
I think that's because they use a SysV shm connection. And SysV shm
segment's are persistent. They must be, because the programming model
of SysV shm allows, that later created processes can attach a region
to the adress space. These regions must be explicitly deleted.
After the next boot they are away.
Martin
--
| Martin Mohring, Technische Universit"at M"unchen |
| mohring@informatik.tu-muenchen.de | "even think about it!" |
^ permalink raw reply [flat|nested] 3+ messages in thread
* 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
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-14 23:19 Shared Memory remains when using local:0 for X under DEC OSF/1 Cris Circle
1993-08-16 21:04 ` Martin Mohring
-- strict thread matches above, loose matches on Subject: below --
1993-08-20 1:37 Joel McCormack
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox