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.41k stars 130 forks source link

Windows – unexpected shutdown Lang_errors.Clock_conflict(_)! #985

Closed pranza closed 4 years ago

pranza commented 5 years ago

It happens every morning around 8 o'clock. after the night playlist has to switch to something else:

2019/10/11 08:03:54 [quartz:3] Prepared "D:/airy/quartz/Deaf center - pale ravine [2005]/06-deaf_center-weir-just.mp3" (RID 31).
2019/10/11 08:03:54 [switch_8373:3] Switch to map_metadata_8282 with forgetful transition.
2019/10/11 08:03:54 [clock.wallclock_main:2] Source radio(dot)audiomastering(dot)lt(dot)3 failed while streaming: Lang_errors.Clock_conflict(_)!
2019/10/11 08:03:54 [clock.wallclock_main:3] Raised at file "lang/lang.ml", line 422, characters 10-58
2019/10/11 08:03:54 [clock.wallclock_main:3] Called from file "lang/lang_values.ml", line 1027, characters 14-20
2019/10/11 08:03:54 [clock.wallclock_main:3] Called from file "lang/lang_values.ml", line 1027, characters 14-20
2019/10/11 08:03:54 [clock.wallclock_main:3] Called from file "tools/tutils.ml", line 83, characters 14-18
2019/10/11 08:03:54 [clock.wallclock_main:3] Re-raised at file "tools/tutils.ml", line 83, characters 48-55
2019/10/11 08:03:54 [clock.wallclock_main:3] Called from file "operators/switch.ml", line 169, characters 22-185
2019/10/11 08:03:54 [clock.wallclock_main:3] Called from file "tools/tutils.ml", line 83, characters 14-18
2019/10/11 08:03:54 [clock.wallclock_main:3] Re-raised at file "tools/tutils.ml", line 83, characters 48-55
2019/10/11 08:03:54 [clock.wallclock_main:3] Called from file "source.ml", line 525, characters 8-22
2019/10/11 08:03:54 [clock.wallclock_main:3] Called from file "operators/switch.ml", line 212, characters 10-15
2019/10/11 08:03:54 [clock.wallclock_main:3] Called from file "source.ml", line 525, characters 8-22
2019/10/11 08:03:54 [clock.wallclock_main:3] Called from file "operators/cross.ml", line 259, characters 15-25
2019/10/11 08:03:54 [clock.wallclock_main:3] Called from file "operators/cross.ml", line 216, characters 12-26
2019/10/11 08:03:54 [clock.wallclock_main:3] Called from file "source.ml", line 525, characters 8-22
2019/10/11 08:03:54 [clock.wallclock_main:3] Called from file "source.ml", line 525, characters 8-22
2019/10/11 08:03:54 [clock.wallclock_main:3] Called from file "operators/on_metadata.ml", line 35, characters 6-11
2019/10/11 08:03:54 [clock.wallclock_main:3] Called from file "source.ml", line 525, characters 8-22
2019/10/11 08:03:54 [clock.wallclock_main:3] Called from file "operators/add.ml", line 128, characters 15-20
2019/10/11 08:03:54 [clock.wallclock_main:3] Called from file "list.ml", line 121, characters 24-34
2019/10/11 08:03:54 [clock.wallclock_main:3] Called from file "operators/add.ml", line 114, characters 6-1023
2019/10/11 08:03:54 [clock.wallclock_main:3] Called from file "source.ml", line 525, characters 8-22
2019/10/11 08:03:54 [clock.wallclock_main:3] Called from file "operators/noblank.ml", line 104, characters 6-16
2019/10/11 08:03:54 [clock.wallclock_main:3] Called from file "source.ml", line 525, characters 8-22
2019/10/11 08:03:54 [clock.wallclock_main:3] Called from file "operators/sequence.ml", line 83, characters 8-14
2019/10/11 08:03:54 [clock.wallclock_main:3] Called from file "source.ml", line 525, characters 8-22
2019/10/11 08:03:54 [clock.wallclock_main:3] Called from file "operators/switch.ml", line 212, characters 10-15
2019/10/11 08:03:54 [clock.wallclock_main:3] Called from file "source.ml", line 539, characters 12-26
2019/10/11 08:03:54 [clock.wallclock_main:3] Called from file "operators/compress.ml", line 47, characters 4-14
2019/10/11 08:03:54 [clock.wallclock_main:3] Called from file "source.ml", line 525, characters 8-22
2019/10/11 08:03:54 [clock.wallclock_main:3] Called from file "operators/compress.ml", line 47, characters 4-14
2019/10/11 08:03:54 [clock.wallclock_main:3] Called from file "source.ml", line 539, characters 12-26
2019/10/11 08:03:54 [clock.wallclock_main:3] Called from file "outputs/output.ml", line 174, characters 8-18
2019/10/11 08:03:54 [clock.wallclock_main:3] Called from file "clock.ml", line 160, characters 17-25
2019/10/11 08:03:54 [radio(dot)audiomastering(dot)lt(dot)3:3] Closing connection...
2019/10/11 08:03:54 [naktinis:3] Prepared "D:\\Fonoteka\\gabalai\\CD\\multila (2000)\\01 - ranta.flac" (RID 15).
2019/10/11 08:03:54 [main:3] Shutdown started!
2019/10/11 08:03:54 [main:3] Waiting for main threads to terminate...
2019/10/11 08:03:54 [radio(dot)audiomastering(dot)lt:3] Closing connection...
2019/10/11 08:03:54 [radio(dot)audiomastering(dot)lt(dot)1:3] Closing connection...
2019/10/11 08:03:54 [radio(dot)audiomastering(dot)lt(dot)2:3] Closing connection...
2019/10/11 08:03:54 [naktinis:1] Got ill-balanced activations (from switch_8373)!
2019/10/11 08:03:54 [clock:2] Error when leaving output radio(dot)audiomastering(dot)lt(dot)2: File "source.ml", line 417, characters 10-16: Assertion failed!
2019/10/11 08:03:54 [clock:3] Raised at file "source.ml", line 417, characters 10-22
2019/10/11 08:03:54 [clock:3] Called from file "source.ml", line 424, characters 30-58
2019/10/11 08:03:54 [clock:3] Called from file "source.ml", line 434, characters 8-18
2019/10/11 08:03:54 [clock:3] Called from file "source.ml", line 434, characters 8-18
2019/10/11 08:03:54 [clock:3] Called from file "operators/cross.ml", line 108, characters 4-11
2019/10/11 08:03:54 [clock:3] Called from file "source.ml", line 434, characters 8-18
2019/10/11 08:03:54 [clock:3] Called from file "list.ml", line 110, characters 12-15
2019/10/11 08:03:54 [clock:3] Called from file "source.ml", line 434, characters 8-18
2019/10/11 08:03:54 [clock:3] Called from file "list.ml", line 110, characters 12-15
2019/10/11 08:03:54 [clock:3] Called from file "source.ml", line 434, characters 8-18
2019/10/11 08:03:54 [clock:3] Called from file "list.ml", line 110, characters 12-15
2019/10/11 08:03:54 [clock:3] Called from file "source.ml", line 434, characters 8-18
2019/10/11 08:03:54 [clock:3] Called from file "list.ml", line 110, characters 12-15
2019/10/11 08:03:54 [clock:3] Called from file "source.ml", line 434, characters 8-18
2019/10/11 08:03:54 [clock:3] Called from file "list.ml", line 110, characters 12-15
2019/10/11 08:03:54 [clock:3] Called from file "source.ml", line 434, characters 8-18
2019/10/11 08:03:54 [clock:3] Called from file "source.ml", line 434, characters 8-18
2019/10/11 08:03:54 [clock:3] Called from file "list.ml", line 110, characters 12-15
2019/10/11 08:03:54 [clock:3] Called from file "source.ml", line 434, characters 8-18
2019/10/11 08:03:54 [clock:3] Called from file "source.ml", line 434, characters 8-18
2019/10/11 08:03:54 [clock:3] Called from file "clock.ml", line 79, characters 6-13
2019/10/11 08:03:54 [clock.wallclock_main:3] Streaming loop stopped.
2019/10/11 08:03:54 [main:3] Threads terminated.
2019/10/11 08:03:54 [threads:3] Shutting down scheduler...
2019/10/11 08:03:54 [threads:3] Scheduler shut down.
2019/10/11 08:03:54 [threads:3] Waiting for queue threads to terminate...
2019/10/11 08:03:54 [threads:3] Queues shut down
2019/10/11 08:03:54 [server:3] Closing socket.
2019/10/11 08:03:54 [main:3] Cleaning downloaded files...
2019/10/11 08:03:54 [main:3] Freeing memory...
2019/10/11 08:03:54 >>> LOG END

