-
Notifications
You must be signed in to change notification settings - Fork 14
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
aur-install
hangs for 10+ minutes
#7
Comments
For what it's worth, I ran into a similar issue when running |
For some reason I can’t explain, by letting --- /usr/bin/fakeroot.old 2024-06-06 06:38:53 +0000
+++ /usr/bin/fakeroot.new
@@ -138,7 +138,10 @@
fi
unset FAKEROOTKEY
-KEY_PID=`eval $FAKED $FAKEDOPTS $PIPEIN`
+KEY_PID_FILE="$(mktemp)"
+eval $FAKED $FAKEDOPTS $PIPEIN >"$KEY_PID_FILE"
+KEY_PID="$(cat -- "$KEY_PID_FILE")"
+rm -f -- "$KEY_PID_FILE"
FAKEROOTKEY=`echo $KEY_PID|cut -d: -f1`
PID=`echo $KEY_PID|cut -d: -f2`
Not sure if this would introduce any security issues though. |
This image is partially affected by a
bugquirk infaked
, where it tries to close all available file descriptors.When building packages,
makepkg
runsfakeroot
, which in turn spawnsfaked
, which dives into a loop, proportional to the value ofulimit --nofile
. A possible default amount of those in my case was 1073741816:Solution to this issue is mentioned here, it suggests setting ulimit yourself. Possible ways are:
docker run --rm --ulimit nofile=1024:10240 -it ghcr.io/greyltc-org/archlinux-aur
docker build --ulimit nofile=1024:10240 .
.services.myservice.ulimits.nofile = "1024:10240"
(I can't find how to set this for build stages in docker-compose)systemctl edit containerd.service
(and, probably, the same fordocker.service
)Note, that setting limits for daemons is not recommended for performance reasons.
To verify, that this works I've used this dockerfile:
Where
kickstart-git
is one of the packages I found that has minimal dependencies almost no install steps. It hangs (and fails) after==> Entering fakeroot environment...
without ulimit, and succeeds with limits set.I haven't seen that many mentions of this quirk. Probably, most of docker users do not encounter this problem because they do not use fakeroot/fakechroot in the building process. This image is the notable exception. So, maybe, mentioning this mitigation in the README would save some people a couple (dozens) of minutes of research?
I'd recommend adding a troubleshooting section with something like
to see if docker installation is affected by this, and one example to set ulimits if it's needed.
The text was updated successfully, but these errors were encountered: