AzuraCast / AzuraCast

A self-hosted web radio management suite, including turnkey installer tools for the full radio software stack and a modern, easy-to-use web app to manage your stations.
https://www.azuracast.com/
GNU Affero General Public License v3.0
3.01k stars 558 forks source link

After 0.9.4.2 update Liquidsoap shutting down with error on unsuccessful transition #1399

Closed gammaw closed 5 years ago

gammaw commented 5 years ago

We have custom playlists (scheduled shows) that interrupt standard playlists (in-between music) at specific times. We know that Azuracast 0.9.4.1 introduced interruption but our custom playlists come with nice fading and other features.

The problem now is that on a 0.9.4.2 Docker installation (running on ubuntu-16-x86-64) the station starts, plays music from a standard playlist but then (at a specified time) Liquidsoap fails to start a custom playlist and stops. Here is the Liquidsoap log:

2019/04/04 17:31:15 [lahma_local_1:3] Connection setup was successful.
2019/04/04 17:31:15 [threads:3] Created thread "wallclock_main" (1 total).
2019/04/04 17:31:15 [clock.wallclock_main:3] Streaming loop starts, synchronized with wallclock.
2019/04/04 17:31:15 [switch_6811:3] Switch to cross_6746.
2019/04/04 17:31:15 [lahma_live_switch:3] Switch to rotate_6715.
2019/04/04 17:31:15 [rotate_6715:3] Switch to map_metadata_6694.
2019/04/04 17:31:15 [dummy:3] Source failed (no more tracks) stopping output...
2019/04/04 17:31:15 [decoder:3] Method "MAD" accepted "/var/azuracast/stations/lahma/media/jingle-3.mp3".
2019/04/04 17:31:18 [playlist_jingle:3] Finished with "/var/azuracast/stations/lahma/media/signo1.mp3".
2019/04/04 17:31:18 [lahma_next_song:3] Prepared "/var/azuracast/stations/lahma/media/12_mmn_-2312__ooo_01.mp3" (RID 48).
2019/04/04 17:31:18 [playlist_jingle:3] Prepared "/var/azuracast/stations/lahma/media/jingle-1.mp3" (RID 11).
2019/04/04 17:31:18 [rotate_6715:3] Switch to lahma_autodj_fallback with forgetful transition.
2019/04/04 17:31:18 [lahma_autodj_fallback:3] Switch to lahma_cue_cut.
2019/04/04 17:31:18 [lang:3] AzuraCast Feedback Response: OK
2019/04/04 17:33:00 [playlist_mt:3] Prepared "/var/azuracast/stations/lahma/media/urtar_nexus_barath_balint.mp3" (RID 37).
2019/04/04 17:33:00 [switch_6811:3] Switch to sequence_6796 with transition.
2019/04/04 17:33:00 [clock.wallclock_main:2] Source lahma_local_1 failed while streaming: Lang.Clock_conflict(_)!
2019/04/04 17:33:00 [clock.wallclock_main:3] Raised at file "lang/lang.ml", line 421, characters 10-46
2019/04/04 17:33:00 [clock.wallclock_main:3] Called from file "lang/lang_values.ml", line 971, characters 14-20
2019/04/04 17:33:00 [clock.wallclock_main:3] Called from file "list.ml", line 67, characters 20-23
2019/04/04 17:33:00 [clock.wallclock_main:3] Called from file "lang/lang_values.ml", line 875, characters 29-53
2019/04/04 17:33:00 [clock.wallclock_main:3] Called from file "lang/lang_values.ml", line 922, characters 39-50
2019/04/04 17:33:00 [clock.wallclock_main:3] Called from file "list.ml", line 67, characters 20-23
2019/04/04 17:33:00 [clock.wallclock_main:3] Called from file "list.ml", line 67, characters 32-39
2019/04/04 17:33:00 [clock.wallclock_main:3] Called from file "lang/lang_values.ml", line 922, characters 12-54
2019/04/04 17:33:00 [clock.wallclock_main:3] Called from file "lang/lang_values.ml", line 971, characters 14-20
2019/04/04 17:33:00 [clock.wallclock_main:3] Called from file "tools/tutils.ml", line 85, characters 14-18
2019/04/04 17:33:00 [clock.wallclock_main:3] Re-raised at file "tools/tutils.ml", line 85, characters 48-55
2019/04/04 17:33:00 [clock.wallclock_main:3] Called from file "operators/switch.ml", line 167, characters 22-185
2019/04/04 17:33:00 [clock.wallclock_main:3] Called from file "tools/tutils.ml", line 85, characters 14-18
2019/04/04 17:33:00 [clock.wallclock_main:3] Re-raised at file "tools/tutils.ml", line 85, characters 48-55
2019/04/04 17:33:00 [clock.wallclock_main:3] Called from file "source.ml", line 521, characters 8-22
2019/04/04 17:33:00 [clock.wallclock_main:3] Called from file "operators/on_metadata.ml", line 35, characters 6-11
2019/04/04 17:33:00 [clock.wallclock_main:3] Called from file "source.ml", line 521, characters 8-22
2019/04/04 17:33:00 [clock.wallclock_main:3] Called from file "outputs/output.ml", line 174, characters 8-18
2019/04/04 17:33:00 [clock.wallclock_main:3] Called from file "clock.ml", line 160, characters 17-25
2019/04/04 17:33:00 [lahma_local_1:3] Closing connection...
2019/04/04 17:33:00 [playlist_mt:3] Finished with "/var/azuracast/stations/lahma/media/urtar_nexus_barath_balint.mp3".
2019/04/04 17:33:00 [playlist_jingle:3] Finished with "/var/azuracast/stations/lahma/media/jingle-1.mp3".
2019/04/04 17:33:00 [lahma_next_song:3] Finished with "/var/azuracast/stations/lahma/media/12_mmn_-2312__ooo_01.mp3".
2019/04/04 17:33:00 [cross_6746:1] Got ill-balanced activations (from switch_6811)!
2019/04/04 17:33:00 [clock:2] Error when leaving output lahma_local_1: File "source.ml", line 414, characters 10-16: Assertion failed!
2019/04/04 17:33:00 [clock:3] Raised at file "source.ml", line 414, characters 10-22
2019/04/04 17:33:00 [clock:3] Called from file "source.ml", line 421, characters 30-58
2019/04/04 17:33:00 [clock:3] Called from file "source.ml", line 431, characters 8-18
2019/04/04 17:33:00 [clock:3] Called from file "list.ml", line 85, characters 12-15
2019/04/04 17:33:00 [clock:3] Called from file "source.ml", line 431, characters 8-18
2019/04/04 17:33:00 [clock:3] Called from file "source.ml", line 431, characters 8-18
2019/04/04 17:33:00 [clock:3] Called from file "clock.ml", line 79, characters 6-13
2019/04/04 17:33:00 [main:3] Shutdown started!
2019/04/04 17:33:00 [main:3] Waiting for threads to terminate...
2019/04/04 17:33:00 [threads:3] Shuting down thread wallclock_main
2019/04/04 17:33:00 [clock.wallclock_main:3] Streaming loop stopped.
2019/04/04 17:33:00 [threads:3] Thread "wallclock_main" terminated (0 remaining).
2019/04/04 17:33:00 [main:3] Threads terminated.
2019/04/04 17:33:00 [threads:3] Shutting down scheduler...
2019/04/04 17:33:00 [threads:3] Scheduler shut down.
2019/04/04 17:33:00 [threads:3] Shutting down queues...
2019/04/04 17:33:00 [threads:3] Thread "generic queue #2" terminated.
2019/04/04 17:33:00 [threads:3] Thread "non-blocking queue #1" terminated.
2019/04/04 17:33:00 [threads:3] Thread "non-blocking queue #2" terminated.
2019/04/04 17:33:00 [threads:3] Thread "generic queue #1" terminated.
2019/04/04 17:33:00 [threads:3] Queues shut down
2019/04/04 17:33:00 [server:3] Closing socket.
2019/04/04 17:33:00 [main:3] Cleaning downloaded files...
2019/04/04 17:33:00 [main:3] Freeing memory...

