You are not logged in.
I am running into an issue where I have to build an image that uses archlinux:base-devel image as its source. Pacman on that image fails to run due to curl returning exit code 6.
This is the error from building the image:
debug: core.db: url is https://geo.mirror.pkgbuild.com/core/os/x86_64/core.db
debug: core.db: maxsize 134217728
debug: core.db: opened tempfile for download: /var/lib/pacman/sync/download-wM1QEC/core.db.part (wb)
debug: extra.db: url is https://geo.mirror.pkgbuild.com/extra/o … 4/extra.db
debug: extra.db: maxsize 134217728
debug: extra.db: opened tempfile for download: /var/lib/pacman/sync/download-wM1QEC/extra.db.part (wb)
debug: core.db: curl returned result 6 from transfer
So I tried to reproduce in by just running curl on the base-devel image and this does not work either:
docker run -i --rm archlinux:base curl -O https://geo.mirror.pkgbuild.com/core/os/x86_64/core.db
curl: (6) getaddrinfo() thread failed to start
if I run curl with alpine image on the same host it works fine
docker run -i --rm alpine apk add --no-cache curl tar zstd;curl -O https://geo.mirror.pkgbuild.com/core/os/x86_64/core.db
OK: 17 MiB in 29 packages
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 116k 100 116k 0 0 249k 0 --:--:-- --:--:-- --:--:-- 249k
if I run with archlinux:base-devel option and add security-opts uncofined it works but I cant use this option on when trying to build a container
docker run --security-opt seccomp=unconfined -i --rm archlinux:base-devel curl -O https://geo.mirror.pkgbuild.com/core/os/x86_64/core.db
I also tried to run with older docker images all the way back from September and they all have the same issue.
Does anyone have any insight on why curl is not working in archlinux docker image without any security-opts change?
Thanks
Offline
Welcome in the arch linux forum.
It looks like the most likely explanation is that somehow your docker container or curl process runs into a limit of allowed filedescriptors. No idea how/why that happens.
Errors with the same error message from curl:
https://github.com/curl/curl/issues/6495
https://github.com/desktop/desktop/issues/17755
https://repost.aws/de/questions/QU3jvWe … sc_ipos=16
Last edited by progandy (2024-10-27 16:03:19)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
I dont think it is related to open file limits. My system is only using 1% of the total open files allowed and curl in the alpine image constantly work whereas it constantly fails in the archlinux image.
gtin@saposerver:~$ paste <(grep 'open files\|processes\|pending signals' \
/proc/self/limits | cut -c27-38) \
<(i=`whoami`
lsof -n -u $i 2> /dev/null |
tail -n +2 |
awk {'print $9'} |
wc -l
ps --no-headers -U $i -u $i u | wc -l
ps -u $i -o pid= |
xargs printf "/proc/%s/status\n" |
xargs grep -s 'SigPnd' |
sed 's/.*\t//' |
paste -sd+ |
bc ; ) \
<(grep 'open files\|processes\|pending signals' \
/proc/self/limits |
cut -c1-19) |
while read a b name ; do
printf '%3i%% %s\n' $((${b}00/a)) "$name"
done
1% Max processes
1% Max open files
0% Max pending signals
Offline