[ 
http://dev.sourcefabric.org/browse/LS-489?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17828#action_17828
 ] 

David Baelde commented on LS-489:
---------------------------------

I finally reproduced with enough information to understand the bug. In itself 
it's very simple: currently in Request_source.queued, it is possible to expire 
a request twice, which removes its duration twice from the queue length. (By 
the way, we could have observed the bug by seeing the negative lengths in log 
level 4 of queued sources: they appear quickly.)

It's interesting to see what happens after that. You end up with 1 expired 
request and a duration of -X (X being the default duration: 1323000 in ticks), 
so 2 requests need to be prepared to get a queue of length X (at which point 
the expired request is dropped). If we double-expired these two, we have 2 
expired requests and a length of -3X. And so on and so forth. After several 
iterations I see my queue length dropping to -337365000, then it doubles again 
to -676053000 -- between those peaks, it gradually comes back to 0. If we 
double again we get... 795377648. In my test I got a queue length of 794054648, 
but the main point is that now we have a high length, and the requests in the 
queue are all expired. So they are played one by one but the length is not 
decreased. Eventually, we have 0 requests and a high length, so no prefetching 
is done: the playlist is stuck.

The fix is very easy, but I'm waiting a little bit to close this issue, for 
various reasons:
 * The bug would not have occurred without double-loading of playlists, which I 
observe in the logs even after the recent fix in that area.
 * The freeze would not have happened if queue_length was in seconds instead of 
ticks. It would be a good idea to change, but for that reason it's tempting to 
keep it.
 * There could be more info in the logs, such as the number of requests 
(expired or not) in the queue, and some sanity checks (eg. length>=0).

> Playlist (queued request source) seems stuck
> --------------------------------------------
>
>                 Key: LS-489
>                 URL: http://dev.sourcefabric.org/browse/LS-489
>             Project: Liquidsoap
>          Issue Type: Bug
>            Reporter: David Baelde
>            Assignee: David Baelde
>            Priority: Blocker
>             Fix For: 1.0 beta
>
>
> On my private radio station (friends.ogg) I have a playlist in a fallback 
> with a failsafe song, and from time to time the radio just loops on the 
> default song, sometimes for days. The playlist reloads fine (automatically or 
> manually) so there doesn't seem to be a deadlock, but somehow it remains 
> unavailable for streaming.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://dev.sourcefabric.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
Savonet-devl mailing list
Savonet-devl@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/savonet-devl

Répondre à