the fallback system is as follows and the shutdown occurs at transition from "naktinis" to "quartz":

radio = fallback(track_sensitive=false,
                 [pageidavimai, mm, lawx, tiesiogiai, switch(track_sensitive=true, transitions=[ chik(dzinglas) ],[
            ({ 1w and 13h-15h }, lietmuz),
            ({ 4w and 22h-23h59 }, ske),
            ({ 6w and 13h-15h00 }, ske)]),
            laida, traktorius, lopageidavimai, lovebar, switch(track_sensitive=true, transitions=[ chik(dzinglas) ],[
            ({ 2w and 10h }, minmon),
            ({ 2w and 21h-23h59 }, red1),
            ({ 3w and 15h-17h }, maumai),
            ({ 4w and 20h-21h59 }, coldtear),
            ({ 5w and 19h-23h }, mano),
            ({ 7w and 14h}, lovekart)]),
            switch(track_sensitive=true, transitions=[ chik(dzinglas) ],[
            ({ 8h-9h }, quartz),
            ({ 9h-0h }, dieninis),
            ({ 0h-8h }, naktinis)])])

Version details

Please let me know if any other info is needed.

toots commented 5 years ago

Hi,

Thanks for the report. It does look like a bug. What are the definitions of quartz and naktinis?

pranza commented 5 years ago

