[[https://www.unix-ag.uni-kl.de/~bloch/acng/html/index.html|Apt-Cacher-NG User Manual]] [[https://salsa.debian.org/blade/apt-cacher-ng]] ====== Issues ====== * [[https://salsa.debian.org/blade/apt-cacher-ng/-/issues]] * [[https://salsa.debian.org/blade/apt-cacher-ng/-/issues/9|#9 downloads existing packages and discards them]] * [[https://salsa.debian.org/blade/apt-cacher-ng/-/issues/22|#22 The following signatures were invalid: BADSIG 871920D1991BC93C Ubuntu Archive Automatic Signing Key (2018) ]] * [[https://salsa.debian.org/blade/apt-cacher-ng/-/issues/25|#25 Apt-cacher-ng: remote end closed connection]] * * [[https://bugs.launchpad.net/ubuntu/+source/apt-cacher-ng/+bug/1983856|apt clients stuck on parallel access]] * [[https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1022043|#1022043 apt-cacher-ng: sometimes fails to download some index files - maybe a race condition]] ===== Reading from proxy failed - select (115: Operation now in progress) ===== [[https://serverfault.com/questions/1005877/cannot-update-apt-https-repositories-via-corporate-proxy-reading-from-proxy-fa|Cannot update apt https repositories via corporate proxy (“reading from proxy failed”) on Debian 10 buster]] Solution: bump to ''apt-cacher-ng=3.5-3'' from ''debian-bullseye''. ==== patches comparison ==== ^ Problem / property ^ salsa #25 patch (one-line guard) ^ Ponsinet (Debian #1022043, 2026) ^ Woodall (Debian #1022043, 2024) ^ | Premature "stuck" displacement of a download that has not received headers yet (''m_nTimeDlStarted == 0'') | fixed: ''makeWay'' requires ''m_nTimeDlStarted != 0'' | fixed: ''m_nTimeDlStarted'' set when the item is created | avoided: second client attaches to the existing job, no displacement | | Rename collision in the same second (''link()'' EEXIST, "Failure to move file", 503) | not fixed | fixed: counter added to the renamed file name | avoided as long as there is no displacement | | Several clients each starting their own download of the same file | not fixed | not fixed | fixed: static mutex + set of in-progress URLs in ''job::Prepare()'' | | Detection of a download that hangs before headers arrive | disabled (never counted as stuck) | kept (counted from item creation) | unchanged | | Locking added | none | none | yes (''inProgressLock'') | | Files touched | ''src/acregistry.cc'' (1 line) | ''src/acregistry.cc'' | ''src/job.h'', ''src/job.cc'', ''CMakeLists.txt'' | | Reported working | no reports found (AI-authored, "Upstream-Status: Pending") | author reports it deployed together with Woodall's | Mundt (Debian), Kaiser (38 sites) | | Applied upstream / in Debian | no | no | no | Which one solves the problem * **Woodall** fixes the core race. ''job::Prepare()'' holds a global mutex, and a client asking for a URL that is already in progress attaches to the existing item instead of creating a new one. That avoids displacement, the same-second rename collision, and duplicate downloads in one change. Reports from Mundt (Debian) and Kaiser (38 sites) say it works, but it isn't a full cure: Ovsík still saw bad signatures with it on 3.7.5. * **Ponsinet** fixes the two defects in the registry itself. It sets ''m_nTimeDlStarted'' when the item is created, and adds a counter to the renamed file name. That covers any caller of Create(), not only job. * **#25** is a subset of Ponsinet's first change. It doesn't fix the rename collision, and it disables the stuck detection before headers arrive. * **Best set** Woodall + Ponsinet. They apply cleanly together, and Ponsinet reports running both in production. I'd skip the #25 patch if you use Ponsinet's.