#48: High CPU usage on broken playlist
------------------------+---------------------------------------------------
 Reporter:  toots       |       Owner:  admin
     Type:  Bugs        |      Status:  new  
 Priority:  8           |   Milestone:       
Component:  Liquidsoap  |     Version:  0.3.4
 Keywords:              |  
------------------------+---------------------------------------------------
 I reopen this bug since I think it can be considered separatly with the
 "tick" thread proposition.

 With a broken playlist, liquidsoap ends-up looping the same requests,
 consuming may too much cpu.

 My understanding of the loop is that it appears in the recursive scheduler
 task, in sources/request_source.ml, at line 189, function feed_queue.

 More precisly, one the test checks wether the playlist is able to trigger
 another request, which is the case with a non-empty playlist, and then
 returns true wether or not this request is valid. This, on playlist with
 only broken files, triggers the loop.

 A possible fix is to return false when a new request is available but
 failed. I tested it with a broken playlist and a valid one and it has the
 expected behaviour.

 Of course I won't commit for now, but if you want to try, the patch is
 attached..

-- 
Ticket URL: <http://savonet.rastageeks.org/ticket/48>
Savonet <http://savonet.rastageeks.org/>
Let's program our stream !

Répondre à