hello!

that's what you asked for:

quartz = playlist(id="quartz", "D:/airy/quartz", reload_mode="watch")
naktinis = playlist(id="naktinis", mode="random", reload_mode="rounds",reload=1, "L:/archyvas/radijos/naktis.m3u")

and i also noticed my simple radio also has a weird problem - it runs out of tracks on a random playlist after a while:

2019/10/08 09:30:22 [radio(dot)audiomastering(dot)lt:3] Closing connection...
2019/10/08 10:30:00 [dzingl:3] Prepared "D:/airy/fluxnair/fluxdzingl.wav" (RID 0).
2019/10/08 10:30:00 [radio(dot)audiomastering(dot)lt:3] Connecting mount fluxnair for source@localhost...
2019/10/08 10:30:00 [radio(dot)audiomastering(dot)lt:3] Connection setup was successful.
2019/10/08 10:30:00 [switch_8133:3] Switch to dzingl.
2019/10/08 10:30:22 [radio(dot)audiomastering(dot)lt:3] Source failed (no more tracks) stopping output...
2019/10/08 10:30:22 [radio(dot)audiomastering(dot)lt:3] Closing connection...
2019/10/08 11:30:00 [dzingl:3] Prepared "D:/airy/fluxnair/fluxdzingl.wav" (RID 0).
2019/10/08 11:30:00 [radio(dot)audiomastering(dot)lt:3] Connecting mount fluxnair for source@localhost...
2019/10/08 11:30:00 [radio(dot)audiomastering(dot)lt:3] Connection setup was successful.
2019/10/08 11:30:00 [switch_8133:3] Switch to dzingl.
2019/10/08 11:30:22 [radio(dot)audiomastering(dot)lt:3] Source failed (no more tracks) stopping output...

that one had just one thing going without any fallbacks: playlist(id="dieninis", mode="random", reload_mode="rounds", reload=1, "D:/airy/fluxnair")

now i replaced it with this: dieninis = playlist(id="dieninis", mode="random", reload_mode="watch", reload=3600, "D:/airy/fluxnair") and will check how it goes...:)

regards, Pranas

toots commented 5 years ago

Thanks for providing those details. The error that you are seeing is not consistent with your script, there shouldn't be any error at all.

Since you've been having so much trouble with other, unrelated things, I am suspecting some problem of a different nature, essentially some sort of stack corruption.

Could you let me know the exact architecture of your windows server and the exact liquidsoap zip archive that you have used? I will try to reproduce locally then.

pranza commented 4 years ago

Sent everything via email to you!

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

toots commented 4 years ago

Hi! I think I'm gonna need more of your script to be able to debug this one. Any chance you could provide the whole of it? Feel free to email it to: toots@rastageeks.org if needed.

pranza commented 4 years ago

hi Romain!

i think i've sent you the configs earlier several times, it might have been from pranza@gmail.com or this one. could you please check?

regards, p

On 25 Jul 2020, at 18:37, Romain Beauxis notifications@github.com wrote:

Hi! I think I'm gonna need more of your script to be able to debug this one. Any chance you could provide the whole of it? Feel free to email it to: toots@rastageeks.org if needed.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

toots commented 4 years ago

I think that I see your issue from your muilas script. It seems to be coming from the dzinglas source. Here's the reason why it happens:

A simple solution is to define that source twice, for instance:

dzinglas = single(id="dzingl", "D:/Fonoteka/Garsai/poch.mp3")
radio = add([radio, switch([({30m31s},dzinglas)])])

Then, each instance will be attached to a different clock.

I will push a better error report message for this error and close this issue.

Hope that helped. Make sure to check your script for similar situations with other sources!

Thanks for reporting!

pranza commented 4 years ago

thanks, Romain! would never have guessed that...:) let's see how it works now.

regards, p