New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Curl causes high load on Synology devices #12517
Comments
I originally thought it might be Alpine related so I created this: alpinelinux/docker-alpine#365 For completeness, I paste the details here: As a test, I used the image standalone and got the same result silenus [~]$ docker pull alpine
Using default tag: latest
latest: Pulling from library/alpine
Digest: sha256:51b67269f354137895d43f3b3d810bfacd3945438e94dc5ac55fdac340352f48
Status: Image is up to date for alpine:latest
docker.io/library/alpine:latest
silenus [~]$ docker run --rm -ti alpine sh
/ # apk add --no-cache curl
fetch https://dl-cdn.alpinelinux.org/alpine/v3.19/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.19/community/x86_64/APKINDEX.tar.gz
(1/8) Installing ca-certificates (20230506-r0)
(2/8) Installing brotli-libs (1.1.0-r1)
(3/8) Installing c-ares (1.22.1-r0)
(4/8) Installing libunistring (1.1-r2)
(5/8) Installing libidn2 (2.3.4-r4)
(6/8) Installing nghttp2-libs (1.58.0-r0)
(7/8) Installing libcurl (8.5.0-r0)
(8/8) Installing curl (8.5.0-r0)
Executing busybox-1.36.1-r15.trigger
Executing ca-certificates-20230506-r0.trigger
OK: 12 MiB in 23 packages
/ # time curl https://google.com
^CCommand terminated by signal 2
real 8m 3.83s
user 4m 52.19s
sys 2m 56.06s
/ # Some more information:
|
Use |
What is the output of curl -v https://google.com ? This is much more likely to
be an issue with the environment than an actual curl issue, e.g. a firewall or
other network issue (especially given that Docker is involved).
|
This is curl on the synology
Running in docker
I canceled the curl call after a few of minutes To test that it is not firewall related I was able to use wget
|
/ # time curl -vvvv https://google.com
^CCommand terminated by signal 2
The lack of any output at all implies that there is a DNS resolution issue. The
c-ares resolver version being used there is well over 5 years out of date; I'd
try updating that to start with.
|
Sorry for the confusion, I think the version you were looking at was the one on the actual device which is working. The version in the container is as follows:
I have done the following:
And getting the same result. These packages are pretty new. |
Yes, I clearly mixed those versions up. Try running it under strace or ltrace
and you should get some clues as to where it's hanging.
|
I tried replicating this on my laptop and got the following, which is also strange but at least it doesn't get stuck:
I have attached a copy of the output from the strace it is getting stuck on
|
The getrandom man page explains ENOSYS like this:
But also:
According to logs above, this runs on a 3.10 kernel. I believe c-ares is the one using this call, not curl itself. You can verify this by trying a curl build that does not use c-ares. |
This is now fixed in c-ares. Not a curl bug. |
I did this
I tried to run curl in a docker image using the latest Alpine image on a Synology DS1813+ and it just hangs.
I expected the following
I expected to get data returned from the URL.
curl/libcurl version
curl 8.5.0 (x86_64-alpine-linux-musl) libcurl/8.5.0 OpenSSL/3.1.4 zlib/1.3 brotli/1.1.0 c-ares/1.22.1 libidn2/2.3.4 nghttp2/1.58.0
Release-Date: 2023-12-06
Protocols: dict file ftp ftps gopher gophers http https imap imaps mqtt pop3 pop3s rtsp smb smbs smtp smtps telnet tftp ws wss
Features: alt-svc AsynchDNS brotli HSTS HTTP2 HTTPS-proxy IDN IPv6 Largefile libz NTLM SSL threadsafe TLS-SRP UnixSockets
operating system
alpine 3.19.0
The text was updated successfully, but these errors were encountered: