Mopidy Crashes on use of next song

I can confirm the same problem with ArchLinux on a Cubieboard 2.
Both the Cubieboard 2 and the RPi are armv7 dual core platforms.
Apparently there is some kernel/glibc/compiler bug that affects the
priority inheritance of pthread.

With a few searches I found out, that this bug has been around for
quite some time (also it comes and goes, some posts are from 2010).

The easiest solution is to either disable pulseaudio (meh - I also want to
stream the output via RTP)
or to recompile pulseaudio without the priority inheritance support.

Here’s how you do that:

The read allows you to edit the code before starting the make process :wink:

  • Add armv7h to the arch=() in line 16 like this:

      arch=(i686 x86_64 armv7h)
    
  • install all build requirements (maybe some packages are missing here, just pay attention to
    the output)

    pacman -S pkg-config m4 gcc make fakeroot avahi bluez bluez-libs intltool jack2-dbus lirc fftw gtk3 check

  • start the build process by running makepkg

  • you should now see a blank screen (this is the read waiting for something to happen)

  • open a second shell and go into /home/foobar/pulseaudio/src/pulseaudio-6.0 where pulseaudio is the directory where you have placed the PKGBUILD

  • now open the configure file and go to line 21554-21587 where it starts with

      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
    

and ends with

$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h

fi

Delete these lines and everything in between them.

  • Save the configure script and go back to the shell where read is waiting and hit Enter there.

The compilation should now start with PTHREAD_PRIO_INHERIT being disabled \o/
After a long while (took about 30min on the Cubieboard 2) you can install the package by running

pacman -U pulseaudio-6.0-2-armv7h.pkg.tar.xz

Restart your system so that all cached libraries are reloaded and start mopidy to confirm that it is working.

After this fix, the error message changes to a warning for me:

WARNING Element doesn’t implement handling of this stream. Please file a bug.

Let me know whether this helps. If it does maybe we can push this fix upstream to ArchLinux ARM!