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 128 forks source link

2.0.0 (beta3 because later are dysfunctional) under windows sometimes freezes #2053

Closed pranza closed 2 years ago

pranza commented 2 years ago

after some time using it i discovered that sometimes it just freezes and it seems that more often it's after a harbour disconnects, let's see what happens when "studija" stops streaming live:

2021/11/11 17:01:40 [studija:2] Feeding stopped: Ffmpeg_decoder.End_of_file.
2021/11/11 17:01:46 [buffer.consumer_0:3] Source failed (no more tracks) stopping output...
2021/11/11 17:01:57 [buffer.producer_0:3] Buffer emptied, start buffering...
2021/11/11 17:01:57 [D:/%M.wav:3] Source failed (no more tracks) stopping output...
2021/11/11 17:01:57 [switch_8:3] Switch to switch_6 with forgetful transition.
2021/11/11 17:07:58 [decoder:2] Decoding "D:/Anyway That You Want Me.mp3" ended: Ffmpeg_decoder.End_of_file.
2021/11/11 17:07:59 [recurrent:3] Prepared "D:/Rainforest Spiritual Enslavement - Metallic Rain.mp3" (RID 8).
2021/11/11 17:07:59 [switch_2:3] Switch to map_metadata_5 with forgetful transition.

and suddenly nothing else in the log, no more entry of liquidsoap stream present in icecaster, can't stop the service nicely either:

2021/11/11 17:21:49 [main:3] Shutdown started!
2021/11/11 17:21:49 [main:3] Waiting for main threads to terminate...

and it never terminates, must kill forcefully.

toots commented 2 years ago

Hi.

Thanks for this report. We're about to update the windows build image to OCaml 4.12.0. I'll follow-up here to see if the new build does help.

pranza commented 2 years ago

heyy Romain! good to know, looking forward to it :)

p

-----Original Message----- From: Romain Beauxis Date: 2021 m. lapkričio 14 d. 18:11 To: savonet/liquidsoap Cc: pranza ; Author Subject: Re: [savonet/liquidsoap] 2.0.0 (beta3 because later are dysfunctional) under windows sometimes freezes (Issue #2053)

Hi.

Thanks for this report. We're about to update the windows build image to OCaml 4.12.0. I'll follow-up here to see if the new build does help.

toots commented 2 years ago

Hi!

Could you try the windows build here: https://github.com/savonet/liquidsoap/actions/runs/1501258548 ?

This is the first ever windows build using OCaml 4.12.0. Also, we found a pretty intricate bug with memory allocation in https://github.com/savonet/liquidsoap/issues/2054 that could potentially explain the issues you were seeing..

Fingers crossed..

pranza commented 2 years ago

Hi Romain! Cool, it works! however, with one radio that has metadata rewrite most of the time ON, it always writes UNKNOWN instead of the track name i do it this way:

def recurrent_metadata(m) = artist = m["artist"] [("artist", "Laikas eina per miestą: #{artist}")] end recurrent=map_metadata(recurrent_metadata, recurrent)

but i'm not even getting Laikas eina per miestą: Unknown, just Unknown... so it must be that the metadata rewrite function does not work and also does not let the original track name through (my other radio without metadata rewrite is showing metadata).

cheers! p

-----Original Message----- From: Romain Beauxis Date: 2021 m. lapkričio 24 d. 23:47 To: savonet/liquidsoap Cc: pranza ; Author Subject: Re: [savonet/liquidsoap] 2.0.0 (beta3 because later are dysfunctional) under windows sometimes freezes (Issue #2053)

Hi!

Could you try the windows build here: https://github.com/savonet/liquidsoap/actions/runs/1501258548 ?

This is the first ever windows build using OCaml 4.12.0. Also, we found a pretty intricate bug with memory allocation in #2054 that could potentially explain the issues you were seeing..

Fingers crossed..

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

pranza commented 2 years ago

half a day into it and now it shows "-" instead of "Unknown". let's see what comes when we have a broadcast without any metadata rewrites....

p

pranza commented 2 years ago

so yes, when there is no metadata manipulations happening in liquidsoap, it goes through to icecaster just fine.

if i use def and map metadata, it does not, giving an empty string perhaps (that's why icecaster is writing "Unknown?"), or just a dash.

p

toots commented 2 years ago

Ok thanks. Any update on memory usage?

pranza commented 2 years ago

the largest radio process is at around 600MB and still growing now and smaller ones are at around 110-160MB. however, the one having issues with metadata and the one that had active harbors playing today is NOT the largest in memory usage. hmmm:)

Pranas

-----Original Message----- From: Romain Beauxis Date: 2021 m. lapkričio 25 d. 15:08 To: savonet/liquidsoap Cc: pranza ; Author Subject: Re: [savonet/liquidsoap] 2.0.0 (beta3 because later are dysfunctional) under windows sometimes freezes (Issue #2053)

Ok thanks. Any update on memory usage?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

pranza commented 2 years ago

ahh, i can see why the memory usage of one radio is so small - it has recently crashed and restarted as per my script...:) so perhaps the new ocaml didn't help and now there is an interesting issue with map metadata...

p

stale[bot] commented 2 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.

stale[bot] commented 2 years ago

This issue was closed for lack of activity. If you believe that it is still relevant, please confirm that it applies to the latest released version of liquidsoap and re-open the ticket. Thanks!