Bug 2537 - Pause/Unpause stops track if paused for more than a couple of minutes
: Pause/Unpause stops track if paused for more than a couple of minutes
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Audio
: 6.2.1
: PC Debian Linux
: P2 normal (vote)
: ---
Assigned To: Blackketter Dean
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-11-11 17:08 UTC by Martin Fowler
Modified: 2008-09-15 14:37 UTC (History)
2 users (show)

See Also:
Category: ---


Attachments
Slimserver log at time of pause not resuming. (81.82 KB, text/plain)
2005-11-16 11:03 UTC, Martin Fowler
Details
second logfile with less flags (141.29 KB, text/plain)
2005-11-16 11:35 UTC, Martin Fowler
Details
3rd log file (5.54 KB, text/plain)
2005-11-16 11:49 UTC, Martin Fowler
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Fowler 2005-11-11 17:08:49 UTC
I pause a song playing on my slimp3 and leave it paused for a couple of minutes or so. When I unpause (either with the remote's pause or play buttons, or the web interface) the track stops instead. I can then hit play again and plays from the begining of the track. If my slimp3 is synchronized with my other slimp3 the two lose synchronization. Very occasionally I've observed it jump to another track. If I pause/unpause within a few seconds it works fine. This happens reliably (as far as I can tell) with any song.

My set up is Slimserver 6.2.1 running off svn (current revision 5156), version display shows (SlimServer Version: 6.2.1 - trunk - Debian - EN - utf8). Running Debian Sarge on P4 Celeron with 512 MB Memory. top shows usually around 1% processor and 10% memory usage. I have four clients: 2 slimp3's, 1 SB1, 1 SB2. I mostly use the slimp3s this time of year so haven't tested it on the others. All my music is MP3, most ripped with a freeware PC program that I've forgotten about, recent items ripped with iTunes on my Mac. Music was orignally on an older Debian box running Woody and recently rsynced over, there's been some separate issues with character file name encoding that I've been sufferring from (probably not connected but you never know.)
Comment 1 Blackketter Dean 2005-11-13 20:49:38 UTC
Ah, I believe that this has been fixed for the 6.5 release.  If it has not, please reopen this bug.  Thanks.


*** This bug has been marked as a duplicate of 2169 ***
Comment 2 Martin Fowler 2005-11-16 09:04:09 UTC
Tried out slimserver (SlimServer Version: 6.5b1 - trunk - Debian - EN - utf8) from svn rev 5197. This failure still seems to be there (I've seen it each time I've done a long pause.) 
Comment 3 Ben Sandee 2005-11-16 09:55:52 UTC
I just tried to duplicate this by synchronizing my two SliMP3's and could not do so.  I tried variations of pausing from 5 seconds to 15 minutes with no avail -- I could not get the unpause to fail (i.e. it always started up right where I had unpaused).  I'm using the 6.5 trunk too.

Are you using MP3's only?  I wonder if it would have a harder time if it were doing transcoding from FLAC or some other non-mp3 format.




Comment 4 Martin Fowler 2005-11-16 10:16:13 UTC
I'm only using MP3s. The slimp3's don't have to be synchronized for this problem to occur (although if they are they will lose synchroniztion when they are unpaused). So you should be able to get this to happen with just one slimp3.

Let me know if there's any debug flags I can set to help try to find this.
Comment 5 Ben Sandee 2005-11-16 10:21:44 UTC
Wow, I wish I could help you on this one.  I don't run sync'd very often so I was suspecting that it was related to sync.  I've had no problems pausing/resuming my Slimp3's since kdf's patch was added to fix bug 2169.

The debug options that were set to produce logs for that bug were:

d_source, d_slimproto_v, d_stream_v and d_playlist

That would probably be the place to start.

Comment 6 KDF 2005-11-16 10:42:25 UTC
d_source should be enough to start actually.  when you pause, the log will show a message for putting the stream into playmode pause.  What we will need to know is the playmode before going into pause.  This could be play (if early in playback), playmode-play (if later in a track but not the end of the playlist) or playout-stop (if this is nearing end of playback and the buffer is full).  Unpause will go into playmode resume.  The ealier problem that Ben mentions fixed a problem when pausing in playout-play mode.  resume did not know that it had to load a new song becuase that event had passed.  However, the symptoms there was to  stop at the end of the track, not on unpause.  Hopefully I haven't left you too confused to recognise the important messages in d_source.  When you have a log, please attach, as opposed to paste. (avoids the line-wrapping)
Comment 7 Martin Fowler 2005-11-16 11:03:10 UTC
Created attachment 1015 [details]
Slimserver log at time of pause not resuming.

Here's what I did.

At around 13:39:07.3384 I hit the pause button on the web interface. The unit paused. I then waited two minutes (tried one minute earlier and problem didn't show)

At around 13:41:09.1323 I hit the pause button on the web interface again. The unit made a (very) short sound and then stopped. 

You'll notice that at 13:41:09.2438 it looks (to my unpracticed eye) like the unit has received a stop command from the interface - but I didn't hit anything (honest!)

I get this behavior whether I use the web interface or the remotes and with both slimp3s. So I don't think it's something like a dodgy remote.
Comment 8 KDF 2005-11-16 11:16:41 UTC
can we do this one again without d_stream_v(too chatty) and (d_slimproto_v)useless for SliMP3), add in d_command and d_stream

I haven't tried to reproduce this myself, but I wont be near by equipment today.  with d_source and d_stream, I might be able to get enough to concoct at least a theory why this is happening.  I think, from this log, that everything looks to be starting up ok.  I expect that stop 'command' is really due to a buffer emptying...

Comment 9 Martin Fowler 2005-11-16 11:35:54 UTC
Created attachment 1016 [details]
second logfile with less flags

Here it is again with the flags you requested.

I did the same thing I did the last time.

First pause is at 14:30:37.4848

Second pause is at 14:32:40.2354
Comment 10 Martin Fowler 2005-11-16 11:36:56 UTC
Sorry, my bad, I neglected to add d_command to that last logfile. I'll try again.
Comment 11 Martin Fowler 2005-11-16 11:49:16 UTC
Created attachment 1017 [details]
3rd log file

Actually that previous log file was even worse, I forgot to hit the change button so it was all the same stuff as the first one.

Here is the one with flags as requested.

I did the same thing as before, two hits of the pause button on the web interface, 2 minutes apart.

(I forgot to mention this before but when I hit pause the second time the web display does go to show the unit as playing until the next web refresh.)
Comment 12 KDF 2005-11-16 12:05:08 UTC
Thanks.  Looks like this is a caused due to a timeout in the stream functions.  
"Timeout on seq: xxxx" is the key here.  I have no idea how Network::Stream operates, so I can't offer much in the way of a solution.  I guess slimp3 needs to have some soft of active ack going back.  After 30 seconds of no ack, this causes the stream to be stopped.  This is why you are seeing in the log what appears as if you have given a stop command.

Dean...any insight here?
Comment 13 Martin Fowler 2005-12-19 17:43:20 UTC
I realize that this probably doesn't affect many people, but it's a pain for me as effectively I cannot pause or synchronize my music
Comment 14 Martin Fowler 2005-12-23 09:25:19 UTC
I applied the fix for 2169 (rev 5427) and tried it out. It did not fix this bug (thought I'd give it a try since at one point 2169 was marked as a dup of this one). So I'm still unable to pause :-(
Comment 15 Ben Sandee 2005-12-23 09:56:41 UTC
I wish there was some way I could help.  I'm running two SliMP3's myself (along with SB2 and SB3) and just do not see this problem, synchronized or not.  I'm listening to one of my SliMP3's now and had just paused it for 20 minutes and I brought it right back without trouble just now.

BTW, I'm running Debian testing.

Is there anything unique about your network that might explain why it's not working for you?  Maybe a router is dropping the packets that are supposed to keep the connection alive?  I'm grasping at straws I guess.

Comment 16 Blackketter Dean 2005-12-23 10:20:19 UTC
Martin:  What kind of players is this happening on?  (SLIMP3, SB1, SB2?)   Does it happen with the remote and/or the web control?
Comment 17 Ben Sandee 2005-12-23 10:26:33 UTC
(In reply to comment #16)
> Martin:  What kind of players is this happening on?  (SLIMP3, SB1, SB2?)   Does
> it happen with the remote and/or the web control?
> 

Dean, check out comment #7.
Comment 18 Blackketter Dean 2005-12-23 10:35:34 UTC
Subject: Re:  Pause/Unpause stops track if paused for more than a couple of minutes

Ok, so it ONLY happens on SLIMP3, but both from the web and the remote.

Can you try modifying Slim/Networking/Stream.pm on line 23:

my $ACK_TIMEOUT			= 30.0; # in seconds


to something like:

my $ACK_TIMEOUT			= 30000.0; # in seconds

And see if the behavior is better?

I'm not sure why this would be happening, but it will confirm the  
problem.

Comment 19 Martin Fowler 2005-12-23 11:47:09 UTC
Ok I made the change you requested. I paused for four minutes and it unpaused correctly and maintained synchronization.

(I actually never tested it with the squeezeboxes, the way I use them this time of year they don't get to get paused. Let me know if you want me to test them.)
Comment 20 Blackketter Dean 2005-12-23 11:53:38 UTC
Subject: Re:  Pause/Unpause stops track if paused for more than a couple of minutes

Thanks, that's very helpful.  Should make it easier to fix AND you  
have a temporary workaround.

It would be helpful if you could try the Squeezeboxen just to make  
sure that we aren't missing another problem.


Comment 21 Martin Fowler 2005-12-23 12:34:20 UTC
I verified that this problem doesn't show with the squeezeboxen. 

BTW my slimp3 are on firmware version 2.2. I can't remember when I last updated them. Should I update them? (if so remind me how).
Comment 22 Blackketter Dean 2005-12-23 12:47:15 UTC
Subject: Re:  Pause/Unpause stops track if paused for more than a couple of minutes

It couldn't hurt.  The latest firmware is 2.3 and you can use the  
firmware updater script (or the gui tools for Mac & Windows).

Available here: http://www.slimdevices.com/downloads/firmware/2.3/


Comment 23 Martin Fowler 2005-12-28 10:22:53 UTC
Good, if embarrassing news. I updated to firmware 2.3 and the pause bug died. Pity I didn't realize that earlier. Oh well it's all fine now so I'm marking the bug fixed. Thanks for the help.
Comment 24 Chris Owens 2006-06-16 14:41:43 UTC
There are 536 bugs in the database with targets of '---' that were fixed prior to new year 2006.  I am setting them to targets of 6.2.1 to keep them from showing up in my queries.