#50: Liquidsoap + Jack
-------------------------+--------------------------------------------------
  Reporter:  balbinus    |       Owner:  admin 
      Type:  Bugs        |      Status:  closed
  Priority:  2           |   Milestone:        
 Component:  Liquidsoap  |     Version:        
Resolution:  fixed       |    Keywords:        
-------------------------+--------------------------------------------------
Comment (by balbinus):

 I'm trying your patch... Everything seems to work fine until there's a
 connection drop with the Icecast server. (Same thing as usual, 3:42 am,
 ADSL reconnection at my parents').

 At 3:42 (+/- 1 minute), Liq notices it has lost its connection to Icecast.
 As I've asked it to try to reconnect, it successfully re-opens a
 connection. But it's already to late for Jack to catch up with this
 lateness, and the Jack client enters a seemingly endless drop/reconnect
 loop: (be careful, log is in anti-chronological order)

 {{{
 2008/02/03 03:43:12 [jack:3] Reconnecting to Jack...
 2008/02/03 03:43:12 [main-in:3] Dropped too many samples (>= 48000),
 reseting...
 2008/02/03 03:43:12 [main-in:3] Dropping 517120 samples from the
 ringbuffer.
 2008/02/03 03:43:00 [update_metadata:3] Done
 2008/02/03 03:42:44 [/xxxx:3] Setting up an MP3 encoder...
 2008/02/03 03:42:44 [/xxxx:3] Connection setup was successful.
 2008/02/03 03:42:44 [/xxxx:3] Connecting mount /xxxx for [EMAIL PROTECTED]
 2008/02/03 03:42:40 [jack:3] Reconnecting to Jack...
 2008/02/03 03:42:40 [main-in:3] Dropped too many samples (>= 48000),
 reseting...
 2008/02/03 03:42:40 [main-in:3] Dropping 520191 samples from the
 ringbuffer.
 2008/02/03 03:42:40 [/xxxx:2] Shout socket error: timeout, network
 failure, server shutdown? Restarting the output in  3 sec
 2008/02/03 03:42:29 [update_metadata:3] Done
 2008/02/03 03:41:59 [update_metadata:3] Done
 2008/02/03 03:41:29 [update_metadata:3] Done
 2008/02/03 03:40:59 [update_metadata:3] Done
 }}}

 But... (notice how I create some suspense...) after a few minutes of
 dropping/resetting, Liquidsoap simply crashes with a beautiful segfault. I
 can't tell you much more about this segfault since I can't launch
 Liquidsoap with a gdb attached to it (see #87).

 Now, there are a few things that seem totally wrong to me:

  - Why does an unreachable ''output'' cause a full failure, up to the
 ''inputs''?
  - Why does Jack need to go on dropping/resetting even when output comes
 back? Did I forget to clear the ringbuffers, or something like that?
  - And finally why the hell does it segfault? :P

 The answers to these questions in the 4th season of Lost, which has
 already begun airing on ABC last Thursday.

 A bit more seriously, I'd like to have your (toots + maybe sam) point of
 view on question #2... You both re-read the code, and especially the
 "reset on over-dropping" part. Its intended behaviour was to restart the
 Jack client when things went wrong, ie say "OK, too much shit, let's
 restart everything, get pristine buffers and stuff". It should allow us to
 more resilient to desyncs, with the drawback of loosing maybe up to one
 second of audio sometimes (rarely, I hope ;). It looks like Ices does the
 same when things go wrong, and, FFS, Ices copes very well with ADSL
 disconnections and Jack fucking up! KarlH isn't an alien with supranatural
 powers, we'll manage to get something working just as well as his Ices ;)

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

Répondre à