[
http://dev.sourcefabric.org/browse/LS-503?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15690#action_15690
]
Romain Beauxis commented on LS-503:
-----------------------------------
Ok, I have spoted one case and just pushed a branch with a possible fix.
The issue can be reproduced with the following code:
output.icecast(id="foo",%vorbis,mount="foo",input.http(id="bar","http://foo/bar"),fallible=true)
provided you do _not_ have an icecast server running, you get:
2011/04/17 21:06:18 [frame:3] Using 44100Hz audio, 25Hz video, 44100Hz master.
2011/04/17 21:06:18 [frame:3] Frame size must be a multiple of 1764 ticks =
1764 audio samples = 1 video samples.
2011/04/17 21:06:18 [frame:3] Targetting 'frame.duration': 0,04s = 1764 audio
samples = 1764 ticks.
2011/04/17 21:06:18 [frame:3] Frames last 0,04s = 1764 audio samples = 1 video
samples = 1764 ticks.
2011/04/17 21:06:18 [video.converter:4] Using preferred video converter: gavl.
2011/04/17 21:06:18 [audio.converter:4] Couldn't find preferred samplerate
converter: libsamplerate.
2011/04/17 21:06:18 [audio.converter:4] Using native samplerate converter
2011/04/17 21:06:18 [threads:3] Created thread "generic queue #1".
2011/04/17 21:06:18 [clock:4] Currently 1 clocks allocated.
2011/04/17 21:06:18 [clock.wallclock_main:4] Starting 1 sources...
2011/04/17 21:06:18 [source:4] Source foo gets up.
2011/04/17 21:06:18 [source:4] Source bar gets up.
2011/04/17 21:06:18 [threads:3] Created thread "http polling" (1 total).
2011/04/17 21:06:18 [bar:4] Activations changed: static=[foo:foo], dynamic=[].
2011/04/17 21:06:18 [foo:4] Activations changed: static=[foo], dynamic=[].
2011/04/17 21:06:18 [foo:4] Enabling caching mode: active source.
2011/04/17 21:06:18 [foo:3] Connecting mount foo for source@localhost...
2011/04/17 21:06:18 [bar:4] Connecting to <http://foo:80/bar>...
2011/04/17 21:06:18 [foo:2] Connection failed: could not connect to host:
Connexion refusée in connect()!
2011/04/17 21:06:18 [clock.wallclock_main:2] Error when starting output foo:
Tutils.Exit!
2011/04/17 21:06:18 [foo:4] Activations changed: static=[], dynamic=[].
2011/04/17 21:06:18 [source:4] Source foo gets down.
2011/04/17 21:06:18 [bar:4] Activations changed: static=[], dynamic=[].
2011/04/17 21:06:18 [source:4] Source bar gets down.
init: exception encountered during main phase:
Tutils.Exit
2011/04/17 21:06:18 [bar:4] Connection failed: Http: error while communicating
to socket!
2011/04/17 21:06:18 [threads:3] Thread "http polling" terminated (0 remaining).
exception: Tutils.Exit
Raised at file "outputs/icecast2.ml", line 460, characters 38-49
Called from file "tools/start_stop.ml", line 102, characters 6-16
Called from file "clock.ml", line 176, characters 19-37
Re-raised at file "clock.ml", line 188, characters 29-30
Called from file "list.ml", line 57, characters 20-23
Called from file "clock.ml", line 172, characters 6-767
Called from file "clock.ml", line 326, characters 8-12
Called from file "list.ml", line 69, characters 12-15
Called from file "clock.ml", line 473, characters 6-40
Called from file "main.ml", line 513, characters 4-18
Called from file "dtools.ml", line 531, characters 16-20
2011/04/17 21:06:19 [main:3] Shutdown started!
2011/04/17 21:06:19 [main:3] Waiting for threads to terminate...
2011/04/17 21:06:19 [main:3] Cleaning downloaded files...
2011/04/17 21:06:19 >>> LOG END
Without the commited branch, the exception is not catched and the source is not
stopped, which in turns does not stop the http_polling thread, which leads to a
livelock while waiting for thread to finish..
> Liquidsoap locks-up on uncaught exception
> -----------------------------------------
>
> Key: LS-503
> URL: http://dev.sourcefabric.org/browse/LS-503
> Project: Liquidsoap
> Issue Type: Bug
> Components: Liquidsoap
> Affects Versions: 1.0 beta
> Environment: Ubuntu Linux x64
> Reporter: Romeo
> Assignee: Romain Beauxis
> Priority: Blocker
>
> When mistyping the encoding in set("tag.encodings",["UTF-8","CP-1251"]) the
> liquidsoap will lock-up when trying to fetch the stream. It doesn't respond
> neither to stop daemon, nor to the kill signal. only -KILL will help to end
> this. log and script are attached.
> Stream script is:
> ################### [Definitions] ###################
> streamTitle = "RadioVkontakte.ru | ICQ:6979990"
> streamDescr = "RadioVkontakte.ru"
> streamGenre = "Electronic"
> streamUrl = ""
> streamICQ = "6979990"
> masterHost = "radiovkontakte.ru"
> masterPort = 9000
> masterMount = "/rvk.ogg"
> testMount = "/test.ogg"
> masterBitrate = 72
> masterPasswd = "***"
> masterUrl = "http://" ^ masterHost ^ ":#{masterPort}" ^ masterMount
> livePasswd = "***"
> liveMount = "live.ogg"
> playlistPasswd = "***"
> playlistMount = "playlist.ogg"
> shoutcastPasswd = "***"
> shoutcastHost = "radiovkontakte.ru"
> basePath = "/home/radio/"
> logLevel = 5
> set("init.daemon.pidfile.path","/var/run/liquidsoap/<script>.pid")
> set("init.daemon.pidfile",true)
> set("init.daemon",true)
> set("init.trace",true)
> set("log.level",logLevel)
> set("log.file.path", basePath ^ "log/<script>.log")
> set("server.telnet.reverse_dns", false)
> set("harbor.reverse_dns", false)
> set("tag.encodings",["UTF-8","CP-1251"])
> def stream_source(host, port, mount, pass, proto, format, source) =
> output.icecast(
> id="#{host}_#{port}_#{mount}",
> restart=true,
> mount=mount,
> host=host,
> port=port,
> password=pass,
> genre=streamGenre,
> url=streamUrl,
> description=streamDescr,
> name=streamTitle,
> protocol=proto,
> format,
> source
> )
> end
> ################### [Input] ###################
> input = input.http(
> masterUrl,
> new_track_on_metadata = false
> );
> input = mksafe(input)
> ################### [Output] ###################
> stream_source(
> masterHost,
> masterPort,
> "aac",
> masterPasswd,
> "http",
> %aacplus(bitrate=48),
> input
> )
> The log:
> 2011/04/04 19:23:43 >>> LOG START
> 2011/04/04 19:23:43 [protocols.external:3] Didn't find "ufetch".
> 2011/04/04 19:23:43 [protocols.external:3] Found "/usr/bin/wget".
> 2011/04/04 19:23:43 [main:3] Liquidsoap 1.0.0-beta+svn
> (trunk/liquidsoap@rev8237)
> 2011/04/04 19:23:43 [main:3] Using: pcre=6.0.1 dtools=0.2.2 duppy=0.4.0
> 0.4.0 duppy.syntax=0.4.0
> 0.4.0 cry=0.1.6 mm=0.1.0 xmlplaylist=0.1.2 lastfm=0.3.0 ogg=0.4.1
> vorbis=0.5.1 mad=0.4.0 flac=0.1.0 flac.ogg=0.1.0 lame=0.2.4 aacplus=0.2.0
> theora=0.2.0 samplerate=0.1.1 taglib=0.1.4 camomile=0.7.1 faad=0.2.0
> faac=0.1.2 soundtouch=0.1.6 ladspa=0.1.2
> 2011/04/04 19:23:43 [main:2]
> 2011/04/04 19:23:43 [main:2] DISCLAIMER: This version of Liquidsoap has been
> 2011/04/04 19:23:43 [main:2] compiled from a snapshot of the development code.
> 2011/04/04 19:23:43 [main:2] As such, it should not be used in production
> 2011/04/04 19:23:43 [main:2] unless you know what you are doing!
> 2011/04/04 19:23:43 [main:2]
> 2011/04/04 19:23:43 [main:2] We are, however, very interested in any feedback
> 2011/04/04 19:23:43 [main:2] about our development code and committed to fix
> 2011/04/04 19:23:43 [main:2] issues as soon as possible.
> 2011/04/04 19:23:43 [main:2]
> 2011/04/04 19:23:43 [main:2] If you are interested in collaborating to
> 2011/04/04 19:23:43 [main:2] the development of Liquidsoap, feel free to
> 2011/04/04 19:23:43 [main:2] drop us a mail at <[email protected]>
> 2011/04/04 19:23:43 [main:2] or to join the #savonet IRC channel on Freenode.
> 2011/04/04 19:23:43 [main:2]
> 2011/04/04 19:23:43 [main:2] Please send any bug report or feature request
> 2011/04/04 19:23:43 [main:2] using our trac <http://savonet.rastageeks.org>.
> 2011/04/04 19:23:43 [main:2]
> 2011/04/04 19:23:43 [main:2] We hope you enjoy this snapshot build of
> Liquidsoap!
> 2011/04/04 19:23:43 [main:2]
> 2011/04/04 19:23:43 [lang:3] Did not find flac binary: flac decoder disabled.
> 2011/04/04 19:23:43 [lang:3] Did not find metaflac binary: flac metadata
> resolver disabled.
> 2011/04/04 19:23:43 [lang:3] Did not find faad binary: faad decoder disabled.
> 2011/04/04 19:23:43 [frame:3] Using 44100Hz audio, 25Hz video, 44100Hz master.
> 2011/04/04 19:23:43 [frame:3] Frame size must be a multiple of 1764 ticks =
> 1764 audio samples = 1 video samples.
> 2011/04/04 19:23:43 [frame:3] Targetting 'frame.duration': 0.04s = 1764 audio
> samples = 1764 ticks.
> 2011/04/04 19:23:43 [frame:3] Frames last 0.04s = 1764 audio samples = 1
> video samples = 1764 ticks.
> 2011/04/04 19:23:43 [video.converter:4] Couldn't find preferred video
> converter: gavl.
> 2011/04/04 19:23:43 [audio.converter:4] Using preferred samplerate converter:
> libsamplerate.
> 2011/04/04 19:23:43 [threads:3] Created thread "generic queue #1".
> 2011/04/04 19:23:43 [threads:3] Created thread "non-blocking queue #1".
> 2011/04/04 19:23:43 [clock:4] Currently 1 clocks allocated.
> 2011/04/04 19:23:43 [clock.wallclock_main:4] Starting 1 sources...
> 2011/04/04 19:23:43 [source:4] Source radiovkontakte(dot)ru_8100_rvkMid gets
> up.
> 2011/04/04 19:23:43 [source:4] Source mksafe gets up.
> 2011/04/04 19:23:43 [source:4] Source src_4565 gets up.
> 2011/04/04 19:23:43 [threads:3] Created thread "http polling" (1 total).
> 2011/04/04 19:23:43 [src_4565:4] Activations changed: static=[],
> dynamic=[mksafe:radiovkontakte(dot)ru_8100_rvkMid:radiovkontakte(dot)ru_8100_rvkMid].
> 2011/04/04 19:23:43 [source:4] Source safe_blank gets up.
> 2011/04/04 19:23:43 [safe_blank:4] Content kind is {audio=2;video=0;midi=0}.
> 2011/04/04 19:23:43 [safe_blank:4] Activations changed: static=[],
> dynamic=[mksafe:radiovkontakte(dot)ru_8100_rvkMid:radiovkontakte(dot)ru_8100_rvkMid].
> 2011/04/04 19:23:43 [mksafe:4] Activations changed:
> static=[radiovkontakte(dot)ru_8100_rvkMid:radiovkontakte(dot)ru_8100_rvkMid],
> dynamic=[].
> 2011/04/04 19:23:43 [stdout:3] init(0):init-start
> @stop-atom
> 2011/04/04 19:23:43 [src_4565:4] Connecting to
> <http://radiovkontakte.ru:9000/rvk.ogg>...
> 2011/04/04 19:23:43 [radiovkontakte(dot)ru_8100_rvkMid:4] Activations
> changed: static=[radiovkontakte(dot)ru_8100_rvkMid], dynamic=[].
> 2011/04/04 19:23:43 [stdout:3] init(0):init-start
> @start-triggers
> 2011/04/04 19:23:43 [radiovkontakte(dot)ru_8100_rvkMid:4] Enabling caching
> mode: active source.
> 2011/04/04 19:23:44 [radiovkontakte(dot)ru_8100_rvkMid:3] Connecting mount
> rvkMid for [email protected]...
> 2011/04/04 19:23:44 [stdout:3] init(0):init-start
> @stop-triggers
> 2011/04/04 19:23:44 [stdout:3] init(0):init-start
> @stop
> 2011/04/04 19:23:44 [stdout:3] init(0):init-start
> @return
> 2011/04/04 19:23:44 [stdout:3] init(0):init-start
> @called
> 2011/04/04 19:23:44 [stdout:3] init(0):init-start
> @start
> 2011/04/04 19:23:44 [stdout:3] init(0):init-start
> @start-depends
> 2011/04/04 19:23:44 [stdout:3] init(0):init-start
> @stop-depends
> 2011/04/04 19:23:44 [stdout:3] init(0):init-start
> @start-atom
> 2011/04/04 19:23:44 [stdout:3] init(0):init-start
> @stop-atom
> 2011/04/04 19:23:44 [stdout:3] init(0):init-start
> @start-triggers
> 2011/04/04 19:23:44 [stdout:3] init(0):init-start
> @stop-triggers
> 2011/04/04 19:23:44 [stdout:3] init(0):init-start
> @stop
> 2011/04/04 19:23:44 [stdout:3] init(0):init-start
> @return
> 2011/04/04 19:23:44 [stdout:3] init(0):init-start
> @stop-triggers
> 2011/04/04 19:23:44 [stdout:3] init(0):init-start
> @stop
> 2011/04/04 19:23:44 [stdout:3] init(0):init-start
> @return
> 2011/04/04 19:23:44 [radiovkontakte(dot)ru_8100_rvkMid:3] Connection setup
> was successful.
> 2011/04/04 19:23:44 [threads:3] Created thread "wallclock_main" (2 total).
> 2011/04/04 19:23:44 [clock:4] Main phase starts.
> 2011/04/04 19:23:44 [clock.wallclock_main:3] Streaming loop starts,
> synchronized with wallclock.
> 2011/04/04 19:23:44 [mksafe:3] Switch to safe_blank.
> 2011/04/04 19:23:44 [safe_blank:4] Activations changed:
> static=[mksafe:radiovkontakte(dot)ru_8100_rvkMid:radiovkontakte(dot)ru_8100_rvkMid],
>
> dynamic=[mksafe:radiovkontakte(dot)ru_8100_rvkMid:radiovkontakte(dot)ru_8100_rvkMid].
> 2011/04/04 19:23:44 [src_4565:4] Could not get file: File Not Found
> 2011/04/04 19:23:44 [src_4565:4] Connection failed: Http_source.Internal
> 2011/04/04 19:23:46 [src_4565:4] Connecting to
> <http://radiovkontakte.ru:9000/rvk.ogg>...
> 2011/04/04 19:23:46 [src_4565:4] Trying playlist parser for mime
> application/ogg
> 2011/04/04 19:23:46 [src_4565:4] Content-type "application/ogg".
> 2011/04/04 19:23:46 [decoder:4] Trying method "MP3/LIBMAD" for
> "application/ogg"...
> 2011/04/04 19:23:46 [decoder:4] Trying method "OGG" for "application/ogg"...
> 2011/04/04 19:23:46 [decoder:3] Method "OGG" accepted "application/ogg".
> 2011/04/04 19:23:46 [src_4565:3] Decoding...
> 2011/04/04 19:23:46 [ogg.demuxer:5] Found a ogg logical stream, serial:
> 327b23c6
> 2011/04/04 19:23:46 [ogg.demuxer:5] Trying ogg/flac format
> 2011/04/04 19:23:46 [ogg.demuxer:5] Trying ogg/theora format
> 2011/04/04 19:23:46 [ogg.demuxer:5] Trying ogg/vorbis format
> 2011/04/04 19:23:46 [ogg.demuxer:5] ogg/vorbis format detected for stream
> 327b23c6
> 2011/04/04 19:23:47 [mksafe:3] Switch to src_4565 with transition.
> 2011/04/04 19:23:47 [safe_blank:4] Activations changed: static=[],
> dynamic=[mksafe:radiovkontakte(dot)ru_8100_rvkMid:radiovkontakte(dot)ru_8100_rvkMid].
> 2011/04/04 19:23:47 [src_4565:4] Activations changed:
> static=[mksafe:radiovkontakte(dot)ru_8100_rvkMid:radiovkontakte(dot)ru_8100_rvkMid],
>
> dynamic=[mksafe:radiovkontakte(dot)ru_8100_rvkMid:radiovkontakte(dot)ru_8100_rvkMid].
> 2011/04/04 19:23:47 [threads:1] Thread "wallclock_main" failed: Unknown
> encoding "CP-1251"!!
> 2011/04/04 19:23:47 [main:3] Shutdown started!
> 2011/04/04 19:23:47 [main:3] Waiting for threads to terminate...
> 2011/04/04 19:23:47 [stderr:3] Thread 5 killed on uncaught exception
> Failure("Unknown encoding "CP-1251"!")
> 2011/04/04 19:23:47 [stdout:3] init(0):init-stop
> @called
> 2011/04/04 19:23:47 [stdout:3] init(0):init-stop
> @start
> 2011/04/04 19:23:47 [stderr:3] Raised at file "pervasives.ml", line 22,
> characters 22-33
> 2011/04/04 19:23:47 [stdout:3] init(0):init-stop
> @start-depends
> 2011/04/04 19:23:47 [stderr:3] Called from file "list.ml", line 57,
> characters 20-23
> 2011/04/04 19:23:47 [stdout:3] init(0):init-stop
> @called
> 2011/04/04 19:23:47 [stderr:3] Called from file "list.ml", line 57,
> characters 32-39
> 2011/04/04 19:23:47 [stderr:3] Called from file "array.ml", line 122,
> characters 21-40
> 2011/04/04 19:23:47 [stdout:3] init(0):init-stop
> @start
> 2011/04/04 19:23:47 [stdout:3] init(0):init-stop
> @start-depends
> 2011/04/04 19:23:47 [stderr:3] Called from file "list.ml", line 69,
> characters 12-15
> 2011/04/04 19:23:47 [stdout:3] init(0):init-stop
> @stop-depends
> 2011/04/04 19:23:47 [stdout:3] init(0):init-stop
> @start-atom
> 2011/04/04 19:23:55 [src_4565:3] Buffer overrun: Dropping 0.01s.
> 2011/04/04 19:23:55 [src_4565:3] Buffer overrun: Dropping 0.02s.
> 2011/04/04 19:23:55 [src_4565:3] Buffer overrun: Dropping 0.02s.
> <...>
> 2011/04/04 19:32:33 [src_4565:3] Buffer overrun: Dropping 0.02s.
> 2011/04/04 19:32:33 [src_4565:3] Buffer overrun: Dropping 0.02s.
> 2011/04/04 19:32:33 [src_4565:3] Buffer overrun: Dropping 0.02s.
> 2011/04/04 19:32:33 [src_4565:3] Buffer overrun: Dropping 0.02s.
> 2011/04/04 19:32:33 [src_4565:2] Feeding stopped: Ogg.Not_enough_data.
> 2011/04/04 19:32:35 [src_4565:4] Connecting to
> <http://radiovkontakte.ru:9000/rvk.ogg>...
> 2011/04/04 19:32:35 [src_4565:4] Could not get file: File Not Found
> 2011/04/04 19:32:35 [src_4565:4] Connection failed: Http_source.Internal
> 2011/04/04 19:32:37 [src_4565:4] Connecting to
> <http://radiovkontakte.ru:9000/rvk.ogg>...
> 2011/04/04 19:32:38 [src_4565:4] Trying playlist parser for mime
> application/ogg
> 2011/04/04 19:32:38 [src_4565:4] Content-type "application/ogg".
> 2011/04/04 19:32:38 [decoder:4] Trying method "MP3/LIBMAD" for
> "application/ogg"...
> 2011/04/04 19:32:38 [decoder:4] Trying method "OGG" for "application/ogg"...
> 2011/04/04 19:32:38 [decoder:3] Method "OGG" accepted "application/ogg".
> 2011/04/04 19:32:38 [src_4565:3] Decoding...
> 2011/04/04 19:32:38 [ogg.demuxer:5] Found a ogg logical stream, serial:
> 6b8b4567
> 2011/04/04 19:32:38 [ogg.demuxer:5] Trying ogg/flac format
> 2011/04/04 19:32:38 [ogg.demuxer:5] Trying ogg/theora format
> 2011/04/04 19:32:38 [ogg.demuxer:5] Trying ogg/vorbis format
> 2011/04/04 19:32:38 [ogg.demuxer:5] ogg/vorbis format detected for stream
> 6b8b4567
> 2011/04/04 19:32:38 [src_4565:3] Buffer overrun: Dropping 0.02s.
> 2011/04/04 19:32:38 [src_4565:3] Buffer overrun: Dropping 0.02s.
> <...>
> 2011/04/04 19:34:37 [src_4565:3] Buffer overrun: Dropping 0.02s.
> 2011/04/04 19:34:37 [src_4565:3] Buffer overrun: Dropping 0.02s.
> 2011/04/04 19:37:28 >>> LOG START
--
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
------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve
application availability and disaster protection. Learn more about boosting
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
Savonet-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-devl