Mopidy crashes immediately after startup. Except running as root

Hello,
my Mopidy runs on Debain 9 on my Raspberry Pi. Every time I start Mopidy it crashes immediately. The only solution is to run it as root. The error I get is a “Speicherzugriffsfehler”. I don’t know the correct english term but it should be something like memory access violation or maybe Segmentation fault. Could someone help me to find a solution other than permanently running as root? This seem to be a bug.

Please provide the output of mopidy deps and mopidy config (in English). There some info here on how to get and debug a core dump https://jodal.no/post/5779178001/log-from-the-debugging-of-a-segfault/

Is this really Debian Stretch on a Raspberry Pi 2/3 or (unsupported?) Raspbian Stretch?

I have updated Raspbian Jessie to Stretch and I guess it is half supported. They don’t let you download an Stretch image, but they provide a stretch PPA. Anyways I had the same problem with Jessie too.

pi@raspberrypi:~ $ sudo -i -u mopidy /usr/bin/mopidy --config /etc/mopidy/mopidy.conf deps

Executable: /usr/bin/mopidy
Platform: Linux-4.9.35-v7±armv7l-with-debian-9.0
Python: CPython 2.7.13 from /usr/lib/python2.7
Mopidy: 2.1.0 from /usr/lib/python2.7/dist-packages
Mopidy-ALSAMixer: 1.1.0 from /usr/local/lib/python2.7/dist-packages
Mopidy>=0.19: 2.1.0 from /usr/lib/python2.7/dist-packages
setuptools: 36.2.2 from /usr/local/lib/python2.7/dist-packages
Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
pyalsaaudio: 0.7 from /usr/lib/python2.7/dist-packages
Mopidy-Local-Images: 1.0.0 from /usr/local/lib/python2.7/dist-packages
Mopidy>=1.1: 2.1.0 from /usr/lib/python2.7/dist-packages
setuptools: 36.2.2 from /usr/local/lib/python2.7/dist-packages
Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
uritools>=1.0: 2.0.0 from /usr/local/lib/python2.7/dist-packages
ipaddress; python_version == “2.7”: 1.0.18 from /usr/local/lib/python2.7/dist-packages
Mopidy-Iris: 3.0.5 from /usr/local/lib/python2.7/dist-packages
setuptools>=3.3: 36.2.2 from /usr/local/lib/python2.7/dist-packages
pylast>=1.6.0: 1.9.0 from /usr/local/lib/python2.7/dist-packages
six: 1.10.0 from /usr/local/lib/python2.7/dist-packages
spotipy>=2.3.8: 2.4.4 from /usr/local/lib/python2.7/dist-packages
requests>=1.0: 2.18.1 from /usr/local/lib/python2.7/dist-packages
idna<2.6,>=2.5: 2.5 from /usr/local/lib/python2.7/dist-packages
urllib3<1.22,>=1.21.1: 1.21.1 from /usr/local/lib/python2.7/dist-packages
chardet<3.1.0,>=3.0.2: 3.0.4 from /usr/local/lib/python2.7/dist-packages
certifi>=2017.4.17: 2017.4.17 from /usr/local/lib/python2.7/dist-packages
Mopidy>=2.0: 2.1.0 from /usr/lib/python2.7/dist-packages
Mopidy-Local-Images>=1.0: 1.0.0 from /usr/local/lib/python2.7/dist-packages
Mopidy>=1.1: 2.1.0 from /usr/lib/python2.7/dist-packages
setuptools: 36.2.2 from /usr/local/lib/python2.7/dist-packages
Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
uritools>=1.0: 2.0.0 from /usr/local/lib/python2.7/dist-packages
ipaddress; python_version == “2.7”: 1.0.18 from /usr/local/lib/python2.7/dist-packages
ConfigObj>=5.0.6: 5.0.6 from /usr/local/lib/python2.7/dist-packages
six: 1.10.0 from /usr/local/lib/python2.7/dist-packages
Mopidy-Local-SQLite: 1.0.0 from /usr/local/lib/python2.7/dist-packages
Mopidy>=1.1: 2.1.0 from /usr/lib/python2.7/dist-packages
setuptools: 36.2.2 from /usr/local/lib/python2.7/dist-packages
Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
uritools>=1.0: 2.0.0 from /usr/local/lib/python2.7/dist-packages
ipaddress; python_version == “2.7”: 1.0.18 from /usr/local/lib/python2.7/dist-packages
Mopidy-Spotify: 3.1.0 from /usr/local/lib/python2.7/dist-packages
pyspotify>=2.0.5: 2.0.5 from /usr/lib/python2.7/dist-packages
cffi>=1.0.0: 1.9.1 from /usr/lib/python2.7/dist-packages
Mopidy>=2.0: 2.1.0 from /usr/lib/python2.7/dist-packages
setuptools: 36.2.2 from /usr/local/lib/python2.7/dist-packages
Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
requests>=2.0: 2.18.1 from /usr/local/lib/python2.7/dist-packages
idna<2.6,>=2.5: 2.5 from /usr/local/lib/python2.7/dist-packages
urllib3<1.22,>=1.21.1: 1.21.1 from /usr/local/lib/python2.7/dist-packages
chardet<3.1.0,>=3.0.2: 3.0.4 from /usr/local/lib/python2.7/dist-packages
certifi>=2017.4.17: 2017.4.17 from /usr/local/lib/python2.7/dist-packages
GStreamer: 1.10.4.0 from /usr/lib/python2.7/dist-packages/gi
Detailed information:
Python wrapper: python-gi 3.22.0
Relevant elements:
Found:
uridecodebin
souphttpsrc
appsrc
alsasink
osssink
oss4sink
pulsesink
id3demux
id3v2mux
lamemp3enc
mad
mpegaudioparse
mpg123audiodec
vorbisdec
vorbisenc
vorbisparse
oggdemux
oggmux
oggparse
flacdec
flacparse
shout2send
Not found:
flump3dec

