On Sun, Jan 03, 2021 at 11:56:37AM -0300, Antonio Terceiro wrote:
Control: tag -1 + moreinfo unreproducible

Hello Francesco, thanks for your bug report.

On Sun, Jan 03, 2021 at 11:37:41AM +0100, Francesco P. Lovergine wrote:
Package: auto-apt-proxy
Version: 13.1
Severity: normal

(sid)frankie@aragorn:~
$ time auto-apt-proxy
http://127.0.0.1:3142

real    0m28.223s
user    0m0.028s
sys     0m0.011s

and - not secondly - it takes the same time at every invocation, which is a non 
sense. It should have a persistent
knowledge of the discovered proxy.

FWIW the version your are reporting this bug against does have a caching
mechanism, however I don't know yet why it is not working for you.

This is a chroot run under stable, but I don't think it depends on
the apt-cacher-ng version.

Note that out the chroot it works fast, instead:

frankie@aragorn:~
$ time auto-apt-proxy
http://127.0.0.1:3142

real    0m0,023s
user    0m0,016s
sys     0m0,011s

I can't reproduce this, I need more information.

----------------8<----------------8<----------------8<-----------------
$ time schroot -c unstable-amd64-sbuild -d /tmp auto-apt-proxy
hostname: Name or service not known
http://127.0.0.1:3142

real    0m0,379s
user    0m0,211s
sys     0m0,084s
----------------8<----------------8<----------------8<-----------------

(note that "hostname: Name or service not known" is a separate issue which I am
handling here).

Can you post the output of

time sh -x /usr/bin/auto-apt-proxy 2>&1 | ts -i

from your chroot? (`ts` comes from the moreutils package).

Sorry for the long delay, your answer has been probably victim of my antispam systems.

First of all, I managed to still reproduce the issue with my current sid chroot in buster. Something changed, because now the delays appears only
the first time after purge and reinstall of auto-apt-proxy apparently.
Then it can run again in the same schroot session without delay... until the next schroot session and then again: it delays at the first run only :-(

Here it is the run of the command you requested:

00:00:00 + [ 204 -gt 60 ]
00:00:00 + rm -f /tmp/.auto-apt-proxy-1000/cache
00:00:00 + [ -f /tmp/.auto-apt-proxy-1000/cache ]
00:00:00 + __detect__
00:00:00 + detect_DNS_SRV_record
00:00:00 + + shuf
00:00:00 hostname --domain
00:00:00 + awk /^[^#]/{print "http://"; $1 ":" $4;found=1;exit}END{exit !found}
00:00:00 + /usr/lib/apt/apt-helper srv-lookup _apt_proxy._tcp.lovergine.com
00:00:00 + command -v ip
00:00:00 + ip route
00:00:00 + awk /default/ { print($3) }
00:00:00 + gateway=192.168.1.1
00:00:00 + getent hosts apt-proxy
00:00:00 + awk /[:blank:]/ { print($1) }
00:00:29 + explicit_proxy=                                                         
                                     <----- HERE!?
00:00:00 + detect_apt_cacher_ng 127.0.0.1
00:00:00 + local ip=127.0.0.1
00:00:00 + local proxy=http://127.0.0.1:3142
00:00:00 + hit -o Acquire::http::Proxy::127.0.0.1=DIRECT http://127.0.0.1:3142
00:00:00 + timeout 5 /usr/lib/apt/apt-helper -o Acquire::http::Proxy=DIRECT 
download-file -o Acquire::http::Proxy::127.0.0.1=DIRECT http://127.0.0.1:3142 
/tmp/tmp.hr4l6p
hnyH
00:00:00 + grep -q -i 406.*usage.information
00:00:00 + echo http://127.0.0.1:3142
00:00:00 + return 0
00:00:00 + return 0
00:00:00 + cat /tmp/.auto-apt-proxy-1000/cache
00:00:00 http://127.0.0.1:3142
00:00:00 + cleanup
00:00:00 + rm -f /tmp/tmp.hr4l6phnyH

real    0m28.218s
user    0m0.049s
sys     0m0.021s
(sid)frankie@aragorn:~
$




--
Francesco P. Lovergine

Reply via email to