Bug 7702 - Random Mix: powered off player turns on and starts playing by itself
: Random Mix: powered off player turns on and starts playing by itself
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Misc
: 7.0
: PC Ubuntu Linux
: -- normal with 5 votes (vote)
: 7.x
Assigned To: Andy Grundman
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-04-02 18:11 UTC by Peter Watkins
Modified: 2009-09-08 09:14 UTC (History)
16 users (show)

See Also:
Category: ---


Attachments
plugin.randomplay and player.source debug logs during an occurrence (16.66 KB, text/plain)
2008-04-10 23:33 UTC, Oliver Lineham
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Watkins 2008-04-02 18:11:36 UTC
A number of users have reported this on the forums:
http://forums.slimdevices.com/showthread.php?t=45652
http://forums.slimdevices.com/showthread.php?t=44779
http://forums.slimdevices.com/showthread.php?p=269239

Here's what I've seen:

With its IR remote control, I
1) turned on an SB2
2) turned the volume way down (to minimize the annoyance factor if the bug recurred)
3) started a random song mix
4) jumped to the second song
5) turned off the SB2

Sometime several (probably 8-15) hours later, the SB2 powered on by itself and started playing music again.

My SC7 instance is not reachable from the Internet (no port forwarding), and no computers were powered on with web browsers running. My SB Controller was set to a different player. The SB2 did not (ever, that I can recall) have any alarms set. So I cannot conceive of any way that any web, CLI, or other mechanism could have turned the player on.
Comment 1 Ben Klaas 2008-04-02 18:58:55 UTC
clearly a real and serious issue. bumping severity to critical
Comment 2 Mitch Harding 2008-04-02 19:06:17 UTC
I have observed the very same thing with my SB3.  It has happened occasionally, at least since the 6.5.x version of Slimserver.  It has happened at least once since I moved to 7.0 as well.  It has never happened with my SB1 that I can remember.
Comment 3 Mick 2008-04-03 05:15:47 UTC
I first saw this bug back around June-July 2006 timeframe bug didn't correlate it with random mix at the time.

This thread also discusses the behaviour.
http://forums.slimdevices.com/showpost.php?p=244209&postcount=1

My affected system is Windows, and I never power off my SB2/3, but would leave a Random mix paused.
It will unpause itself.
Comment 4 James Richardson 2008-04-03 08:15:45 UTC
QA to reproduce, capture the following LOGS >plugin.randomplay & >player.source

Anyone else having this issue, please capture the same logs then attach them to this bug, thank you
Comment 5 Mitch Harding 2008-04-03 08:47:03 UTC
I will try to get the logs next time this happens.  Only problem is, it happens extremely intermittently -- for me, at least.
Comment 6 Michael Herger 2008-04-03 20:55:37 UTC
Can everybody seeing this provide detailed information about the OS and SC version, please?

I've never seen this myself, using RandomPlay all the time as the alarm clock. My GF would kill me if it started playing a saturday morning...
Comment 7 Adam Slim 2008-04-03 23:49:46 UTC
I have had this happen, but AFAIK not since I got the nightly from about 30 March.  Doesn't mean it's not there though - I don't play random mix all that often :)
Comment 8 Craig Garnett 2008-04-04 05:33:39 UTC
I started this thread http://forums.slimdevices.com/showthread.php?t=43422 on the subject.

I would have been using the latest windows 7.0 beta nightly at the time and it was my TP that unpaused itself.

If I find it happens again then I'll try and get some more info.


Comment 9 Peter Watkins 2008-04-04 21:33:39 UTC
Michael, I'm running SVN 17808 on Ubuntu 7.04 x86_64
Comment 10 James Richardson 2008-04-07 10:09:08 UTC
Is anyone seeing this issue using Compact Fluorescent Bulbs?  This maybe a problem with the IR seeing random signals.
Comment 11 Ross Levine 2008-04-07 11:02:16 UTC
There is more to this than just time. An over weekend test did not reproduce the issue with 3 players. 
Comment 12 Mitch Harding 2008-04-07 11:59:36 UTC
This has happened a couple of times with my SBR, which would rule out IR, right?
Comment 13 Oliver Lineham 2008-04-10 23:33:14 UTC
Created attachment 3222 [details]
plugin.randomplay and player.source debug logs during an occurrence

This happened this morning while I had the requested debug logging turned on. I have attached it as server.log.1.

What you can see is:
00:16:41 - I paused the player (with remote) during random song mix.
06:34:02 - A Player::Source::errorOpening was logged
06:34:02 - New play mode: play
06:35:00 - I paused the player again and went back to sleep :)

Specs as below.