I compared the generated Liquidsoap config in 0.9.4.1 and 0.9.4.2 and noticed that the latter introduced "cue cuts".

In 0.9.4.1 a playlist config looks like this:

playlist_szmuti_csorba = audio_to_stereo(playlist(id="playlist_szmuti_csorba",reload_mode="watch",mode="randomize","/var/azuracast/stations/lahmacun_radio/playlists/playlist_szmuti_csorba.m3u"))

in 0.9.4.2 like this:

playlist_szmuti_csorba = playlist(id="playlist_szmuti_csorba",reload_mode="watch",mode="randomize","/var/azuracast/stations/lahma/playlists/playlist_szmuti_csorba.m3u")
playlist_szmuti_csorba = audio_to_stereo(playlist_szmuti_csorba)
playlist_szmuti_csorba = cue_cut(id="lahma_playlist_szmuti_csorba_cue_cut", playlist_szmuti_csorba)

What are cue cuts, why are they needed? Do they have to do with the error? If not, do you have any idea where the error comes from?

Another detail may also be relevant: I'm using a fresh installation on a new VPS. I have v0.9.4.1 on another machine where things work well. The two VPSs should be identical except the Azura versions.

Btw, our custom Liquidsoap config is something like this:

# Fade out off air music, play jingle, start playing show
def transition_into_show(j,a,b)
  add(normalize=false,
      [ sequence([fade.final(a),j,b]) ])
end

# Stop show (not fade out), play jingle, fade in off air music
def transition_into_off(j,a,b)
  add(normalize=false,
      [ sequence([fade.final(a),j,fade.initial(b)]) ])
end

radio = switch(track_sensitive=false, transitions=[ 
    transition_into_show(playlist_jingle),
    transition_into_off(playlist_jingle_after_show) ], [ 
    #Monday
    ({1w and 16h-17h}, once(playlist_szmuti_csorba)),  
... 
    ({true}, radio) ])
BusterNeece commented 5 years ago

@gammaw Are you on the latest rolling-release update, rather than the latest release version?

gammaw commented 5 years ago

@SlvrEagle23 my installation is on commit #59c896a, which is the latest commit on the master branch.

gammaw commented 5 years ago

@SlvrEagle23 it seems to be the transition's fault. If I remove the transition part in my custom Liquidsoap config (see below) then there is no error but also there is no fading. Like I said it did work with 0.9.4.1. Why is that?

radio = switch(track_sensitive=false, [ 
    #Monday
    ({1w and 16h-17h}, once(playlist_szmuti_csorba)),  
... 
    ({true}, radio) ]) 
gammaw commented 5 years ago

@SlvrEagle23 problem solved. The jingle playlist must be a custom playlist. I had it as an Azura playlist because I'm using it also between songs in Azura playlists. And it worked like this in 0.9.4.1. Anyway, now I have to jingle playlists one custom and one Azura sharing the same songs.