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

LIQUIDSOAP 2.0 CRASHING #2028

Closed glenbuck1 closed 2 years ago

glenbuck1 commented 2 years ago

After running for several days, the script stops running; the first time it showed a memory error in the log, the second time, it just stopped without any warning or error message.

I have attached a partial log from both incidents showing script start-up and error message together with the portion of the log when it stopped without warning! I am also attaching the script file and have sent the file causing first failure privately.

A clear and concise description of what the bug is. Add some script and log extract so we can see what is happening. Don't forget to add some context although not necessarily your whole script..

To Reproduce A minimal script to reproduce the issue is the most efficient way to have your bug addressed and fixed very quickly! n/a Expected behavior A clear and concise description of what you expected to happen. Continue running until stopped manually EVersion details

Install method Did you install via opam? Using your distribution's packages? From source? Yes Common issues Can't decode or encode in some audio format? Check if you have installed the correct dependencies PartialAutoDJ.log autodj.txt

toots commented 2 years ago

Hi & thanks for the report!

I believe that the file's cover art metadata is very likely to trigger the issue. I have tested it with our internal id3v2 tag decoder as well as taglib and neither of these seem to have problem with it.

Thus, I suspect the error comes from the mad decoder.

I can also confirm that the ffmpeg decoder seems to be working fine with it.

Thus, I would recommend to install the ffmpeg decoder. This should take precedence over the mad decoder and, hopefully, fix your issue.

glenbuck1 commented 2 years ago

Hi,

Thanks for your investigation and conclusion. Forgive my ignorance but how do I install the ffmpeg decoder, please, and ensure that it is used rather than the mad decoder?

As there was no error message for the second failure, do you think it likely that the mad decoder was the cause here, too? For info, we had another failure on Sunday morning and, again, sadly without any error being written to the log.

Thanks again for your help.

Richard Bartholomew

