Hello,
I can confirm this bug with apt-cacher-ng 3.7.5-1.1 and I am providing a
reliable reproducer. The patches (apt-cacher-ng.patch and acregistry.patch)
from #1022043 fix it for me in the following environment:
- apt-cacher-ng 3.7.5-1.1 (source version identical to Debian
unstable/testing), amd64
- Upstream access via an HTTP proxy (squid)
- Clients on a different subnet (the bug does NOT reproduce from localhost, see
below)
Run from a remote host (not the acng host itself):
URL=http://<acng-host>:3142/deb.debian.org/debian/dists/bullseye/InRelease
while true; do
rm -f /tmp/acng.*
seq 20 | parallel -j20 "curl -sS -o /dev/null -D /tmp/acng.{} -w '{}
%{http_code} %{size_download}\n' $URL" 2>/dev/null | awk '{print $2, $3}' |
sort | uniq -c | tr '\n' ' ';
grep -h '^HTTP' /tmp/acng.* | grep -v '200 OK' | sort | uniq -c
echo
done
Observed results without the patches (20 concurrent requests per burst):
- Bursts where 15-16 of 20 clients get "HTTP/1.1 503 Error with cache data,
please consult apt-cacher.err"
- Bursts where some clients get "200 OK" with Content-Length 75123 but zero
body bytes (curl: (18) end of response with 75123 bytes missing)
- Some clients hang until timeout ("Timeout occurred, apt client disappeared
silently?" in the debug log)
Logfile shows (apt-cacher.err / debug log):
Failure to move file /var/cache/apt-cacher-ng/debrep/dists/bullseye/InRelease
out of the way or cannot create /var/cache/apt-cacher-ng/debrep/dists/bullseye
InRelease.1796130030 - errno: File exists
Error creating file item for debrep/dists/bullseye/InRelease -- check file
permissions!
I rebuilt 3.7.5-1.1 with the two patches posted in #1022043 which fixed these
issues.
This looks like the same issue as #1022043 and Launchpad #1983856. It would be
great if these patches could be applied in the Debian package.
Thanks
Martin
________________________________
--
Hella Gutmann Solutions GmbH * Unternehmensform: Gesellschaft mit beschraenkter
Haftung *
Firmensitz: 79241 Ihringen * Eingetragen im Handelsregister: AG Freiburg i.Br.,
HRB 290194 * Geschaeftsfuehrer: Adnan Cemal * USt-IdNr.: DE142208666