Music Player Daemon Community Wiki

Music Player Daemon Problems shmgetting

522pages on
this wiki
Add New Page
Talk0 Share

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.

FreeBSD Edit

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.

NetBSD Edit

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

 sysctl -w kern.ipc.shmmaxpgs=4096

Mac OS X Edit

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


 sysctl -w kern.sysv.shmmax=8388608 kern.sysv.shmmin=1 kern.sysv.shmmni=32 kern.sysv.shmseg=8 kern.sysv.shmall=2048

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.