SqueezeCenter Version: 7.0.1 - 18355 @ Fri Apr 4 08:08:41 PDT 2008 - Debian - EN - iso-8859-1
Perl Version: 5.8.8 i486-linux-gnu-thread-multi
MySQL Version: 5.0.32-Debian_7etch5
Platform Architecture: i686-linux

Model: Squeezebox v3
Firmware: 86

This is an SB3 on wireless with reasonably bad signal occasionally. I don't think I've ever had the problem on another, wired, SB3.
Comment 14 Craig Garnett 2008-04-11 08:32:35 UTC
I had another occurance of this yesterday,

A wired SB1 paused while playing Random Albums was playing when I got home, unfortunately I didn't have logging enabled at the time. One thing that I did notice was that the sun was shining on the player enough that I couldn't read the display. This is with the latest 7.01 windows build and my SBC was not pointing at this player.

Craig
Comment 15 Ross Levine 2008-04-11 17:51:21 UTC
At 6:34 the player is unpausing, Alan any ideas? (from Dean)
Comment 16 Blackketter Dean 2008-04-11 20:31:25 UTC
I'm wondering what could cause that unpause...  Power loss? Connection loss? 
Comment 17 stevehof 2008-05-05 13:18:39 UTC
From my forum thread post at http://forums.slimdevices.com/showthread.php?t=47280:

 - Once the SB3 is in this state, if I hit the power off again on the remote, the same thing happens: it's back to life in under a minute. The only way I have figured out to get it to stay off in this situation is to pause the music before powering off. Then everything behaves normally.

- I'm running Squeezecenter 7.0.1 on a Buffalo Linkstation Pro (with FreeLink Linux).

- I have three SB3s, and I have seen this behavior on two of them, so it's not the specific SB3 unit. (My third SB3 doesn't get used as much as the other two, so perhaps I just haven't used it enough lately to encounter the problem.)

- The times this problem has occurred have all been when playing Random Mix. However, I play Random Mix much of the time, and most of those times this problem does not occur.

- I would estimate the problem happens about one out of five times I turn off an SB3, but it's not consistent. I can't make it happen just by turning an SB3 on and off five or even ten times in a row.

- A significant symptom that the SB3 will turn itself back on is when I power it off, its screen goes completely blank rather than showing the date and time screensaver that's normally displayed when the device is "off" (actually a standby state). If I see a blank screen, I know it's coming back to life on its own.

