Page 1 of 1

test curl hangs and causes a lot of cpu

Posted: January 2nd, 2024, 8:37 am
by phit42
Hi,
would anybody know, why the latest version of sabnzbd in docker would constantly run a curl command that utilizes almost all cpu ressource?

Code: Select all

  PID USER      PR  NI    VIRT    RES  %CPU %MEM     TIME+ S COMMAND
24472 root      20   0    8.8m   2.1m  99.4  0.1   2661:41 R curl -skL https://localhost:9090/sabnzbd/api?mode=version
Everything else appears to be fine.

Version 4.1.0
Commit = b7e3401e8e33d9cf1d4afd4ca57e30df206e9476
Python-version = 3.11.6 (main, Oct 13 2023, 15:52:55) [GCC 13.1.1 20230722]

Re: test curl hangs and causes a lot of cpu

Posted: January 2nd, 2024, 9:01 am
by sander
SABnzbd does not use nor provide curl.

So it's probably your docker image doing that. So contact the creator of that docker image? The SABnzbd team does not provide docker images.

Re: test curl hangs and causes a lot of cpu

Posted: January 2nd, 2024, 10:22 am
by safihre

Re: test curl hangs and causes a lot of cpu

Posted: January 2nd, 2024, 11:21 am
by sander
Interesting. Full text below. Extra interesting: "The 3.x kernel line has been End of Life since 2017, but some prebuilt systems such as older Synology NAS units are still running it." ... the linux kernel is now at 6.x, so really old, old Linux kernel.

Also "interesting" that LSIO is not going back to Alpine pre-3.19.



Known Issue: curl endless loop with 3.x Kernels
December 30, 2023 at 6:00 PM
Known Issues synology alpine

◆ This issue is not resolved yet
There is a known issue with the version of curl currently shipped with Alpine 3.19 and 3.x kernels, causing an endless loop to hang containers, usually on startup. The 3.x kernel line has been End of Life since 2017, but some prebuilt systems such as older Synology NAS units are still running it. At time of posting, around 10% of our images have already been rebased to Alpine 3.19 and are therefore affected by this issue, and this number will continue to rise over the next few months.

While a fix has been applied to the affected upstream library we do not have an ETA for if or when it will find its way into the version of curl shipped with Alpine 3.19.

Workaround
As a workaround you can revert to an older tag from before the image was rebased to Alpine 3.19, but please be aware that older tags do not receive updates. Refer to the Changelog in the Readme to see when the change was made for a given image. For Unraid users this will require you to edit the container and under the Advanced options change the Repository to append the required tag.

Re: test curl hangs and causes a lot of cpu

Posted: January 2nd, 2024, 1:15 pm
by phit42
Thank you nonetheless for finding this, @sander and @safihre

And with that info I was able to find a workaround by bleaklion, which seems to work, if you are willing to upgrade packages within the container:
www reddit com /r /synology /comments /18w7bsp /known_issue_curl_endless_loop_with_3x_kernels/

Re: test curl hangs and causes a lot of cpu

Posted: January 13th, 2024, 8:55 am
by LapinFou
Good news a fix has been deployed in the latest Alpina 3.19 yesterday (12th December).
The incoming Sabnzbd docker image will include the fix. 😁
https://info.linuxserver.io/issues/2023-12-30-synology/

Re: test curl hangs and causes a lot of cpu

Posted: January 18th, 2024, 3:29 am
by LapinFou
I confirm that the version 4.2.1-ls146 included the Curl fix. 👍