From: Romain Beauxis @.> Sent: 25 October 2021 14:57 To: savonet/liquidsoap @.> Cc: glenbuck1 @.>; Author @.> Subject: Re: [savonet/liquidsoap] LIQUIDSOAP 2.0 CRASHING (Issue #2028)

Hi & thanks for the report!

I believe that the file's cover art metadata is very likely to trigger the issue. I have tested it with our internal id3v2 tag decoder as well as taglib and neither of these seem to have problem with it.

Thus, I suspect the error comes from the mad decoder.

I can also confirm that the ffmpeg decoder seems to be working fine with it.

Thus, I would recommend to install the ffmpeg decoder. This should take precedence over the mad decoder and, hopefully, fix your issue.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/savonet/liquidsoap/issues/2028#issuecomment-950955389 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AG3GDAIKJXW6NR3LOZZAUCTUIVOZNANCNFSM5GSFIXHA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .

toots commented 2 years ago

If you installed via opam, doing:

opam install ffmpeg

Should take care of the issue!

glenbuck1 commented 2 years ago

Hi,

Thanks, we did and so I shall make the change once our live shows start at 5 PM today.

Thanks again

Richard Bartholomew

From: Romain Beauxis @.> Sent: 25 October 2021 15:22 To: savonet/liquidsoap @.> Cc: glenbuck1 @.>; Author @.> Subject: Re: [savonet/liquidsoap] LIQUIDSOAP 2.0 CRASHING (Issue #2028)

If you installed via opam, doing:

opam install ffmpeg

Should take care of the issue!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/savonet/liquidsoap/issues/2028#issuecomment-950980550 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AG3GDAKGWH6YNSFPXAMZVTDUIVRW3ANCNFSM5GSFIXHA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .

toots commented 2 years ago

Great. Just to make sure, you should have seen liquidsoap being recompiled when you installed ffmpeg.

glenbuck1 commented 2 years ago

Thanks, I'll keep an eye on that when I do it.

Just to be clear...after installing ffmpeg, do I need to explicitly set any parameters to use it in the script file?

Regards

Richard Bartholomew

From: Romain Beauxis @.> Sent: 25 October 2021 16:08 To: savonet/liquidsoap @.> Cc: glenbuck1 @.>; Author @.> Subject: Re: [savonet/liquidsoap] LIQUIDSOAP 2.0 CRASHING (Issue #2028)

Great. Just to make sure, you should have seen liquidsoap being recompiled when you installed ffmpeg.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/savonet/liquidsoap/issues/2028#issuecomment-951024707 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AG3GDAPJT3DD5OO77THXO53UIVXGTANCNFSM5GSFIXHA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .

toots commented 2 years ago

No. Be default, ffmpeg is always preferred over mad for decoding.

glenbuck1 commented 2 years ago

Hi,

Sorry for this but...I got the following errors and unsure how to install the missing dependencies! Any more advice, please?

<><> Gathering sources ><><><><><><><><><><><><><><><><><><><><><><><><><><><><>

[ffmpeg.1.0.1] downloaded from cache at https://opam.ocaml.org/cache

[ffmpeg-avdevice.1.0.1] found in cache

[ffmpeg-avfilter.1.0.1] found in cache

[ffmpeg-avutil.1.0.1] found in cache

[ffmpeg-swresample.1.0.1] found in cache

[ffmpeg-swscale.1.0.1] found in cache

[liquidsoap.2.0.0] found in cache

[ffmpeg-av.1.0.1] downloaded from cache at https://opam.ocaml.org/cache

[ffmpeg-avcodec.1.0.1] downloaded from cache at https://opam.ocaml.org/cache

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>

[ERROR] The compilation of conf-ffmpeg failed at "/home/radio/.opam/opam-init/hooks/sandbox.sh build pkg-config --exists

    libavutil libavformat libavcodec libavdevice libavfilter libswresample libswscale".                               

=== ERROR while compiling conf-ffmpeg.1 ======================================

context 2.0.8 | linux/x86_64 | ocaml-system.4.11.1 | https://opam.ocaml.org#a1eb0022

path ~/.opam/default/.opam-switch/build/conf-ffmpeg.1

command ~/.opam/opam-init/hooks/sandbox.sh build pkg-config --exists libavutil libavformat libavcodec libavdevice li

bavfilter libswresample libswscale

exit-code 1

env-file ~/.opam/log/conf-ffmpeg-348851-038aac.env

output-file ~/.opam/log/conf-ffmpeg-348851-038aac.out

<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>

┌─ The following actions failed

│ λ build conf-ffmpeg 1

└─

╶─ No changes have been performed

The packages you requested declare the following system dependencies. Please make sure they are installed before

retrying:

libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev         

From: Romain Beauxis @.> Sent: 25 October 2021 16:08 To: savonet/liquidsoap @.> Cc: glenbuck1 @.>; Author @.> Subject: Re: [savonet/liquidsoap] LIQUIDSOAP 2.0 CRASHING (Issue #2028)

Great. Just to make sure, you should have seen liquidsoap being recompiled when you installed ffmpeg.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/savonet/liquidsoap/issues/2028#issuecomment-951024707 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AG3GDAPJT3DD5OO77THXO53UIVXGTANCNFSM5GSFIXHA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .

toots commented 2 years ago

You need to install the external dependencies first. This should do both steps at once:

opam depext -i ffmpeg
glenbuck1 commented 2 years ago

Hi,

Thanks for this, very helpful but I'll need to wait until the morning before I can do this.

Thanks again'

Richard Bartholomew

From: Romain Beauxis @.> Sent: 25 October 2021 19:30 To: savonet/liquidsoap @.> Cc: glenbuck1 @.>; Author @.> Subject: Re: [savonet/liquidsoap] LIQUIDSOAP 2.0 CRASHING (Issue #2028)

You need to install the external dependencies first. This should do both steps at once:

opam depext -i ffmpeg

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/savonet/liquidsoap/issues/2028#issuecomment-951192209 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AG3GDALXUXJRCWROOMWEPBTUIWO4HANCNFSM5GSFIXHA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .

glenbuck1 commented 2 years ago

Morning, Romain

Just to let you know that I've now successfully installed ffmpeg and, as you said, it is being used as the default decoder.

I need to leave our autodj running now but will set up a test mountpoint and force through the files which caused the problem last week.

Thanks again for your help.

Richard Bartholomew

From: Romain Beauxis @.> Sent: 25 October 2021 19:30 To: savonet/liquidsoap @.> Cc: glenbuck1 @.>; Author @.> Subject: Re: [savonet/liquidsoap] LIQUIDSOAP 2.0 CRASHING (Issue #2028)

You need to install the external dependencies first. This should do both steps at once:

opam depext -i ffmpeg

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/savonet/liquidsoap/issues/2028#issuecomment-951192209 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AG3GDALXUXJRCWROOMWEPBTUIWO4HANCNFSM5GSFIXHA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .

glenbuck1 commented 2 years ago

Hi,

Sadly, installing ffmpeg hasn't fixed the problem...it fell over again today within six hours of startup! There were a number of 'out of memory' errors this time but don't seem to have directly caused the crash, I don't think.

I'll attach the whole log file for today to the bug report as it's not too big.

Regards

Richard Bartholomew

From: Romain Beauxis @.> Sent: 25 October 2021 19:30 To: savonet/liquidsoap @.> Cc: glenbuck1 @.>; Author @.> Subject: Re: [savonet/liquidsoap] LIQUIDSOAP 2.0 CRASHING (Issue #2028)

You need to install the external dependencies first. This should do both steps at once:

opam depext -i ffmpeg

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/savonet/liquidsoap/issues/2028#issuecomment-951192209 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AG3GDALXUXJRCWROOMWEPBTUIWO4HANCNFSM5GSFIXHA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .

glenbuck1 commented 2 years ago

This is the previously-mentioned log file. autodj6.log Duplicate of #1935

toots commented 2 years ago

Have you tried removing mad entirely?

toots commented 2 years ago

Hi! Any update on this issue?

glenbuck1 commented 2 years ago

Hi,

Sorry for delay in replying...

The crashes are still happening but at a much less frequent rate I'm pleased to say. Generally, there seems to be about nine or ten days between them but, still, when they do occur, there is no error message or warning in the log. Memory and swap usage is low so that shouldn't be a factor.

I am managing the situation by running a cron job to monitor for the liquidsoap process and, if it's not, restarting it – not ideal but a workaround.

Thanks

Richard Bartholomew

From: Romain Beauxis @.> Sent: 23 November 2021 20:42 To: savonet/liquidsoap @.> Cc: glenbuck1 @.>; State change @.> Subject: Re: [savonet/liquidsoap] LIQUIDSOAP 2.0 CRASHING (Issue #2028)

Hi! Any update on this issue?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/savonet/liquidsoap/issues/2028#issuecomment-977153165 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AG3GDAMEMYEQA3HXA4S3EZ3UNP4ARANCNFSM5GSFIXHA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .

oranjebloom commented 2 years ago

Hi @toots and @glenbuck1 , I would also like to report that I am experiencing the same ... version 2.0.0 crashes on Debian Buster installed via opam. I did a clean install of Liquidsoap without mad and only ffmpeg. With mad it ran for about 7 days before it crashed, but with ffmpeg it only took 1 day. Please let me know what I can provide to help diagnose the problem. I already have the logs set to debug but I don't see anything suspicious. The daemon logs showed this ...

Nov 27 07:52:16 systrum systemd[1]: ssr2.liq-liquidsoap.service: Main process exited, code=killed, status=6/ABRT
Nov 27 07:52:16 systrum systemd[1]: ssr2.liq-liquidsoap.service: Failed with result 'signal'.
Nov 27 07:52:16 systrum systemd[1]: ssr2.liq-liquidsoap.service: Service RestartSec=100ms expired, scheduling restart.
Nov 27 07:52:16 systrum systemd[1]: ssr2.liq-liquidsoap.service: Scheduled restart job, restart counter is at 1.
Nov 27 07:52:16 systrum systemd[1]: Stopped ssr2.liq Liquidsoap daemon.
Nov 27 07:52:16 systrum systemd[1]: Starting ssr2.liq Liquidsoap daemon...
Nov 27 07:52:16 systrum liquidsoap[30548]: File /home/db/liquidsoap-daemon/script/ssr2.liq, line 15, char 0:
Nov 27 07:52:16 systrum liquidsoap[30548]: Warning 4: Unused variable metadata
Nov 27 07:52:16 systrum liquidsoap[30548]: File /home/db/liquidsoap-daemon/script/ssr2.liq, line 29, char 0:
Nov 27 07:52:16 systrum liquidsoap[30548]: Warning 4: Unused variable s
Nov 27 07:52:17 systrum systemd[1]: ssr2.liq-liquidsoap.service: Supervising process 30553 which is not our child. We'll most likely not notice when it exits.
Nov 27 07:52:17 systrum systemd[1]: Started ssr2.liq Liquidsoap daemon.
oranjebloom commented 2 years ago

I should also add that in order to filter out the cover art metadata, I added the following lines to my script.

#REMOVE METADATA COVER
#https://github.com/savonet/liquidsoap/issues/1872
#https://github.com/savonet/liquidsoap/issues/1590
#https://github.com/martinkirch/showergel/issues/20
def remove_metadata_cover(metadata) =
  [
    ("cover", ""),
    ("apic", "")
  ]
end

as well as the following line after ever source ...

source = map_metadata(strip=true, remove_metadata_cover, source)

This probably explains the warning I get in the daemon logs when I start the liquidsoap service

Nov 27 07:52:16 systrum liquidsoap[30548]: File /home/db/liquidsoap-daemon/script/ssr2.liq, line 15, char 0:
Nov 27 07:52:16 systrum liquidsoap[30548]: Warning 4: Unused variable metadata

@toots could this be part of the reason for the crashes?

toots commented 2 years ago

Hi @oranjebloom. I don't think that this would be the issue..

Are you familiar with enabling core dumps? A core dump of the crash along with the liquidsoap binary would point us directly to the stack trace of the crash, which would help a lot to fix it.

Here's what we do in our CI to enable core dumps:

          ulimit -c unlimited
          mkdir -p /tmp/${{ github.run_number }}/core
          chown -R opam /tmp/${{ github.run_number }}/core
          echo /tmp/${{ github.run_number }}/core/core.%h.%e.%t > /proc/sys/kernel/core_pattern
oranjebloom commented 2 years ago

Hi and thanks for the reply. I'll enable the core dump and let you know when I have something you can work with.

glenbuck1 commented 2 years ago

Hi,

Since updating to this version from 2.0.0 on 6 December, I seem to be having a problem with a show which is scheduled to run at 14:00 GMT on a Saturday.

On 11 December, the file attempting to be picked up was the previous one in the *.pls file rather than the current one; then, after a few minutes, the current file was finally loaded and started playing.

Today, 18 December, the file is not being picked up at all and the music defined up to 14:00 is continuing to be played.

I have attached the script file for info and the relevant entries are those relating to FlashbackYears.

This was running successfully up until 11 December so I am not sure what has changed and why the problem has started. If anyone has any ideas, please, I'd be most grateful.

Thanks for any help.

Richard Bartholomew

set("log.file.path","/home/radio/logs/autodj.log")

settings.path.to.key.set(/home/radio/logs/autodj.log)

playlists

jingles=audio_to_stereo(mksafe(normalize(playlist("/home/radio/jingles")))) Sixties=audio_to_stereo(mksafe(normalize(playlist("/home/radio/music/decades/60s70s80s/1960s")))) Seventies=audio_to_stereo(mksafe(normalize(playlist("/home/radio/music/decades/60s70s80s/1970s")))) Eighties=audio_to_stereo(mksafe(normalize(playlist("/home/radio/music/decades/60s70s80s/1980s")))) Nineties=audio_to_stereo(mksafe(normalize(playlist("/home/radio/music/decades/90s00s10s20s")))) SixtiesPlus=audio_to_stereo(mksafe(normalize(playlist("/home/radio/music/decades/60s70s80s")))) NinetiesPlus=audio_to_stereo(mksafe(normalize(playlist("/home/radio/music/decades/90s00s10s20s")))) Breakfast=audio_to_stereo(mksafe(normalize(playlist("/home/radio/music/BreakfastClub")))) Christmas=audio_to_stereo(mksafe(normalize(playlist("/home/radio/music/Christmas")))) MondayPM=audio_to_stereo(mksafe(normalize(playlist(mode="normal", "/home/radio/playlists/MondayPM.pls")))) WednesdayPM=audio_to_stereo(mksafe(normalize(playlist(mode="normal", "/home/radio/playlists/WednesdayPM.pls")))) MemoryLane=audio_to_stereo(mksafe(normalize(playlist(mode="normal", "/home/radio/playlists/MemoryLane.pls")))) GarageRock=audio_to_stereo(mksafe(normalize(playlist(mode="normal", "/home/radio/playlists/GarageRock.pls")))) FlashbackYears=audio_to_stereo(mksafe(normalize(playlist(mode="normal", "/home/radio/playlists/FlashbackYears.pls")))) Worship=audio_to_stereo(mksafe(normalize(playlist(mode="normal", "/home/radio/playlists/Worship.pls"))))

scheduling

Monday=mksafe(switch(track_sensitive=false, [({0h-13h}, SixtiesPlus), ({13h-14h}, MondayPM), ({14h-20h}, SixtiesPlus), ({20h-22h}, NinetiesPlus), ({22h-0h}, SixtiesPlus)])) Tuesday=mksafe(switch(track_sensitive=false, [({0h-14h}, SixtiesPlus), ({14h-16h}, NinetiesPlus), ({16h-0h}, SixtiesPlus)])) Wednesday=mksafe(switch(track_sensitive=false, [({0h-3h}, MemoryLane), ({3h-15h}, SixtiesPlus), ({15h-17h}, WednesdayPM), ({17h-20h}, Seventies), ({20h-22h}, Sixties), ({22h-0h}, SixtiesPlus)])) Thursday=mksafe(switch(track_sensitive=false, [({0h-14h}, SixtiesPlus), ({14h-17h}, Eighties), ({17h-0h}, SixtiesPlus)])) Friday=mksafe(switch(track_sensitive=false, [({0h-1h}, GarageRock), ({1h-0h}, SixtiesPlus)])) Saturday=mksafe(switch(track_sensitive=false, [({0h-14h}, SixtiesPlus), ({14h-15h}, FlashbackYears), ({15h-0h}, SixtiesPlus)])) Sunday=mksafe(switch(track_sensitive=false, [({0h-7h}, SixtiesPlus), ({7h-10h}, Worship), ({10h-0h}, SixtiesPlus)]))

radio=mksafe(switch(track_sensitive=false, [({1w}, Monday), ({2w}, Tuesday), ({3w}, Wednesday), ({4w}, Thursday), ({5w}, Friday), ({6w}, Saturday), ({7w}, Sunday)])) radio=mksafe(crossfade(smart=true, rotate(weights=[1, 3, 2], [jingles, Christmas, radio]))) output.icecast(%mp3(bitrate=192), name="The Phoenix Radio Record Machine", host="listen.phoenixradio1208.com", password="", port=8020, mount="autodj", radio)

glenbuck1 commented 2 years ago

Hi, again

Further to my earlier message, The FlashbackYears.pls finally started playing at 14:27:01 rather than 14:00:00 so would still really appreciate some enlightenment, if possible, please.

Thanks

Richard Bartholomew

oranjebloom commented 2 years ago

Hi @toots, as instructed, I enabled core dumps on my Debian VDS and after 8 days of running version 2.0.0 it crashed. I have a link for you to download the core dump for that instance which I started via the Liquidsoap deamon.

https://systrum.net/core.systrum.zip

toots commented 2 years ago

Great thanks so much! The next step is to get a stack trace. I can do it myself if you tell me:

Alternatively, you can generate the stack trace by doing:

gdb /path/to/liquidsoap /path/to/core/dump
> thread apply all bt

I would still like to get the info on your OS/liquidsoap binary since that would also allow me to inspect the trace to get more info on the crash.

oranjebloom commented 2 years ago

Hi, I am running Debian 10 (Buster) and I installed via opam

oranjebloom commented 2 years ago

Hi @ toots, just a bit more info regarding my install on Debian 10 ... I installed via opam doing ...

opam depext taglib ffmpeg lame cry ssl samplerate magic lastfm inotify ocurl liquidsoap

opam install taglib ffmpeg lame cry ssl samplerate magic lastfm inotify ocurl liquidsoap
toots commented 2 years ago

Awesome, thank you, will report ASAP.

toots commented 2 years ago

Ok, unfortunately, I cannot get any info from that at the moment. I'll have to investigate.

Meanwhile, I'd suggest installing the latest ocaml-lame version 0.3.5. The opam package is pending but you can pin it:

git clone https://github.com/savonet/ocaml-lame
cd ocaml-lame
opam install -y .

I'd also consider installing the upcoming v2.0.2:

git clone https://github.com/savonet/liquidsoap.git
cd liquidsoap && git checkout v2.0.2-preview
opam install -y .

We just fixed a segfault in ocaml-lame that could very well be your issue here.

oranjebloom commented 2 years ago

Okay, I'll try your advice and see how it goes. Please let us know if your further investigation yields anything.

toots commented 2 years ago

Sounds good, thanks!

toots commented 2 years ago

Hi @oranjebloom ! Anything to report here? Hopefully, no news is good news?

oranjebloom commented 2 years ago

Hi @toots ... I'm still trying to get Liquidsoap 2.0.2 to install with ffmpeg. Pinning the dev version removes ffmpeg (like below) so I'm left with no decoder. Any advice?

The following actions will be performed:
  ⊘ remove  ffmpeg            1.1.0  [uses ffmpeg-avfilter, ffmpeg-av, ffmpeg-avcodec, ffmpeg-avutil]
  ⊘ remove  ffmpeg-swscale    1.1.0  [conflicts with liquidsoap]
  ⊘ remove  ffmpeg-swresample 1.1.0  [conflicts with liquidsoap]
  ⊘ remove  ffmpeg-avfilter   1.1.0  [conflicts with liquidsoap]
  ⊘ remove  ffmpeg-avdevice   1.1.0  [conflicts with liquidsoap]
  ⊘ remove  ffmpeg-av         1.1.0  [conflicts with liquidsoap]
  ⊘ remove  ffmpeg-avcodec    1.1.0  [conflicts with liquidsoap]
  ⊘ remove  ffmpeg-avutil     1.1.0  [conflicts with liquidsoap]
  ∗ install liquidsoap        2.0.2*
oranjebloom commented 2 years ago

... in the meantime, I'm running version 2.0.1 with the latest ocaml-lame. On average crashes have been happening around the 7 day mark. I'll definitely report back whatever the outcome.

toots commented 2 years ago

Awe man I was hoping the latest ocaml-lame was fixing the issue. By the latest you mean 0.3.5 right?

As for your ocaml-ffmpeg issue, you need to pin it for now until it is released. I want to do it soon but you always find last minute fixes so I want to trigger that as late as possible. Here's the procedure to pin it:

git clone https://github.com/savonet/ocaml-ffmpeg.git
cd ocaml-ffmpeg
opam install -y .
oranjebloom commented 2 years ago

Yes, I'm using ocaml-lame 0.3.5 as recommended. There haven't been any crashes so far, so your fix may have worked, but I'll need to run it longer with Liquidsoap 2.0.1 to know for sure. I'll keep you posted. Thanks for the instructions regarding ffmpeg. I'll set up another instance with Liquidsoap version 2.0.2 and test that also.

toots commented 2 years ago

Ha great. Fingers crossed then!

oranjebloom commented 2 years ago

hi @toots , I just want to report that I have been running version Liquidsoap 2.0.2 with ocaml-lame 0.3.5 continuously since Jan 1st and there have been no crashes so far. I am going to continue running it for another week and if no crashes occur before then, we can probably assume that the issue has been resolved.

toots commented 2 years ago

Glad to hear!

oranjebloom commented 2 years ago

Hi @toots, I have been running the new version for 2 weeks without any problems. I think it's safe to assume the issue has been resolved and can be closed.

toots commented 2 years ago

Awesome.