mopidy / mopidy

Mopidy is an extensible music server written in Python
https://mopidy.com
Apache License 2.0
8.05k stars 686 forks source link

Mopidy does not work after suspend to RAM if playing while being suspended #1391

Open languitar opened 8 years ago

languitar commented 8 years ago

After resuming my system from suspend to RAM, mopidy is in a broken state in case it was actually playing music while I initiated the suspend action. I can still connect an MPD client, but any action just results in mopidy stating to freeze completely in that client session, so that the client ends up in a timeout. I event can't restart mopidy in a clean fashion. I have to kill the existing process with SIGKILL.

This only happens if mopidy was playing music while being suspended. If I stop replay before suspending, things work correctly.

This is what I can see in the log for mopidy:

Jan 09 12:07:05 tank mopidy[27227]: Traceback (most recent call last):
Jan 09 12:07:05 tank mopidy[27227]: File "/usr/lib/python2.7/site-packages/mopidy/internal/network.py", line 275, in recv_callback
Jan 09 12:07:05 tank mopidy[27227]: self.actor_ref.tell({'close': True})
Jan 09 12:07:05 tank mopidy[27227]: File "/usr/lib/python2.7/site-packages/pykka/actor.py", line 437, in tell
Jan 09 12:07:05 tank mopidy[27227]: raise _ActorDeadError('%s not found' % self)
Jan 09 12:07:05 tank mopidy[27227]: pykka.exceptions.ActorDeadError: MpdSession (urn:uuid:b02f99e5-fe50-4b32-8e35-21f6996386d1) not found
Jan 09 12:07:35 tank mopidy[27227]: INFO     New MPD connection from [::1]:40056
Jan 09 12:08:05 tank mopidy[27227]: INFO     New MPD connection from [::1]:40058
Jan 09 12:08:21 tank mopidy[27227]: INFO     New MPD connection from [::ffff:192.168.0.36]:36190
Jan 09 12:08:21 tank mopidy[27227]: INFO     New MPD connection from [::ffff:192.168.0.36]:42594
Jan 09 12:08:36 tank mopidy[27227]: INFO     New MPD connection from [::1]:40060
Jan 09 12:08:49 tank mopidy[27227]: INFO     New MPD connection from [::ffff:192.168.0.36]:57963
Jan 09 14:47:08 tank mopidy[27227]: INFO     New MPD connection from [::1]:40064
Jan 09 14:47:17 tank mopidy[27227]: INFO     Logged in to Spotify in online mode
Jan 09 14:47:17 tank mopidy[27227]: INFO     Spotify private session activated
Jan 09 14:47:38 tank mopidy[27227]: INFO     New MPD connection from [::1]:40074
Jan 09 14:48:08 tank mopidy[27227]: INFO     New MPD connection from [::1]:40076
Jan 09 14:48:38 tank mopidy[27227]: INFO     New MPD connection from [::1]:40078
Jan 09 14:49:08 tank mopidy[27227]: INFO     New MPD connection from [::1]:40080
Jan 09 14:49:39 tank mopidy[27227]: INFO     New MPD connection from [::1]:40082
Jan 09 14:49:39 tank mopidy[27227]: Traceback (most recent call last):
Jan 09 14:49:39 tank mopidy[27227]: File "/usr/lib/python2.7/site-packages/mopidy/internal/network.py", line 275, in recv_callback
Jan 09 14:49:39 tank mopidy[27227]: self.actor_ref.tell({'close': True})
Jan 09 14:49:39 tank mopidy[27227]: File "/usr/lib/python2.7/site-packages/pykka/actor.py", line 437, in tell
Jan 09 14:49:39 tank mopidy[27227]: raise _ActorDeadError('%s not found' % self)
Jan 09 14:49:39 tank mopidy[27227]: pykka.exceptions.ActorDeadError: MpdSession (urn:uuid:31c945c5-46f6-4095-924e-3d2f533cd579) not found
Jan 09 14:50:09 tank mopidy[27227]: INFO     New MPD connection from [::1]:40084
Jan 09 14:50:30 tank mopidy[27227]: INFO     New MPD connection from [::ffff:192.168.0.12]:60742
Jan 09 14:50:39 tank mopidy[27227]: INFO     New MPD connection from [::1]:40086
Jan 09 14:50:39 tank mopidy[27227]: Traceback (most recent call last):
Jan 09 14:50:39 tank mopidy[27227]: File "/usr/lib/python2.7/site-packages/mopidy/internal/network.py", line 275, in recv_callback
Jan 09 14:50:39 tank mopidy[27227]: self.actor_ref.tell({'close': True})
Jan 09 14:50:39 tank mopidy[27227]: File "/usr/lib/python2.7/site-packages/pykka/actor.py", line 437, in tell
Jan 09 14:50:39 tank mopidy[27227]: raise _ActorDeadError('%s not found' % self)
Jan 09 14:50:39 tank mopidy[27227]: pykka.exceptions.ActorDeadError: MpdSession (urn:uuid:06bd1346-4b77-4ae9-9324-d038f92f6d87) not found
Jan 09 14:51:09 tank mopidy[27227]: INFO     New MPD connection from [::1]:40088
Jan 09 14:51:39 tank mopidy[27227]: INFO     New MPD connection from [::1]:40090

Suspending took place between 12:xx and 14:xx.

I am running mopidy 1.1.1 on an archlinux system with some web frontends and the spotify plugin.

jodal commented 8 years ago

Can you reproduce this issue without suspending? It seems like you had MpdSession actors being dead when used already at 12:07:05, which is before the suspend.

languitar commented 8 years ago

No, this always happens at suspending. I have never seen this during normal runtime.