mopidy: Freeze on play
Describe the bug
I’m on a fresh installation of Arch, using the latest available versions of all packages.
When I load a track and play it, mopidy becomes unresponsive. Log traces:
DEBUG 2025-06-28 00:53:59,526 [470880:MpdSession-28 (_actor_loop)] mopidy_mpd.session
Request from [::ffff:127.0.0.1]:41784: playid "1"
DEBUG 2025-06-28 00:53:59,529 [470880:Audio-2 (_actor_loop)] mopidy.audio.gst
Changing state to GST_STATE_READY: result=GST_STATE_CHANGE_SUCCESS
INFO 2025-06-28 00:53:59,530 [470880:TidalBackend-6 (_actor_loop)] mopidy_tidal.playback
TIDAL uri: tidal:track:3509189:1381853:1381859
DEBUG 2025-06-28 00:53:59,530 [470880:MainThread] mopidy.audio.gst
Got STATE_CHANGED bus message: old=GST_STATE_NULL new=GST_STATE_READY pending=GST_STATE_VOID_PENDING
DEBUG 2025-06-28 00:53:59,633 [470880:TidalBackend-6 (_actor_loop)] urllib3.connectionpool
https://api.tidal.com:443 "GET /v1/tracks/1381859?sessionId=a3b2e372-5f35-4522-8c33-737dd0c0b993&countryCode=NL&limit=1000 HTTP/1.1" 200 None
DEBUG 2025-06-28 00:53:59,633 [470880:TidalBackend-6 (_actor_loop)] tidalapi.request
request: https://api.tidal.com/v1/tracks/1381859?sessionId=a3b2e372-5f35-4522-8c33-737dd0c0b993&countryCode=NL&limit=1000
DEBUG 2025-06-28 00:53:59,759 [470880:TidalBackend-6 (_actor_loop)] urllib3.connectionpool
https://api.tidal.com:443 "GET /v1/tracks/1381859/playbackinfopostpaywall?sessionId=a3b2e372-5f35-4522-8c33-737dd0c0b993&countryCode=NL&limit=1000&playbackmode=STREAM&audioquality=LOSSLESS&assetpresentation=FULL HTTP/1.1" 200 704
DEBUG 2025-06-28 00:53:59,760 [470880:TidalBackend-6 (_actor_loop)] tidalapi.request
request: https://api.tidal.com/v1/tracks/1381859/playbackinfopostpaywall?sessionId=a3b2e372-5f35-4522-8c33-737dd0c0b993&countryCode=NL&limit=1000&playbackmode=STREAM&audioquality=LOSSLESS&assetpresentation=FULL
INFO 2025-06-28 00:53:59,760 [470880:TidalBackend-6 (_actor_loop)] mopidy_tidal.playback
MimeType:application/vnd.tidal.bts
INFO 2025-06-28 00:53:59,760 [470880:TidalBackend-6 (_actor_loop)] mopidy_tidal.playback
Starting playback of track:1381859, (quality:LOSSLESS, codec:FLAC, 16bit/44100Hz)
DEBUG 2025-06-28 00:53:59,760 [470880:TidalBackend-6 (_actor_loop)] mopidy.backend
Backend translated URI from tidal:track:3509189:1381853:1381859 to https://lgf.audio.tidal.com/mediatracks/CAEaKwgDEidiZjY4M2FhNjRhMDlkZThiMTNkYThjZGY0ZTc3OTQxM182MS5tcDQ/0.flac?token=1751068238~NzU1MmEwMjMyNjgyYzlhYTQxNTgzOGIxM2E0MDVlZjgzMmVlMjBkMQ==
DEBUG 2025-06-28 00:53:59,761 [470880:Audio-2 (_actor_loop)] mopidy.audio.actor
Flags: 2
DEBUG 2025-06-28 00:53:59,761 [470880:SoftwareMixer-1 (_actor_loop)] mopidy.mixer
Mixer event: volume_changed(volume=100)
DEBUG 2025-06-28 00:53:59,761 [470880:SoftwareMixer-1 (_actor_loop)] mopidy.listener
Sending volume_changed to MixerListener: {'volume': 100}
(Note that I tested it with Tidal in this case, but the issue occurs with any backend).
No more messages are processed after Sending volume_changed to MixerListener and the application hangs until it gets a kill -9.
A quick run of strace confirms that the process is stuck on some file descriptor, most likely in the GStreamer poller stack:
openat(AT_FDCWD, "/usr/lib/python3.13/site-packages/gi/events.py", O_RDONLY|O_CLOEXEC) = 22
...
INFO 2025-06-28 00:57:48,316 [472321:TidalBackend-6 (_actor_loop)] mopidy_tidal.playback
Starting playback of track:1381859, (quality:LOSSLESS, codec:FLAC, 16bit/44100Hz)
) = 1 ([{fd=7, revents=POLLIN}])
write(4, "\1\0\0\0\0\0\0\0", 8) = 8
read(7, "W", 1) = 1
futex(0x55e919c69470, FUTEX_WAIT_PRIVATE, 2, NULL) = 0
futex(0x55e919c69470, FUTEX_WAKE_PRIVATE, 1) = 0
write(4, "\1\0\0\0\0\0\0\0", 8) = 8
ppoll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=7, events=POLLIN}, {fd=13, events=POLLIN}, {fd=14, events=POLLIN}, {fd=15, events=POLLIN}, {fd=22, events=POLLIN}], 7, NULL, NULL, 8) = 1 ([{fd=4, revents=POLLIN}])
read(4, "\2\0\0\0\0\0\0\0", 8) = 8
ppoll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=7, events=POLLIN}, {fd=13, events=POLLIN}, {fd=14, events=POLLIN}, {fd=15, events=POLLIN}, {fd=22, events=POLLIN}], 7, NULL, NULL, 8) = 1 ([{fd=7, revents=POLLIN}])
write(4, "\1\0\0\0\0\0\0\0", 8) = 8
write(4, "\1\0\0\0\0\0\0\0", 8) = 8
ppoll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=7, events=POLLIN}, {fd=13, events=POLLIN}, {fd=14, events=POLLIN}, {fd=15, events=POLLIN}, {fd=22, events=POLLIN}], 7, NULL, NULL, 8) = 2 ([{fd=4, revents=POLLIN}, {fd=7, revents=POLLIN}])
read(4, "\2\0\0\0\0\0\0\0", 8) = 8
write(4, "\1\0\0\0\0\0\0\0", 8) = 8
futex(0x7f01291f4a08, FUTEX_WAIT_PRIVATE, 2, NULL
How to reproduce
- Install mopidy on Arch from pacman
- Load a track
- Play
Expected behaviour
Playback shouldn’t freeze.
Environment
- Operating system: Arch Linux
- Running Mopidy as a service or in the terminal? both
- Your config
- Software versions
- Any specific hardware (e.g. an exotic USB soundcard) N/A
Additional context
N/A
About this issue
- Original URL
- State: open
- Created a year ago
- Comments: 20 (8 by maintainers)
As a workaround, I’ve put togeher a script that generates a Mopidy container using
debian:12and wires it to PulseAudio. This seems to be the most reasonable way to run Mopidy (at least) on Arch for now.