savonet / liquidsoap

Liquidsoap is a statically typed scripting general-purpose language with dedicated operators and backend for all thing media, streaming, file generation, automation, HTTP backend and more.
http://liquidsoap.info
GNU General Public License v2.0
1.4k stars 130 forks source link

Unexpected "Switch to safe_blank", odd workaround #210

Closed protopyte closed 6 years ago

protopyte commented 9 years ago

Hello

I'm tracking down an issue I reliably observe on a Debian wheezy running liquidsoap 1.0.1+repack1-1.1. I tried to take out as much code as possible, I hope the following code is minimal enough.

#!/usr/bin/liquidsoap

set("log.file.path","/tmp/debug.log")
set("log.stdout", true)
set("log.level", 3)

pl = playlist("/tmp/pl.m3u")
#pl = single("say:Hello, this is radio FOO! We are currently having some technical difficulties but we'll be back soon so stay tuned!")

radio = switch([
                ({ true }, pl)
               ])

radio = smart_crossfade( radio )
radio = mksafe(radio)

output.icecast(
               %mp3,
               host = "localhost", port = 8000,
               password = "blablabla", mount = "test",
               radio
              )

/tmp/pl.m3u contains just one wave file, actually the output of the say: that I copy-pasted while it existed in /tmp.

Here's the level 3 log:

2015/03/11 01:04:16 >>> LOG START
2015/03/11 01:04:16 [protocols.external:3] Didn't find "ufetch".
2015/03/11 01:04:16 [protocols.external:3] Found "/usr/bin/wget".
2015/03/11 01:04:16 [main:3] Liquidsoap 1.0.1
2015/03/11 01:04:16 [main:3] Using: graphics=[distributed with Ocaml] pcre=6.2.5 dtools=0.3.0 duppy=0.4.2 duppy.syntax=0.4.2 cry=0.2.2 mm=0.2.0 xmlplaylist=0.1.3 lastfm=0.3.0 ogg=0.4.3 vorbis=0.6.1 speex=0.2.0 mad=0.4.4 flac=0.1.1 flac.ogg=0.1.1 dynlink=[distributed with Ocaml] lame=0.3.1 gstreamer=0.1.0 voaacenc=0.1.0 theora=0.3.0 schroedinger=0.1.0 gavl=0.1.4 bjack=0.1.3 alsa=0.2.1 ao=0.2.0 samplerate=0.1.1 taglib=0.2.0 magic=0.7.3 camomile=0.8.4 faad=0.3.0 soundtouch=0.1.7 portaudio=0.2.0 pulseaudio=0.1.2 ladspa=0.1.4 dssi=0.1.0 sdl=0.9.0 camlimages=4.0.0 lo=0.1.0 yojson=1.0.3 gd=1.0a5
2015/03/11 01:04:16 [dynamic.loader:3] Could not find dynamic module for aacplus encoder.
2015/03/11 01:04:16 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.0.1/plugins/lame.cmxs.
2015/03/11 01:04:16 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.0.1/plugins/cry.cmxs.
2015/03/11 01:04:16 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.0.1/plugins/mad.cmxs.
2015/03/11 01:04:16 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.0.1/plugins/faad.cmxs.
2015/03/11 01:04:16 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.0.1/plugins/taglib.cmxs.
2015/03/11 01:04:16 [frame:3] Using 44100Hz audio, 25Hz video, 44100Hz master.
2015/03/11 01:04:16 [frame:3] Frame size must be a multiple of 1764 ticks = 1764 audio samples = 1 video samples.
2015/03/11 01:04:16 [frame:3] Targetting 'frame.duration': 0.04s = 1764 audio samples = 1764 ticks.
2015/03/11 01:04:16 [frame:3] Frames last 0.04s = 1764 audio samples = 1 video samples = 1764 ticks.
2015/03/11 01:04:16 [threads:3] Created thread "generic queue #1".
2015/03/11 01:04:16 [threads:3] Created thread "generic queue #2".
2015/03/11 01:04:16 [pl(dot)m3u:3] Loading playlist...
2015/03/11 01:04:16 [pl(dot)m3u:3] No mime type specified, trying autodetection.
2015/03/11 01:04:16 [pl(dot)m3u:3] Playlist treated as format audio/mpegurl
2015/03/11 01:04:16 [pl(dot)m3u:3] Successfully loaded a playlist of 1 tracks.
2015/03/11 01:04:16 [test:3] Connecting mount test for source@localhost...
2015/03/11 01:04:16 [decoder:3] Method "WAV" accepted "/tmp/debug.wav".
2015/03/11 01:04:16 [test:3] Connection setup was successful.
2015/03/11 01:04:16 [threads:3] Created thread "wallclock_main" (1 total).
2015/03/11 01:04:16 [clock.wallclock_main:3] Streaming loop starts, synchronized with wallclock.
2015/03/11 01:04:16 [mksafe:3] Switch to safe_blank.
2015/03/11 01:04:23 [main:3] Shutdown started!
2015/03/11 01:04:23 [main:3] Waiting for threads to terminate...
2015/03/11 01:04:23 [test:3] Closing connection...
2015/03/11 01:04:23 [clock.wallclock_main:3] Streaming loop stopped.
2015/03/11 01:04:23 [threads:3] Thread "wallclock_main" terminated (0 remaining).
2015/03/11 01:04:23 [main:3] Cleaning downloaded files...
2015/03/11 01:04:23 >>> LOG END