- One of the times the problem occurred, I had the Squeezecenter window open in my browser, and I could see that even though I had turned off the SB3, Squeezecenter showed that the music was still playing. When the SB3 restarted itself about 30 seconds later, it was playing at the point where Squeezecenter had already advanced. In other words, Squeezecenter never paused or stopped the music during the period when the SB3 was off. On that occasion, I checked the Squeezecenter log immediately afterward, and there did not appear to be any entries or errors related to this happening.
Comment 18 Alan Young 2008-05-06 00:28:57 UTC
When you get the blank screen, do you get any kind of reboot sequence on the player when it comes back on, or does it just start playing?
Comment 19 stevehof 2008-05-06 02:56:18 UTC
(In reply to comment #18)
> When you get the blank screen, do you get any kind of reboot sequence on the
> player when it comes back on, or does it just start playing?

It just starts playing, without any reboot sequence.

Comment 20 Blackketter Dean 2008-05-06 07:45:03 UTC
Could this be related to the bug where synced players restart if you power off on one?

In that case the screen is also blank and music starts playing.
Comment 21 stevehof 2008-05-06 08:21:51 UTC
(In reply to comment #20)
> Could this be related to the bug where synced players restart if you power off
> on one?
> In that case the screen is also blank and music starts playing.

The first couple of times this problem happened to me, my players were synced. However, the problem still occurs occasionally even after I un-synced them.
Comment 22 Alan Young 2008-05-06 12:57:58 UTC
(In reply to comment #17)

In the synced case, the symptoms you describe are probably related to another problem that I just fixed. But you say that we also get it occasionally when not synced and I think that this must be a different problem.
Comment 23 Alan Young 2008-05-06 13:37:56 UTC
I think that I may have found a clue here. In the log that was already attached we have the following section:

[08-04-11 00:16:41.8826] Slim::Player::Source::playmode (556) 00:04:20:12:3a:6b: Current playmode: pause
[08-04-11 06:34:02.2121] Slim::Player::Source::errorOpening (1639) Error: While opening current track, so mark it as already played!
[08-04-11 06:34:02.2128] Slim::Player::Source::errorOpening (1639) Backtrace:

   frame 0: Slim::Utils::Log::logBacktrace (/usr/share/perl5/Slim/Player/Source.pm line 1639)
   frame 1: Slim::Player::Source::errorOpening (/usr/share/perl5/Slim/Player/Squeezebox2.pm line 605)
   frame 2: Slim::Player::Squeezebox2::failedDirectStream (/usr/share/perl5/Slim/Networking/Slimproto.pm line 561)
   frame 3: Slim::Networking::Slimproto::_disco_handler (/usr/share/perl5/Slim/Networking/Slimproto.pm line 381)
   frame 4: Slim::Networking::Slimproto::client_readable (/usr/share/perl5/Slim/Networking/Select.pm line 243)
   frame 5: (eval) (/usr/share/perl5/Slim/Networking/Select.pm line 243)
   frame 6: Slim::Networking::Select::select (/usr/sbin/squeezecenter-server line 510)
   frame 7: main::idle (/usr/sbin/squeezecenter-server line 460)
   frame 8: main::main (/usr/sbin/squeezecenter-server line 1017)

[08-04-11 06:34:02.2149] Slim::Player::Source::playmode (298) 00:04:20:12:3a:6b: Switching to mode stop from pause
[08-04-11 06:34:02.2158] Slim::Player::Source::playmode (401) 00:04:20:12:3a:6b New play mode: stop
[08-04-11 06:34:02.2161] Slim::Player::Source::playmode (444) 00:04:20:12:3a:6b: Stopping and clearing out old chunks
[08-04-11 06:34:02.2169] Slim::Player::Source::resetSong (1625) Resetting song buffer.
[08-04-11 06:34:02.2172] Slim::Player::Source::resetSongQueue (1454) Resetting song queue
[08-04-11 06:34:02.2175] Slim::Player::Source::resetSongQueue (1464) Song queue is now 10
[08-04-11 06:34:02.2180] Slim::Player::Source::playmode (556) 00:04:20:12:3a:6b: Current playmode: stop
[08-04-11 06:34:02.2186] Slim::Plugin::RandomPlay::Plugin::commandCallback (1014) Received command playlist cant_open
[08-04-11 06:34:02.2189] Slim::Plugin::RandomPlay::Plugin::commandCallback (1015) While in mode: track, from Main squeeze
[08-04-11 06:34:02.2191] Slim::Plugin::RandomPlay::Plugin::commandCallback (1021) Warning: Last track failed, restarting.

The point is that the randomPlay plugin gets a 'playlist cant_open' and this causes it to restart play. Perhaps the randomPlay plugin should check that the player is on before deciding to restart, although I'm not sure why it should have to expect to handle this case.

But why does it get the 'playlist cant_open'? Because SC gets a DCSO from the player, indicating that the streaming connection has been broken. Why?

Whatever the cause, randomPlay will restart play in circumstances which otherwise would not cause play to restart. If only part of a track has been streamed, the player will be in SC state 'play', in which case play will not restart on DSCO. But if all the track has been streamed, then the state will be 'playout-play', in which case failedDirectStream will skip to the next track. This is inconsistent. The point is that failedDirectStream is not only called for remote streams: it should probably skip-ahead if in mode 'play' or 'playout-play'.

If this theory is correct, then these phantom-restarts can occur occur if using randomPlay (I think) because it no longer know that the player was paused (which would not have caused failedDirectStream to skip-ahead).

But the real question is why do we get the DSCO?
Comment 24 Blackketter Dean 2008-05-06 13:47:42 UTC
A quick look in the IP3K source shows that the DSCO command is sent on a callback when the TCP socket is closed.  Is it possible that the server or client doesn't explicitly close the connection at the end of the song?  Or, if paused, the socket eventually times out and is closed for some reason.  

In any case, if we are stopped or paused, we should ignore the DSCO message, no?

Comment 25 Mick 2008-05-06 14:16:37 UTC
The strange thing about my experience (and others) of this problem has been that it happen right in the middle of the night.

~3am - 4am GMT which is 7pm to 8pm Pacific. The only time I was actually up at the time the server unpaused itself was close to midnight.

That rules out Microwave interference from my neighbours.

I would have also perhaps suspected something like perhaps a DHCP lease expiring except I use static IP's.

Could there be anything occasiionally happening on SqueezeNetwork around this time that might be affecting servers?
Comment 26 Oliver Lineham 2008-05-06 15:13:39 UTC
(In reply to comment #25)
> The strange thing about my experience (and others) of this problem has been
> that it happen right in the middle of the night.

This is my experience too, it is almost always midnight to 7am (GMT+12).

> I would have also perhaps suspected something like perhaps a DHCP lease
> expiring except I use static IP's.

I forgot to mention that when I started having this problem back in 6.5.x, I switched to using static IPs.  Doing so *seemed* to reduce the frequency of the problem.
Comment 27 Alan Young 2008-05-06 22:32:55 UTC
(In reply to comment #24)
> A quick look in the IP3K source shows that the DSCO command is sent on a
> callback when the TCP socket is closed.  Is it possible that the server or
> client doesn't explicitly close the connection at the end of the song?  Or, if
> paused, the socket eventually times out and is closed for some reason.  

The server does close the socket at the end. If we have not got to the end then I cannot see a good reason why the TCP connection would time out.

With modern (wired) ethernet hardware, there is the somewhat annoying tendency of end systems (for example, the player) to treat link-down events (pulling out the cable or rebooting a switch) as fatal to all current TCP connections. Possibly the same applies to wireless links. This seems to go against the philosophy of TCP and connection-less network layers. I have no idea if this could be relevant. Do some routers/bridges/switches/wireless-APs restart themselves regularly?

> In any case, if we are stopped or paused, we should ignore the DSCO message,
> no?

Not exactly ignore, but at least not restart the song or skip to the next. This (desired) behaviour is what SC does: unless playing (actually only playout-play), there is no restart. But the handler in randomPlay overrides this and restarts anyway.

Comment 28 smm 2008-06-03 15:01:53 UTC
(In reply to comment #0)
> A number of users have reported this on the forums:
> http://forums.slimdevices.com/showthread.php?t=45652
> http://forums.slimdevices.com/showthread.php?t=44779
> http://forums.slimdevices.com/showthread.php?p=269239
> 
> Here's what I've seen:

Please see yet another forum thread about this

http://forums.slimdevices.com/showthread.php?p=308323

I only use SqueezeNetwork, never SqueezeCenter, and can confirm that this behavior of the Receiver turning itself on (or at least the LED coming back on) happens frequently. In fact, I have also experienced times that music starts playing spontaneously. This has happened when I have paused an MP3Tunes playlist, a Pandora station, or a Slacker station, BEFORE turning off the Receiver with the Controller, and then turning off the Controller. I don't think the spontaneous playback has ever occured after I have "cleared" the currently playing selection, rather than just pausing it. Not sure if that helps narrow down the bug.
Comment 29 James Richardson 2008-06-04 07:11:07 UTC
resetting to unassigned for bug review
Comment 30 Michael Herger 2008-06-10 08:06:35 UTC
need to remove target if we want to get it reviewed
Comment 31 Alan Young 2008-06-10 09:35:15 UTC
A simple 'fix' would be remove random-play's restart-on-failure functionality. It would be easy to add a test for -is-powered-on but much harder to deal with the paused case (because, in this case, by the time that random-play sees the notification, play will have been stopped).
Comment 32 Chris Owens 2008-06-13 09:28:03 UTC
Andy says that behavior was added to fix bug 4280 and bug 3696 that if there
was a bad track in the playlist the playing would just stop.

It seems like the thing to do is back out those changes and find better fixes
for those bugs.
Comment 33 Andy Grundman 2008-06-13 11:09:15 UTC
This should be fixed by reverting the fix for bug 3696 in change 20743.  Please try and reproduce.
Comment 34 James Richardson 2008-07-15 14:56:33 UTC
Unable to reproduce with 7.1-31761
Comment 35 Chris Owens 2008-07-30 15:27:09 UTC
This bug has now been fixed in the 7.1 release version of SqueezeCenter!  Please download the new version from http://www.slimdevices.com if you haven't already.  

If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.
Comment 36 James Richardson 2008-12-15 12:32:21 UTC
This bug has been fixed in the 7.3.0 release version of SqueezeCenter!

Please download the new version from http://www.slimdevices.com/su_downloads.html if you haven't already.  

If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.
Comment 37 Daniel Barrett 2009-02-11 04:49:39 UTC
This happened to me yesterday, not in Random Mix, but for Internet Radio (Slacker or Pandora, can't remember which).  The SB3 turned on in the middle of the night.  No alarms were set (I checked, and we've never used the alarm feature anyway).

Is this likely to be the same bug, or different?

SqueezeCenter 7.2.1 on Mac OS 10.4.11.
Comment 38 James Richardson 2009-02-11 08:54:58 UTC
(In reply to comment #37)
> This happened to me yesterday, not in Random Mix, but for Internet Radio
> (Slacker or Pandora, can't remember which).  
> 
> SqueezeCenter 7.2.1 on Mac OS 10.4.11.
> 

Different bug, also, please update to 7.3.2 (latest release) and retest.  There were fix's in the SB3 firmware to take care of this issue.
Comment 39 Chris Owens 2009-07-31 10:19:07 UTC
Reduce number of active targets for SC