Le Monday 30 March 2009 08:14:30 Romeo, vous avez écrit :
> Hi, Savonet Team! 

        Hi !

> tonight i got segfault with liquidsoap external.encoder. 
> i used
>
> def out_aacplus(mount, name, s, bitrate) =
>   def process(_) = "aacplusenc - - #{bitrate}" end
>
>   output.icecast.external(mount=mount,header=true,
>      host="localhost",port=8000,password=omegaRelayPasswd,
>      description=name,url="url",restart=true,restart_on_crash=true,
>      shout_raw=true,
>      process=process,s)
> end
>
> to encode stream to aac
>
>
> and finaly got this err in my logs:
>
> 2009/03/30 07:10:02 [playlist:3] New metadata chunk "Matt Rock -- What U
> Feel - Tastemakers K-Swiss Mix" 2009/03/30 07:16:02 [ogg.demuxer:4] Reached
> last page of logical stream b902a 2009/03/30 07:16:02 [ogg.demuxer:4] Found
> a ogg logical stream, serial: 82d8a 2009/03/30 07:16:02 [ogg.demuxer:4]
> Trying ogg/vorbis format
> 2009/03/30 07:16:02 [playlist:3] New metadata chunk "Bodyrox -- Yeah Yeah"
> 2009/03/30 07:17:07 [rvk64a:4] Reading task reached end of data
> 2009/03/30 07:17:07 [stderr:3] [0%]
> [-1%]
> [-2%]
> [-3%]
> [-4%]
> [-5%]
> [... <from -6% down to -2013%> ...]
> [-2014%]
> [-2015%]
> [-2016%]
> [-2017%]
> Segmentation fault
> 2009/03/30 07:17:07 [rvk64a:4] reading task exited: closing process.
> 2009/03/30 07:17:07 [rvk64a:2] Creating external encoder..
> 2009/03/30 07:17:07 [rvk64a:4] reading task exited: closing process.
> 2009/03/30 07:17:07 [threads:1] Thread "root" aborts with exception
> Sys_error("Bad file descriptor")! 2009/03/30 07:17:07 [main:3] Shutdown
> started!
> 2009/03/30 07:17:07 [root:3] Shutting down sources...
> 2009/03/30 07:17:07 [source:4] rvk64a gets down
> 2009/03/30 07:17:07 [stdout:3] init(0):init-stop                         
> @called 2009/03/30 07:17:07 [stderr:3] Thread 4 killed on uncaught
> exception Sys_error("Bad file descriptor") 2009/03/30 07:17:07 [stdout:3]
> init(0):init-stop                          @start 2009/03/30 07:17:07
> [stdout:3] init(0):init-stop                          @start-depends
> 2009/03/30 07:17:07 [stdout:3] init(0):init-stop                         
> @called 2009/03/30 07:17:07 [stdout:3] init(0):init-stop                   
>       @start 2009/03/30 07:17:07 [stdout:3] init(0):init-stop              
>            @start-depends 2009/03/30 07:17:07 [stdout:3] init(0):init-stop 
>                         @stop-depends 2009/03/30 07:17:07 [stdout:3]
> init(0):init-stop                          @start-atom 2009/03/30 07:17:07
> [stderr:3]
> 2009/03/30 07:17:07 [stderr:3]
> ************************************************************* 2009/03/30
> 07:17:07 [stderr:3] * Enhanced aacPlus Encoder
> 2009/03/30 07:17:07 [stderr:3] * Build Oct 29 2008, 23:04:59
> 2009/03/30 07:17:07 [stderr:3] * Matteo Croce <rootki...@yahoo.it>
> 2009/03/30 07:17:07 [stderr:3]
> ************************************************************* 2009/03/30
> 07:17:07 [stderr:3]
> 2009/03/30 07:17:07 [stderr:3] could not open -
>
> do you have any ideas about where this bug may come from?

There seems to be at least two issues here.

First one is that the external encoder does not expect to encode infinite 
streams. Hence, it crashes after some time. In order to avoid that, you can 
set a hourly cron job that kills the aac encoder. It should then be restarted 
immediately, since you enabled the restart_on_crash and restart option.

Second issues is that the restart itself failed and crashed liquidsoap 
apparently. As it seems, there was no file descriptor available. This is 
seems to mean that there was a file descriptor leak such that all possible 
descriptors were used. I don't know where this come from. You can do:
  lsof | grep liquidsoap
to check the opened file descriptors. If my assumption is correct, you should 
seen this list grow when time goes one. Please let us know if this is the 
case..


Romain

------------------------------------------------------------------------------
_______________________________________________
Savonet-users mailing list
Savonet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to