The shutdown is manually initiated by a ctrl+c. I'm trying to figure out why I am switching to safe_blank. I tried several things to get an output, any of these will work:

Here is the level 4 log (only the loglevel has changed):

2015/03/11 01:14:15 >>> LOG START
2015/03/11 01:14:15 [protocols.external:3] Didn't find "ufetch".
2015/03/11 01:14:15 [protocols.external:3] Found "/usr/bin/wget".
2015/03/11 01:14:15 [main:3] Liquidsoap 1.0.1
2015/03/11 01:14:15 [main:3] Using: graphics=[distributed with Ocaml] pcre=6.2.5 dtools=0.3.0 duppy=0.4.2 duppy.syntax=0.4.2 cry=0.2.2 mm=0.2.0 xmlplaylist=0.1.3 lastfm=0.3.0 ogg=0.4.3 vorbis=0.6.1 speex=0.2.0 mad=0.4.4 flac=0.1.1 flac.ogg=0.1.1 dynlink=[distributed with Ocaml] lame=0.3.1 gstreamer=0.1.0 voaacenc=0.1.0 theora=0.3.0 schroedinger=0.1.0 gavl=0.1.4 bjack=0.1.3 alsa=0.2.1 ao=0.2.0 samplerate=0.1.1 taglib=0.2.0 magic=0.7.3 camomile=0.8.4 faad=0.3.0 soundtouch=0.1.7 portaudio=0.2.0 pulseaudio=0.1.2 ladspa=0.1.4 dssi=0.1.0 sdl=0.9.0 camlimages=4.0.0 lo=0.1.0 yojson=1.0.3 gd=1.0a5
2015/03/11 01:14:15 [dynamic.loader:3] Could not find dynamic module for aacplus encoder.
2015/03/11 01:14:15 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.0.1/plugins/lame.cmxs.
2015/03/11 01:14:15 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.0.1/plugins/cry.cmxs.
2015/03/11 01:14:15 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.0.1/plugins/mad.cmxs.
2015/03/11 01:14:15 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.0.1/plugins/faad.cmxs.
2015/03/11 01:14:15 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.0.1/plugins/taglib.cmxs.
2015/03/11 01:14:15 [frame:3] Using 44100Hz audio, 25Hz video, 44100Hz master.
2015/03/11 01:14:15 [frame:3] Frame size must be a multiple of 1764 ticks = 1764 audio samples = 1 video samples.
2015/03/11 01:14:15 [frame:3] Targetting 'frame.duration': 0.04s = 1764 audio samples = 1764 ticks.
2015/03/11 01:14:15 [frame:3] Frames last 0.04s = 1764 audio samples = 1 video samples = 1764 ticks.
2015/03/11 01:14:15 [video.converter:4] Couldn't find preferred video converter: gavl.
2015/03/11 01:14:15 [audio.converter:4] Couldn't find preferred samplerate converter: libsamplerate.
2015/03/11 01:14:15 [audio.converter:4] Using native samplerate converter
2015/03/11 01:14:15 [threads:3] Created thread "generic queue #1".
2015/03/11 01:14:15 [threads:3] Created thread "generic queue #2".
2015/03/11 01:14:15 [clock:4] Currently 2 clocks allocated.
2015/03/11 01:14:15 [clock.wallclock_main:4] Starting 1 sources...
2015/03/11 01:14:15 [source:4] Source output.icecast_4469 gets up.
2015/03/11 01:14:15 [source:4] Source mksafe gets up.
2015/03/11 01:14:15 [source:4] Source smart_cross_4461 gets up.
2015/03/11 01:14:15 [source:4] Source switch_4459 gets up.
2015/03/11 01:14:15 [source:4] Source playlist_4457 gets up.
2015/03/11 01:14:15 [pl(dot)m3u:3] Loading playlist...
2015/03/11 01:14:15 [pl(dot)m3u:3] No mime type specified, trying autodetection.
2015/03/11 01:14:15 [playlist parser:4] Trying application/x-cue parser
2015/03/11 01:14:15 [playlist parser:4] Trying audio/x-scpls parser
2015/03/11 01:14:16 [playlist parser:4] Trying audio/mpegurl parser
2015/03/11 01:14:16 [pl(dot)m3u:3] Playlist treated as format audio/mpegurl
2015/03/11 01:14:16 [pl(dot)m3u:3] Successfully loaded a playlist of 1 tracks.
2015/03/11 01:14:16 [pl(dot)m3u:4] Content kind is {audio=2;video=0;midi=0}.
2015/03/11 01:14:16 [pl(dot)m3u:4] Activations changed: static=[], dynamic=[switch_4459:smart_cross_4461].
2015/03/11 01:14:16 [decoder:4] Trying method "META" for "/tmp/debug.wav"...
2015/03/11 01:14:16 [decoder:4] Trying method "WAV" for "/tmp/debug.wav"...
2015/03/11 01:14:16 [decoder.wav:4] "/tmp/debug.wav" recognized as WAV file (s16le,16000Hz,2 channels).
2015/03/11 01:14:16 [decoder:3] Method "WAV" accepted "/tmp/debug.wav".
2015/03/11 01:14:16 [metadata.mp4:4] Invalid MIME type for "/tmp/debug.wav": audio/x-wav!
2015/03/11 01:14:16 [metadata.mp4:4] Invalid file extension for "/tmp/debug.wav"!
2015/03/11 01:14:16 [decoder.taglib:4] Invalid MIME type for "/tmp/debug.wav": audio/x-wav!
2015/03/11 01:14:16 [decoder.taglib:4] Invalid file extension for "/tmp/debug.wav"!
2015/03/11 01:14:16 [pl(dot)m3u:4] Remaining: 0.0s, queued: 0.0s, adding: 30.0s (RID 1)
2015/03/11 01:14:16 [switch_4459:4] Activations changed: static=[], dynamic=[smart_cross_4461].
2015/03/11 01:14:16 [switch_4459:4] Activations changed: static=[smart_cross_4461], dynamic=[smart_cross_4461].
2015/03/11 01:14:16 [smart_cross_4461:4] Activations changed: static=[], dynamic=[mksafe:test:test].
2015/03/11 01:14:16 [source:4] Source safe_blank gets up.
2015/03/11 01:14:16 [safe_blank:4] Content kind is {audio=2;video=0;midi=0}.
2015/03/11 01:14:16 [safe_blank:4] Activations changed: static=[], dynamic=[mksafe:test:test].
2015/03/11 01:14:16 [mksafe:4] Activations changed: static=[test:test], dynamic=[].
2015/03/11 01:14:16 [pl(dot)m3u:4] Remaining: 0.0s, queued: 30.0s, taking: 30.0s
2015/03/11 01:14:16 [pl(dot)m3u:3] Prepared "/tmp/debug.wav" (RID 1).
2015/03/11 01:14:16 [test:4] Activations changed: static=[test], dynamic=[].
2015/03/11 01:14:16 [test:4] Enabling caching mode: active source.
2015/03/11 01:14:16 [test:3] Connecting mount test for source@localhost...
2015/03/11 01:14:17 [test:3] Connection setup was successful.
2015/03/11 01:14:17 [threads:3] Created thread "wallclock_main" (1 total).
2015/03/11 01:14:17 [clock:4] Main phase starts.
2015/03/11 01:14:17 [clock.wallclock_main:3] Streaming loop starts, synchronized with wallclock.
2015/03/11 01:14:17 [mksafe:3] Switch to smart_cross_4461.
2015/03/11 01:14:17 [smart_cross_4461:4] Activations changed: static=[mksafe:test:test], dynamic=[mksafe:test:test].
2015/03/11 01:14:17 [smart_cross_4461:4] Buffering end of track...
2015/03/11 01:14:17 [switch_4459:3] Switch to pl(dot)m3u.
2015/03/11 01:14:17 [pl(dot)m3u:4] Activations changed: static=[switch_4459:smart_cross_4461], dynamic=[switch_4459:smart_cross_4461].
2015/03/11 01:14:17 [decoder.wav:4] WAV header read (16000Hz, 16bits), starting decoding...
2015/03/11 01:14:17 [decoder:4] Trying method "META" for "/tmp/debug.wav"...
2015/03/11 01:14:17 [decoder:4] Trying method "WAV" for "/tmp/debug.wav"...
2015/03/11 01:14:17 [decoder.wav:4] "/tmp/debug.wav" recognized as WAV file (s16le,16000Hz,2 channels).
2015/03/11 01:14:17 [decoder:3] Method "WAV" accepted "/tmp/debug.wav".
2015/03/11 01:14:17 [metadata.mp4:4] Invalid MIME type for "/tmp/debug.wav": audio/x-wav!
2015/03/11 01:14:17 [metadata.mp4:4] Invalid file extension for "/tmp/debug.wav"!
2015/03/11 01:14:17 [decoder.taglib:4] Invalid MIME type for "/tmp/debug.wav": audio/x-wav!
2015/03/11 01:14:17 [decoder.taglib:4] Invalid file extension for "/tmp/debug.wav"!
2015/03/11 01:14:17 [pl(dot)m3u:4] Remaining: 7.3s, queued: 0.0s, adding: 30.0s (RID 2)
2015/03/11 01:14:17 [smart_cross_4461:4] More buffering will be needed.
2015/03/11 01:14:19 [decoder:4] Decoding "/tmp/debug.wav" ended: Wav_decoder.End_of_stream.
2015/03/11 01:14:20 [pl(dot)m3u:3] Finished with "/tmp/debug.wav".
2015/03/11 01:14:20 [pl(dot)m3u:4] Remaining: 0.0s, queued: 30.0s, taking: 30.0s
2015/03/11 01:14:20 [pl(dot)m3u:3] Prepared "/tmp/debug.wav" (RID 2).
2015/03/11 01:14:20 [decoder.wav:4] WAV header read (16000Hz, 16bits), starting decoding...
2015/03/11 01:14:20 [decoder:4] Trying method "META" for "/tmp/debug.wav"...
2015/03/11 01:14:20 [decoder:4] Trying method "WAV" for "/tmp/debug.wav"...
2015/03/11 01:14:20 [decoder.wav:4] "/tmp/debug.wav" recognized as WAV file (s16le,16000Hz,2 channels).
2015/03/11 01:14:20 [decoder:3] Method "WAV" accepted "/tmp/debug.wav".
2015/03/11 01:14:20 [metadata.mp4:4] Invalid MIME type for "/tmp/debug.wav": audio/x-wav!
2015/03/11 01:14:20 [metadata.mp4:4] Invalid file extension for "/tmp/debug.wav"!
2015/03/11 01:14:20 [decoder.taglib:4] Invalid MIME type for "/tmp/debug.wav": audio/x-wav!
2015/03/11 01:14:20 [decoder.taglib:4] Invalid file extension for "/tmp/debug.wav"!
2015/03/11 01:14:20 [pl(dot)m3u:4] Remaining: 8.0s, queued: 0.0s, adding: 30.0s (RID 3)
2015/03/11 01:14:20 [smart_cross_4461:3] Analysis: -16.562473dB / -15.011499dB (5.04s / 1.96s)
2015/03/11 01:14:20 [smart_crossfade:4] After : ("filename","/tmp/debug.wav")
2015/03/11 01:14:20 [smart_crossfade:4] After : ("status","playing")
2015/03/11 01:14:20 [smart_crossfade:4] After : ("source","pl(dot)m3u")
2015/03/11 01:14:20 [smart_crossfade:4] After : ("initial_uri","/tmp/debug.wav")
2015/03/11 01:14:20 [smart_crossfade:4] After : ("on_air","2015/03/11 01:14:20")
2015/03/11 01:14:20 [smart_crossfade:4] After : ("rid","2")
2015/03/11 01:14:20 [smart_crossfade:4] After : ("kind","{audio=2;video=0;midi=0}")
2015/03/11 01:14:20 [smart_crossfade:4] After : ("decoder","WAV")
2015/03/11 01:14:20 [smart_crossfade:4] After : ("temporary","false")
2015/03/11 01:14:20 [smart_crossfade:3] No transition: using default.
2015/03/11 01:14:20 [source:4] Source sequence_4505 gets up.
2015/03/11 01:14:20 [source:4] Source smart_cross_4461_before gets up.
2015/03/11 01:14:20 [smart_cross_4461_before:4] Content kind is {audio=2;video=0;midi=0}.
2015/03/11 01:14:20 [smart_cross_4461_before:4] Activations changed: static=[sequence_4505:smart_cross_4461], dynamic=[].
2015/03/11 01:14:20 [source:4] Source smart_cross_4461_after gets up.
2015/03/11 01:14:20 [source:4] Source buffer_4492 gets up.
2015/03/11 01:14:20 [buffer_4492:4] Content kind is {audio=2;video=0;midi=0}.
2015/03/11 01:14:20 [buffer_4492:4] Activations changed: static=[smart_cross_4461_after:sequence_4505:smart_cross_4461], dynamic=[].
2015/03/11 01:14:20 [switch_4459:4] Activations changed: static=[smart_cross_4461_after:sequence_4505:smart_cross_4461, smart_cross_4461], dynamic=[smart_cross_4461].
2015/03/11 01:14:20 [switch_4459:4] Enabling caching mode: two static activations.
2015/03/11 01:14:20 [smart_cross_4461_after:4] Activations changed: static=[sequence_4505:smart_cross_4461], dynamic=[].
2015/03/11 01:14:20 [sequence_4505:4] Activations changed: static=[smart_cross_4461], dynamic=[].
2015/03/11 01:14:20 [switch_4459:4] Activations changed: static=[smart_cross_4461_after:sequence_4505:smart_cross_4461], dynamic=[smart_cross_4461].
2015/03/11 01:14:20 [switch_4459:4] Disabling caching mode.
2015/03/11 01:14:25 [smart_cross_4461_before:4] End of track.
2015/03/11 01:14:25 [smart_cross_4461_before:4] Buffer emptied, buffering needed.
2015/03/11 01:14:25 [smart_cross_4461_before:4] Activations changed: static=[], dynamic=[].
2015/03/11 01:14:25 [source:4] Source smart_cross_4461_before gets down.
2015/03/11 01:14:26 [smart_cross_4461:4] Buffering end of track...
2015/03/11 01:14:26 [buffer_4492:4] Buffer emptied, buffering needed.
2015/03/11 01:14:26 [buffer_4492:4] Activations changed: static=[], dynamic=[].
2015/03/11 01:14:26 [source:4] Source buffer_4492 gets down.
2015/03/11 01:14:26 [smart_cross_4461:4] More buffering will be needed.
2015/03/11 01:14:27 [decoder:4] Decoding "/tmp/debug.wav" ended: Wav_decoder.End_of_stream.
2015/03/11 01:14:28 [pl(dot)m3u:3] Finished with "/tmp/debug.wav".
2015/03/11 01:14:28 [pl(dot)m3u:4] Remaining: 0.0s, queued: 30.0s, taking: 30.0s
2015/03/11 01:14:28 [pl(dot)m3u:3] Prepared "/tmp/debug.wav" (RID 3).
2015/03/11 01:14:28 [decoder.wav:4] WAV header read (16000Hz, 16bits), starting decoding...
2015/03/11 01:14:28 [decoder:4] Trying method "META" for "/tmp/debug.wav"...
2015/03/11 01:14:28 [decoder:4] Trying method "WAV" for "/tmp/debug.wav"...
2015/03/11 01:14:28 [decoder.wav:4] "/tmp/debug.wav" recognized as WAV file (s16le,16000Hz,2 channels).
2015/03/11 01:14:28 [decoder:3] Method "WAV" accepted "/tmp/debug.wav".
2015/03/11 01:14:28 [metadata.mp4:4] Invalid MIME type for "/tmp/debug.wav": audio/x-wav!
2015/03/11 01:14:28 [metadata.mp4:4] Invalid file extension for "/tmp/debug.wav"!
2015/03/11 01:14:28 [decoder.taglib:4] Invalid MIME type for "/tmp/debug.wav": audio/x-wav!
2015/03/11 01:14:28 [decoder.taglib:4] Invalid file extension for "/tmp/debug.wav"!
2015/03/11 01:14:28 [pl(dot)m3u:4] Remaining: 8.0s, queued: 0.0s, adding: 30.0s (RID 4)
2015/03/11 01:14:28 [smart_cross_4461:3] Analysis: -16.562473dB / -15.011750dB (5.04s / 1.96s)
2015/03/11 01:14:28 [smart_crossfade:4] Before: ("filename","/tmp/debug.wav")
2015/03/11 01:14:28 [smart_crossfade:4] Before: ("status","playing")
2015/03/11 01:14:28 [smart_crossfade:4] Before: ("source","pl(dot)m3u")
2015/03/11 01:14:28 [smart_crossfade:4] Before: ("initial_uri","/tmp/debug.wav")
2015/03/11 01:14:28 [smart_crossfade:4] Before: ("on_air","2015/03/11 01:14:20")
2015/03/11 01:14:28 [smart_crossfade:4] Before: ("rid","2")
2015/03/11 01:14:28 [smart_crossfade:4] Before: ("kind","{audio=2;video=0;midi=0}")
2015/03/11 01:14:28 [smart_crossfade:4] Before: ("decoder","WAV")
2015/03/11 01:14:28 [smart_crossfade:4] Before: ("temporary","false")
2015/03/11 01:14:28 [smart_crossfade:4] After : ("filename","/tmp/debug.wav")
2015/03/11 01:14:28 [smart_crossfade:4] After : ("status","playing")
2015/03/11 01:14:28 [smart_crossfade:4] After : ("source","pl(dot)m3u")
2015/03/11 01:14:28 [smart_crossfade:4] After : ("initial_uri","/tmp/debug.wav")
2015/03/11 01:14:28 [smart_crossfade:4] After : ("on_air","2015/03/11 01:14:28")
2015/03/11 01:14:28 [smart_crossfade:4] After : ("rid","3")
2015/03/11 01:14:28 [smart_crossfade:4] After : ("kind","{audio=2;video=0;midi=0}")
2015/03/11 01:14:28 [smart_crossfade:4] After : ("decoder","WAV")
2015/03/11 01:14:28 [smart_crossfade:4] After : ("temporary","false")
2015/03/11 01:14:28 [smart_crossfade:3] No transition: using default.
2015/03/11 01:14:28 [source:4] Source sequence_4536 gets up.
2015/03/11 01:14:28 [source:4] Source smart_cross_4461_before gets up.
2015/03/11 01:14:28 [smart_cross_4461_before:4] Content kind is {audio=2;video=0;midi=0}.
2015/03/11 01:14:28 [smart_cross_4461_before:4] Activations changed: static=[sequence_4536:smart_cross_4461], dynamic=[].
2015/03/11 01:14:28 [source:4] Source smart_cross_4461_after gets up.
2015/03/11 01:14:28 [source:4] Source buffer_4515 gets up.
2015/03/11 01:14:28 [buffer_4515:4] Content kind is {audio=2;video=0;midi=0}.
2015/03/11 01:14:28 [buffer_4515:4] Activations changed: static=[smart_cross_4461_after:sequence_4536:smart_cross_4461], dynamic=[].
2015/03/11 01:14:28 [switch_4459:4] Activations changed: static=[smart_cross_4461_after:sequence_4536:smart_cross_4461, smart_cross_4461_after:sequence_4505:smart_cross_4461], dynamic=[smart_cross_4461].
2015/03/11 01:14:28 [switch_4459:4] Enabling caching mode: two static activations.
2015/03/11 01:14:28 [smart_cross_4461_after:4] Activations changed: static=[sequence_4536:smart_cross_4461], dynamic=[].
2015/03/11 01:14:28 [sequence_4536:4] Activations changed: static=[smart_cross_4461], dynamic=[].
2015/03/11 01:14:28 [sequence_4505:4] Activations changed: static=[], dynamic=[].
2015/03/11 01:14:28 [source:4] Source sequence_4505 gets down.
2015/03/11 01:14:28 [smart_cross_4461_after:4] Activations changed: static=[], dynamic=[].
2015/03/11 01:14:28 [source:4] Source smart_cross_4461_after gets down.
2015/03/11 01:14:28 [switch_4459:4] Activations changed: static=[smart_cross_4461_after:sequence_4536:smart_cross_4461], dynamic=[smart_cross_4461].
2015/03/11 01:14:28 [switch_4459:4] Disabling caching mode.
2015/03/11 01:14:30 [main:3] Shutdown started!
2015/03/11 01:14:30 [main:3] Waiting for threads to terminate...
2015/03/11 01:14:30 [test:4] Activations changed: static=[], dynamic=[].
2015/03/11 01:14:30 [source:4] Source test gets down.
2015/03/11 01:14:30 [test:3] Closing connection...
2015/03/11 01:14:30 [mksafe:4] Activations changed: static=[], dynamic=[].
2015/03/11 01:14:30 [source:4] Source mksafe gets down.
2015/03/11 01:14:30 [smart_cross_4461:4] Activations changed: static=[mksafe:test:test], dynamic=[].
2015/03/11 01:14:30 [safe_blank:4] Activations changed: static=[], dynamic=[].
2015/03/11 01:14:30 [source:4] Source safe_blank gets down.
2015/03/11 01:14:30 [smart_cross_4461:4] Activations changed: static=[], dynamic=[].
2015/03/11 01:14:30 [source:4] Source smart_cross_4461 gets down.
2015/03/11 01:14:30 [sequence_4536:4] Activations changed: static=[], dynamic=[].
2015/03/11 01:14:30 [source:4] Source sequence_4536 gets down.
2015/03/11 01:14:30 [smart_cross_4461_before:4] Activations changed: static=[], dynamic=[].
2015/03/11 01:14:30 [source:4] Source smart_cross_4461_before gets down.
2015/03/11 01:14:30 [smart_cross_4461_after:4] Activations changed: static=[], dynamic=[].
2015/03/11 01:14:30 [source:4] Source smart_cross_4461_after gets down.
2015/03/11 01:14:30 [buffer_4515:4] Activations changed: static=[], dynamic=[].
2015/03/11 01:14:30 [source:4] Source buffer_4515 gets down.
2015/03/11 01:14:30 [switch_4459:4] Activations changed: static=[], dynamic=[smart_cross_4461].
2015/03/11 01:14:30 [switch_4459:4] Activations changed: static=[], dynamic=[].
2015/03/11 01:14:30 [source:4] Source switch_4459 gets down.
2015/03/11 01:14:30 [pl(dot)m3u:4] Activations changed: static=[switch_4459:smart_cross_4461], dynamic=[].
2015/03/11 01:14:30 [pl(dot)m3u:4] Activations changed: static=[], dynamic=[].
2015/03/11 01:14:30 [source:4] Source pl(dot)m3u gets down.
2015/03/11 01:14:30 [pl(dot)m3u:4] Waiting for feeding task to stop...
2015/03/11 01:14:30 [pl(dot)m3u:3] Finished with "/tmp/debug.wav".
2015/03/11 01:14:30 [pl(dot)m3u:4] Cleaning up request queue...
2015/03/11 01:14:30 [clock.wallclock_main:3] Streaming loop stopped.
2015/03/11 01:14:30 [threads:3] Thread "wallclock_main" terminated (0 remaining).
2015/03/11 01:14:30 [main:3] Cleaning downloaded files...
2015/03/11 01:14:30 >>> LOG END

I'd appreciate either letting me know of any obvious mistake I am not seeing, or confirming that you can reproduce the issue. I observe it as well on a totally different system, running Debian testing with liquidsoap 1.1.1-7+b1.

Thank you

dbaelde commented 9 years ago

I confirm the issue, reproduced on a fresh build with

radio = playlist("/tmp/test.m3u")
radio = switch([({true},radio)])
radio = smart_crossfade(radio)
radio = mksafe(radio)
output.dummy(radio)

Replace the playlist with a single and it works well. Remove the switch and it works well. Looks like a basic (and thus important) logic issue in one of those operators, I'll look into it before the release.

toots commented 6 years ago

This looks a lot like #572

toots commented 6 years ago

Actually I cannot reproduce anymore. However, that doesn't mean that the underlying cause has been fixed. #572 seems to be triggered in very similar conditions.