liquidsoap icon indicating copy to clipboard operation
liquidsoap copied to clipboard

Harbor.input && http.input : Buffer overrun looping after a some days

Open yah00078 opened this issue 3 years ago • 6 comments

Describe the bug

Hello !

I start liquidsoap, it run well during a while listening icecast stream and one day (can be from 24h to 7 days) all stop (sound, switch, fallback, encoders).

When I see logs I can find about 3500 line of '[http_9625:3] Buffer overrun: Dropping 0.03s.' (same for harbor.input) every 0.03s a new line is generated.

The only way to turn back available, is to restart liquidsoap.

Following many forums topics, I see there is a possible clock sync problem between encoder and liquidsoap.

I'am convinced there is an hardware un-sync but on many systems I never reached theses issues.

I can add info: more resources expensive is the code, more often it happens.

2020/08/04 09:39:51 [http_9625:3] New metadata chunk: ? -- -M- - Crois au Printemps.
2020/08/04 09:39:57 [http_9625:3] Buffer overrun: Dropping 0.00s.
2020/08/04 09:39:57 [http_9625:3] Buffer overrun: Dropping 0.03s.
2020/08/04 09:39:57 [http_9625:3] Buffer overrun: Dropping 0.03s.
2020/08/04 09:39:57 [http_9625:3] Buffer overrun: Dropping 0.03s.
2020/08/04 09:39:57 [http_9625:3] Buffer overrun: Dropping 0.03s.
2020/08/04 09:39:57 [http_9625:3] Buffer overrun: Dropping 0.03s.
2020/08/04 09:39:57 [http_9625:3] Buffer overrun: Dropping 0.03s.
2020/08/04 09:39:57 [http_9625:3] Buffer overrun: Dropping 0.03s.
2020/08/04 09:39:57 [http_9625:3] Buffer overrun: Dropping 0.03s.
2020/08/04 09:39:58 [http_9625:3] Buffer overrun: Dropping 0.03s.
2020/08/04 09:39:58 [http_9625:3] Buffer overrun: Dropping 0.03s.
2020/08/04 09:39:58 [http_9625:3] Buffer overrun: Dropping 0.03s.
2020/08/04 09:39:58 [http_9625:3] Buffer overrun: Dropping 0.03s.
......

To Reproduce src = input.http("http://XXXXX") PGM = fallback([[strip_blank(max_blank=30.,master_src),ANOTHER_SOURCE)

cross fingers and wait ! :-)

Expected behavior

-> add a buffer adaptation on input

-> Is it possible to implement a resilience security action. as if there is more than XXsec of buffer overrun, drop all buffer and listen back?

Version details

  • OS: DEBIAN 10
  • Version: 1.3.3
  • CPU : E5-1650 0 @ 3.20ghz

Install method packages

Thank you for help :-)

yah00078 avatar Aug 04 '20 08:08 yah00078

Hello after some tests, I can add this : -> At 320 kbs/s it works about 5 days before drops. -> At 224 kbs/s it immediately buffer overrun

yah00078 avatar Aug 05 '20 08:08 yah00078

I found a possibly clue to explain why there is no fallback in this case.

I tried direct input vs direct input + fallback with strip_blank function.

I think when harbor.input buffer overrun, stripblank function doesn't see it as sound blank, so fallback mechanism don't do anything.

yah00078 avatar Aug 06 '20 09:08 yah00078

Hi! Sorry for the late response. I'll try to take a minute to test and give you a more informed response soon :-)

toots avatar Oct 18 '20 23:10 toots

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] avatar May 20 '21 13:05 stale[bot]

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] avatar Jan 08 '22 01:01 stale[bot]

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] avatar Aug 13 '22 10:08 stale[bot]

I am having similar problems with a stream that has a lot of latency. 150 ms from the server to input.http. And I have some crashes of liquidsoap, or the output just get silenced instead of dropping the buffer and reinitiating it. I have to reboot liquidsoap often. Sometimes it reinitiates the clocks, but sometimes just silently crashes.

hydrosIII avatar Jan 30 '23 12:01 hydrosIII