Subject: Re: /dev/mem: Permission denied - what have I done?
To: David Chapman <dchapman@CS670402-A.gvcl1.bc.wave.home.com>
From: Matthias Buelow <mkb@mukappabeta.de>
List: netbsd-help
Date: 01/25/2001 23:36:12
David Chapman <dchapman@CS670402-A.gvcl1.bc.wave.home.com> writes:

>Still getting Gdk-WARNING **: shmget failed! at times, but it usually is
>not fatal.  Something to do with Gnome, I guess.

Due to a gross misdesign which unfortunately was standardized
without being revised, System V IPC (SysV shmem segments, semaphores
and message queues) has the annoying habit of leaving IPC identifier
turds around if the application using them crashes, i.e., there
are no reference-counts on the data structures used and the system
can't simply delete them like with file-descriptors, when the last
process which has them open has exited.  Programs normally delete
them when they are no longer needed but if a program crashes, the
stuff will hang around and eventually the maximum number of entries
is exhausted.  You can check this with the "ipcs" command, and
remove corpses manually with "ipcrm".
This may be one explanation of the behaviour you observe, there
might be others, of course.  For example, there's the (unlikely,
with NetBSD's defaults, imho) possibility that there aren't enough
shmem segments configured in the kernel, in that case you could
increase the number in your kernel config file and rebuild.
Apart from that, it could simply be gnome bugs, of course.

mkb