Recent changes Random page
GAMING
Technology
 
Gaming
Entertainment
Science Fiction
Biggest wikis
Hobbies
Music
See more...

Music Player Daemon Problems shmgetting

From Music Player Daemon Community Wiki

Jump to: navigation, search
 

This problem has been reported many times by FreeBSD users, but it appears to happen on also on Mac OS X. When they started MPD they got the following error :

 Problems shmget'ing.

[edit] FreeBSD

The shmget function must not be called from within jails. But there's a MIB entry which determines whether processes have access to those System V IPC primitives. You can change this behaviour by typing

 sysctl security.jail.systemvipc_allowed=1

You can add this to your /etc/sysctl.conf to set this value every startup. But be aware that this currently affects all jails on a system.

If you are not running any jails, the problem may simply be a limit on the amount of shared memory that can be allocated. To increase the amount of shared memory available, adjust the kern.ipc.shmall and kern.ipc.shmmax sysctl variables. Doubling both of them is usually a good start.

[edit] NetBSD

Under NetBSD mpd can use up more pages than allowed. Try

 sysctl -w kern.ipc.shmmaxpgs=4096

[edit] Mac OS X

It seems that defaults settings for shared memory are too restrictive, making applications to prevent others to get some shared memory. Check application that use shared memory, especially non apple ones with

 lsof | grep PSXSHM

For example, stopping postgresql enabled mpd to start correctly on at least one system. Also, mpd cannot startup more than one time, the second time it raises the "Problems shmget'ing" error and exits. You can increase shared memory to avoid errors if you edit /etc/rc and change

 sysctl -w kern.sysv.shmmax=4194304 kern.sysv.shmmin=1 kern.sysv.shmmni=32 kern.sysv.shmseg=8 kern.sysv.shmall=1024

to

 sysctl -w kern.sysv.shmmax=8388608 kern.sysv.shmmin=1 kern.sysv.shmmni=32 kern.sysv.shmseg=8 kern.sysv.shmall=2048
Rate this article:
Share this article: