Bugzilla – Bug 3581
Emply playlist triggers infinite loop in code.
Last modified: 2008-09-15 14:38:25 UTC
SlimServer Version: 6.3.0 - 8002 - Windows XP - EN - cp1252 Pick a real SB or Softsqueeze from the web UI and clear the playlist. With an EMPTY playlist, click play on either physical player or the WEBUI button. Slim.exe starts to rapidly consume memory and uses 50% CPU. I tried slimproto and protocol but I'm not sure exactly what is going on. Seems like an infinite loop in the code gets trigered. The UI stops responding leaving you with no option but to kill the process.
Yep. This is the real cause of the bug 3507 I reported previously, but with better repro instructions. :) Thanks, Mick. For some reason, though, no log info seems to get written, at least under XP.
d_source, d_source_v, d_command show anything?
Ok, I ran with the debug options KDF recommended. Some of the log shows me clearing out the existing playlist, then pressing play. 2006-06-19 17:26:32.4947 Executing command 00:04:20:05:ad:a1: playlist (addtracks) (listref) (ARRAY(0x30eb460)) () () () () 2006-06-19 17:26:32.4955 Adding song index 15 to song queue 2006-06-19 17:26:32.4957 Clearing out song queue first 2006-06-19 17:26:32.4958 Song queue is now 15 2006-06-19 17:26:32.4962 Returning array: playlist (addtracks) (listref) (ARRAY(0x30eb460)) () () () () 2006-06-19 17:26:32.5207 Executing command 00:04:20:06:70:e4: playlist (addtracks) (listref) (ARRAY(0x30ede00)) () () () () 2006-06-19 17:26:32.5215 Adding song index 0 to song queue 2006-06-19 17:26:32.5216 Clearing out song queue first 2006-06-19 17:26:32.5217 Song queue is now 0 2006-06-19 17:26:32.5220 Returning array: playlist (addtracks) (listref) (ARRAY(0x30ede00)) () () () () 2006-06-19 17:26:52.2914 Setting maxBitRate for Kitchen to: 0 2006-06-19 17:26:52.2916 Setting maxBitRate for Kitchen to: 0 2006-06-19 17:27:04.6093 Executing command 00:04:20:05:ad:a1: playlist (clear) () () () () () () 2006-06-19 17:27:04.6141 Adding song index 0 to song queue 2006-06-19 17:27:04.6142 Clearing out song queue first 2006-06-19 17:27:04.6145 Song queue is now 0 2006-06-19 17:27:04.6149 00:04:20:05:ad:a1: Switching to mode stop from stop 2006-06-19 17:27:04.6153 Backtrace: frame 0: Slim::Player::Source::playmode (/PerlApp/Slim/Control/Command.pm line 939) frame 1: Slim::Control::Command::execute (/PerlApp/Slim/Web/HTTP.pm line 693) frame 2: Slim::Web::HTTP::processURL (/PerlApp/Slim/Web/HTTP.pm line 551) frame 3: Slim::Web::HTTP::processHTTP (/PerlApp/Slim/Networking/Select.pm line 141) frame 4: Slim::Networking::Select::select (slimserver.pl line 701) frame 5: main::idle (slimserver.pl line 637) frame 6: main::main (slimserver.pl line 59) frame 7: PerlSvc::Interactive (perlsvc.pl line 1486) frame 8: PerlSvc::_interactive (slimserver.pl line 0) frame 9: (eval) (slimserver.pl line 0) 2006-06-19 17:27:04.6156 Already in playmode stop : ignoring mode change 2006-06-19 17:27:04.8987 Returning array: playlist (clear) () () () () () () 2006-06-19 17:27:10.7968 Executing command 00:04:20:05:ad:a1: play () () () () () () () 2006-06-19 17:27:10.7970 00:04:20:05:ad:a1: Switching to mode play from stop 2006-06-19 17:27:10.7972 Backtrace: frame 0: Slim::Player::Source::playmode (/PerlApp/Slim/Control/Command.pm line 267) frame 1: Slim::Control::Command::execute (/PerlApp/Slim/Web/HTTP.pm line 693) frame 2: Slim::Web::HTTP::processURL (/PerlApp/Slim/Web/HTTP.pm line 551) frame 3: Slim::Web::HTTP::processHTTP (/PerlApp/Slim/Networking/Select.pm line 141) frame 4: Slim::Networking::Select::select (slimserver.pl line 701) frame 5: main::idle (slimserver.pl line 637) frame 6: main::main (slimserver.pl line 59) frame 7: PerlSvc::Interactive (perlsvc.pl line 1486) frame 8: PerlSvc::_interactive (slimserver.pl line 0) frame 9: (eval) (slimserver.pl line 0) 2006-06-19 17:27:10.8104 ERROR: Couldn't open song. 2006-06-19 17:27:10.8107 Got a track starting event 2006-06-19 17:27:10.8108 Song 0 has now started playing 2006-06-19 17:27:10.8116 Song queue is now 0 2006-06-19 17:27:10.8119 opening next song open: 1 error: ... 2006-06-19 17:27:10.8125 opening next song (old format: , new: ) current playmode: stop 2006-06-19 17:27:10.8127 Adding song index 0 to song queue 2006-06-19 17:27:10.8129 Song queue is now 0,0 2006-06-19 17:27:10.8135 opening next song (old format: , new: ) current playmode: stop 2006-06-19 17:27:10.8138 Adding song index 0 to song queue 2006-06-19 17:27:10.8140 Song queue is now 0,0,0 2006-06-19 17:27:10.8147 opening next song (old format: , new: ) current playmode: stop 2006-06-19 17:27:10.8149 Adding song index 0 to song queue 2006-06-19 17:27:10.8152 Song queue is now 0,0,0,0 2006-06-19 17:27:10.8159 opening next song (old format: , new: ) current playmode: stop 2006-06-19 17:27:10.8164 Adding song index 0 to song queue 2006-06-19 17:27:10.8168 Song queue is now 0,0,0,0,0 2006-06-19 17:27:10.8178 opening next song (old format: , new: ) current playmode: stop 2006-06-19 17:27:10.8182 Adding song index 0 to song queue 2006-06-19 17:27:10.8186 Song queue is now 0,0,0,0,0,0 2006-06-19 17:27:10.8191 opening next song (old format: , new: ) current playmode: stop 2006-06-19 17:27:10.8193 Adding song index 0 to song queue 2006-06-19 17:27:10.8195 Song queue is now 0,0,0,0,0,0,0 2006-06-19 17:27:10.8201 opening next song (old format: , new: ) current playmode: stop 2006-06-19 17:27:10.8205 Adding song index 0 to song queue 2006-06-19 17:27:10.8210 Song queue is now 0,0,0,0,0,0,0,0 2006-06-19 17:27:10.8220 opening next song (old format: , new: ) current playmode: stop 2006-06-19 17:27:10.8223 Adding song index 0 to song queue 2006-06-19 17:27:10.8224 Song queue is now 0,0,0,0,0,0,0,0,0 2006-06-19 17:27:10.8229 opening next song (old format: , new: ) current playmode: stop 2006-06-19 17:27:10.8230 Adding song index 0 to song queue 2006-06-19 17:27:10.8232 Song queue is now 0,0,0,0,0,0,0,0,0,0 2006-06-19 17:27:10.8237 opening next song (old format: , new: ) current playmode: stop 2006-06-19 17:27:10.8239 Adding song index 0 to song queue 2006-06-19 17:27:10.8241 Song queue is now 0,0,0,0,0,0,0,0,0,0,0 2006-06-19 17:27:10.8246 opening next song (old format: , new: ) current playmode: stop 2006-06-19 17:27:10.8247 Adding song index 0 to song queue 2006-06-19 17:27:10.8249 Song queue is now 0,0,0,0,0,0,0,0,0,0,0,0 2006-06-19 17:27:10.8254 opening next song (old format: , new: ) current playmode: stop 2006-06-19 17:27:10.8255 Adding song index 0 to song queue 2006-06-19 17:27:10.8257 Song queue is now 0,0,0,0,0,0,0,0,0,0,0,0,0 2006-06-19 17:27:10.8262 opening next song (old format: , new: ) current playmode: stop 2006-06-19 17:27:10.8264 Adding song index 0 to song queue 2006-06-19 17:27:10.8266 Song queue is now 0,0,0,0,0,0,0,0,0,0,0,0,0,0 2006-06-19 17:27:10.8271 opening next song (old format: , new: ) current playmode: stop 2006-06-19 17:27:10.8273 Adding song index 0 to song queue 2006-06-19 17:27:10.8275 Song queue is now 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 2006-06-19 17:27:10.8279 opening next song (old format: , new: ) current playmode: stop 2006-06-19 17:27:10.8281 Adding song index 0 to song queue 2006-06-19 17:27:10.8283 Song queue is now 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 2006-06-19 17:27:10.8288 opening next song (old format: , new: ) current playmode: stop 2006-06-19 17:27:10.8289 Adding song index 0 to song queue 2006-06-19 17:27:10.8292 Song queue is now 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 2006-06-19 17:27:10.8296 opening next song (old format: , new: ) current playmode: stop etc... The number of zero's in the song queue just keeps increasing.
I'm wondering if this might not have something to do with change 7756. Not that there is anything awful, but this doesn't seem to be happening with 6.5, and change 7756 was due to Rhapsody stuff which is only in 6.3 for now. Plus, there is a lot of code in that change in the area that is affecting this bug. The looping seems to be tied to Source::streamingSongIndex(). andy, any thoughts here? I don't want to mess with it too much myself, because I'm really not fully up on the exact operation of a lot of the streaming/queueing code. It seems offhand to me that stramingSongIndex shouldn't be adding anything to the queue if the playback is in playmode "stop"
Ah good, I didn't see a bug for this issue. This happened to me the other day. I just checked in a fix.
My patch fixes the specific issue described in this bug, so I'm marking this one fixed.
This bug fix is now part of a released version, and so has been marked closed. If you are still experiencing this problem, please reopen the bug.