pi@raspberrypi:~ $ sudo -i -u mopidy /usr/bin/mopidy --config /etc/mopidy/mopidy.conf config

[core]
cache_dir = /var/cache/mopidy
config_dir = /etc/mopidy
data_dir = /var/lib/mopidy
max_tracklist_length = 10000
restore_state = false

[logging]
color = true
console_format = %(levelname)-8s %(message)s
debug_format = %(levelname)-8s %(asctime)s [%(process)d:%(threadName)s] %(name)s\n %(message)s
debug_file = /var/log/mopidy/mopidy-debug.log
config_file = /etc/mopidy/logging.conf

[audio]
mixer = software
mixer_volume =
output = autoaudiosink
buffer_time =

[proxy]
scheme =
hostname =
port =
username =
password =

[spotify]
enabled = true
username = *****
password = ********
client_id = ****
client_secret = ********
bitrate = 320
volume_normalization = true
private_session = false
timeout = 10
allow_cache = true
allow_network = true
allow_playlists = true
search_album_count = 20
search_artist_count = 10
search_track_count = 50
toplist_countries =

[local-sqlite]
enabled = true
directories =
Albums local:directory?type=album
Artists local:directory?type=artist
Composers local:directory?type=artist&role=composer
Genres local:directory?type=genre
Performers local:directory?type=artist&role=performer
Release Years local:directory?type=date&format=%25Y
Tracks local:directory?type=track
Last Week’s Updates local:directory?max-age=604800
Last Month’s Updates local:directory?max-age=2592000
timeout = 10
use_album_mbid_uri = true
use_artist_mbid_uri = false
use_artist_sortname = false

[local-images]
enabled = true
library = json
base_uri = /images/
image_dir =
album_art_files =
*.jpg
*.jpeg
*.png

[iris]
enabled = true
country = NZ
locale = en_NZ
authorization_url = https://jamesbarnsley.co.nz/auth_v2.php

[alsamixer]
enabled = false ; Extension disabled by user config.

[mpd]
enabled = true
hostname = 127.0.0.1
port = 6600
password =
max_connections = 20
connection_timeout = 60
zeroconf = Mopidy MPD server on $hostname
command_blacklist =
listall
listallinfo
default_playlist_scheme = m3u

[http]
enabled = true
hostname = ::
port = 6680
static_dir =
zeroconf = Mopidy HTTP server on $hostname

[stream]
enabled = true
protocols =
http
https
mms
rtmp
rtmps
rtsp
metadata_blacklist =
timeout = 5000

[m3u]
enabled = true
base_dir =
default_encoding = latin-1
default_extension = .m3u8
playlists_dir = /var/lib/mopidy/playlists

[softwaremixer]
enabled = true

[file]
enabled = true
media_dirs =
$XDG_MUSIC_DIR|Music
~/|Home
excluded_file_extensions =
.jpg
.jpeg
show_dotfiles = false
follow_symlinks = false
metadata_timeout = 1000

[local]
enabled = true
library = json
media_dir = /var/lib/mopidy/media
scan_timeout = 1000
scan_flush_threshold = 100
scan_follow_symlinks = false
excluded_file_extensions =
.directory
.html
.jpeg
.jpg
.log
.nfo
.png
.txt

I tried to get the core dump but gdb only says:
gdb /usr/bin/python core
GNU gdb (Raspbian 7.12-6) 7.12.0.20161007-git
Copyright © 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and “show warranty” for details.
This GDB was configured as “arm-linux-gnueabihf”.
Type “show configuration” for configuration details.
For bug reporting instructions, please see:
Find the GDB manual and other documentation resources online at:
For help, type “help”.
Type “apropos word” to search for commands related to “word”…
Reading symbols from /usr/bin/python…(no debugging symbols found)…done.
/home/pi/core: File or directory not found

I would suggest you disable all the optional extensions, run with verbose logging (-vvv) and make sure you have a file called /home/pi/core to open in gdb.

well, yes, there is a repository for people to test with but it’s not released yet because it’s not entirely supported yet. Last I heard there were issues with the raspberry pi specific firmware. I can offer further help debugging on Jessie, but not Stretch.