> Christian, thank you for stepping in. It seems you finally got the ball 
> rolling
> here where I was unsuccessful in a good half dozen attempts in #ubuntu-devel
> and other venues. That's the good news I suppose.

Np, glad to help - although this time as you said it was more "stepping
in" as I wanted to avoid things getting out of control between several
people that all only want to help to improve Ubuntu.

> I maintain my assessment of the situation of Ubuntu as stated in #16. I've 
> been
> with Ubuntu since breezy or so. I've been very active in bug triage, I know 
> the 
> processes. I'm happy to back up my rant with facts, if you want to hear.

TBH - You don't really have to provide other evidence, I've seen you triage and 
comment on many cases as I'm active myself. And I'm glad about your and other 
community members work!
Also I know that sometimes cases can be forgotten, ignored or punted too long 
for various reasons that are too manifold to be covered here.
My personal and my teams stance is to help to resolve those cases we come by 
and to help training (our and other) people if we see a structural issue.

> I also maintain that this bug ticket and the problem was clearly described 
> including a
> test case in #7 and a clear analysis of where the problem is IN THE CODE 
> right in #1.

I'm ok if you feel that way and do not want to convince you otherwise.
With so much delay you have all right to complain as long as neither of us gets 
personal (or other break other community guidelines).
As I said before, with my reply I wanted to show others POV and thereby explain 
why it might have been not as clear for others.

> You don't need more bug triage at that point. You need a dev to look at the 
> code and
> that did not happen, no matter the effort, here and elsewhere. I believe I 
> even tried
> to get the patch sponsored but nobody dared touching mvo's stuff without an 
> ACK.

As I said in my former post, yes the issue is valid, but not affecting
many users, not being in a main package and not yet was coming up to
someones attention having the extra bit of driving force to resolve it.
All those are aspects of how this happened.

I managed to get it resolved just by the luck of (like you) being very
active and thereby knowing some people to ask for favors :-) And
sometimes that is what you need to get a stuck ball rolling. I'm sure
there are other cases/contacts where you'd be more effective than I
would for the same reason :-)

> I'm not sure, but it seems that both you and Miriam mistakenly assume that 
> this bug can
> be triggered by some configuration on the computer where 
> squid-deb-proxy-CLIENT is
> installed. As stated in #7 "this problem occurs whenever there is more than 
> one
> host/IP discovered via avahi." in other words, a certain state of affairs 
> with regards
> to the LAN (plus VPNs) is needed.

On our "request for configuration" I have to beg your pardon for myself and
others. We are coming by so many bugs that our wording (just like your
descriptions in this case) might have been mis-understandable for the same
reasons (we have context in mind that the others do not know).
But without an intention of bikeshedding, that is still a "configuration" of 
some kind.

I didn't mean to imply "config file foo with entry bar in line X".
Any further detail how to recreate would have helped to clarify.
As always the detail matters, which is part of the reason that the
SRU process encourages literal steps to reproduce.

I've started my own draft (below) on steps how to trigger this based on our
discussions here.
But I think I have managed to fulfill "whenever there is more than one
host/IP discovered via avahi" and it still does not show the reported issue.
This might again be a case of "clear for you but not for everyone else".

#1
# create a VM guest or container with at least three IPv4 adresses
# In the example below I used 4 virtio net in KVM all with DHCP configured
#2
# install prereq packages
$ sudo apt install avahi-utils squid-deb-proxy-client
#3
# check if all are interfaces are configured and avahi probes them all
# (you might need to edit netplan or E/N/I to e.g. dhcp on all of them)
$ avahi-browse -kprtf _apt_proxy._tcp
+;enp9s0;IPv6;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local
+;enp9s0;IPv4;apt-cacher-ng\032proxy\032on\032Keschdeichel;_apt_proxy._tcp;local
+;enp9s0;IPv4;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local
+;enp8s0;IPv6;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local
+;enp8s0;IPv4;apt-cacher-ng\032proxy\032on\032Keschdeichel;_apt_proxy._tcp;local
+;enp8s0;IPv4;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local
+;enp7s0;IPv6;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local
+;enp7s0;IPv4;apt-cacher-ng\032proxy\032on\032Keschdeichel;_apt_proxy._tcp;local
+;enp7s0;IPv4;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local
+;enp1s0;IPv6;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local
+;enp1s0;IPv4;apt-cacher-ng\032proxy\032on\032Keschdeichel;_apt_proxy._tcp;local
+;enp1s0;IPv4;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local
+;lo;IPv4;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local
=;enp8s0;IPv4;apt-cacher-ng\032proxy\032on\032Keschdeichel;_apt_proxy._tcp;local;Keschdeichel.local;192.168.122.1;3142;
=;enp9s0;IPv4;apt-cacher-ng\032proxy\032on\032Keschdeichel;_apt_proxy._tcp;local;Keschdeichel.local;192.168.122.1;3142;
=;enp7s0;IPv4;apt-cacher-ng\032proxy\032on\032Keschdeichel;_apt_proxy._tcp;local;Keschdeichel.local;192.168.122.1;3142;
=;enp1s0;IPv4;apt-cacher-ng\032proxy\032on\032Keschdeichel;_apt_proxy._tcp;local;Keschdeichel.local;192.168.122.1;3142;
=;enp9s0;IPv6;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local;i-deb-proxy.local;fe80::5054:ff:fe3a:53e7;8000;
=;enp8s0;IPv6;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local;i-deb-proxy.local;fe80::5054:ff:fe73:b27d;8000;
=;enp7s0;IPv6;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local;i-deb-proxy.local;fe80::5054:ff:fe3a:53e7;8000;
=;enp1s0;IPv6;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local;i-deb-proxy.local;fe80::5054:ff:fe4e:2923;8000;
=;enp9s0;IPv4;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local;i-deb-proxy.local;192.168.122.125;8000;
=;enp8s0;IPv4;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local;i-deb-proxy.local;192.168.122.202;8000;
=;enp7s0;IPv4;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local;i-deb-proxy.local;192.168.122.186;8000;
=;enp1s0;IPv4;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local;i-deb-proxy.local;192.168.122.42;8000;
=;lo;IPv4;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local;i-deb-proxy.local;127.0.0.1;8000;
#4
# run apt-avahi-discover
$ sudo /usr/share/squid-deb-proxy-client/apt-avahi-discover

I have further looked into it since - as I said - I believe I should already
be at the "whenever there is more than one host/IP discovered via avahi" stage.
In this case recreating the parsing that apt-avahi-discover internally does
leads to:

$ avahi-browse -kprtf _apt_proxy._tcp | grep '^=' | cut -d";" -f 8-9 | grep -v 
'::'
Failed to resolve service 'apt-cacher-ng proxy on Keschdeichel' of type 
'_apt_proxy._tcp' in domain 'local': Timeout reached
Failed to resolve service 'apt-cacher-ng proxy on Keschdeichel' of type 
'_apt_proxy._tcp' in domain 'local': Timeout reached
Failed to resolve service 'apt-cacher-ng proxy on Keschdeichel' of type 
'_apt_proxy._tcp' in domain 'local': Timeout reached
Failed to resolve service 'apt-cacher-ng proxy on Keschdeichel' of type 
'_apt_proxy._tcp' in domain 'local': Timeout reached
apt-cacher-ng\032proxy\032on\032Keschdeichel;192.168.122.1;3142
Squid\032deb\032proxy\032on\032i-deb-proxy;192.168.122.125;8000
apt-cacher-ng\032proxy\032on\032Keschdeichel;192.168.122.1;3142
Squid\032deb\032proxy\032on\032i-deb-proxy;192.168.122.202;8000
apt-cacher-ng\032proxy\032on\032Keschdeichel;192.168.122.1;3142
Squid\032deb\032proxy\032on\032i-deb-proxy;192.168.122.186;8000
apt-cacher-ng\032proxy\032on\032Keschdeichel;192.168.122.1;3142
Squid\032deb\032proxy\032on\032i-deb-proxy;192.168.122.42;8000
Squid\032deb\032proxy\032on\032i-deb-proxy;127.0.0.1;8000

So in this setup we see the messages that Andreas saw in comment #8.
But not the reported python errors which we are looking for steps to recreate.
Cross-checking bug 1422162 I also have apt-cacher-ng as reported there, but 
still no fail.

A manual check of it works just fine.
$ curl 192.168.122.1:3142

You said on that other bug "probing the IP:port combination of the n2n
interface shows the port as closed." so I thought I'll continue on that
thought and got to:

# After being announced stop the cacher on the host
$ sudo systemctl stop apt-cacher-ng.service
# Check it is now dead from the guest
$ curl 192.168.122.1:3142
curl: (7) Failed to connect to 192.168.122.1 port 3142: Connection refused
# Check that it is still announced in avahi
$ avahi-browse -kprtf _apt_proxy._tcp | grep '^=' | cut -d";" -f 4,8-9 | grep 
-v '::'
Failed to resolve service 'apt-cacher-ng proxy on Keschdeichel' of type 
'_apt_proxy._tcp' in domain 'local': Timeout reached
Failed to resolve service 'apt-cacher-ng proxy on Keschdeichel' of type 
'_apt_proxy._tcp' in domain 'local': Timeout reached
Failed to resolve service 'apt-cacher-ng proxy on Keschdeichel' of type 
'_apt_proxy._tcp' in domain 'local': Timeout reached
Failed to resolve service 'apt-cacher-ng proxy on Keschdeichel' of type 
'_apt_proxy._tcp' in domain 'local': Timeout reached
apt-cacher-ng\032proxy\032on\032Keschdeichel;192.168.122.1;3142
apt-cacher-ng\032proxy\032on\032Keschdeichel;192.168.122.1;3142
apt-cacher-ng\032proxy\032on\032Keschdeichel;192.168.122.1;3142
apt-cacher-ng\032proxy\032on\032Keschdeichel;192.168.122.1;3142
Squid\032deb\032proxy\032on\032i-deb-proxy;192.168.122.125;8000
Squid\032deb\032proxy\032on\032i-deb-proxy;192.168.122.202;8000
Squid\032deb\032proxy\032on\032i-deb-proxy;192.168.122.186;8000
Squid\032deb\032proxy\032on\032i-deb-proxy;192.168.122.42;8000
Squid\032deb\032proxy\032on\032i-deb-proxy;127.0.0.1;8000
# Now run apt-avahi-discover which shows the python errors bleeding into the
# output even with stderr redirected
$ /usr/share/squid-deb-proxy-client/apt-avahi-discover 2>/dev/null
error: uncaptured python exception, closing channel <AptAvahiClient> 
('192.168.122.1', 3142): 9223372036854775807 (<class 
'ConnectionRefusedError'>:[Errno 111] Connection refused 
[/usr/lib/python3.9/asyncore.py|read|83] 
[/usr/lib/python3.9/asyncore.py|handle_read_event|417] 
[/usr/lib/python3.9/asyncore.py|handle_connect_event|425])
error: uncaptured python exception, closing channel <AptAvahiClient> 
('192.168.122.1', 3142): 9223372036854775807 (<class 
'ConnectionRefusedError'>:[Errno 111] Connection refused 
[/usr/lib/python3.9/asyncore.py|read|83] 
[/usr/lib/python3.9/asyncore.py|handle_read_event|417] 
[/usr/lib/python3.9/asyncore.py|handle_connect_event|425])
error: uncaptured python exception, closing channel <AptAvahiClient> 
('192.168.122.1', 3142): 9223372036854775807 (<class 
'ConnectionRefusedError'>:[Errno 111] Connection refused 
[/usr/lib/python3.9/asyncore.py|read|83] 
[/usr/lib/python3.9/asyncore.py|handle_read_event|417] 
[/usr/lib/python3.9/asyncore.py|handle_connect_event|425])
error: uncaptured python exception, closing channel <AptAvahiClient> 
('192.168.122.1', 3142): 9223372036854775807 (<class 
'ConnectionRefusedError'>:[Errno 111] Connection refused 
[/usr/lib/python3.9/asyncore.py|read|83] 
[/usr/lib/python3.9/asyncore.py|handle_read_event|417] 
[/usr/lib/python3.9/asyncore.py|handle_connect_event|425])
http://192.168.122.42:8000/

For the protection of all the helpful people that looked into the case so far,
this was IMHO not "clear to everyone" from the descriptions so far.
I don't want to convince you Rolf, just to state that there at least could
be different POVs on this.

Looking forward gladly I now think we finally have all that we need in
place. I have pushed my test steps up to the bug description where it is
recommended to be and later required for the SRU.

Miriam has already kindly offered to then drive this into SRUs for the active
releases (thanks to her for that!) and I'll therefore assign it to her.
Let us hope to get this into impish before it is too frozen for the release to
not further delay this.

Looking forward to work with all of you in many more cases that are ahead of us
and together we will make things better a little bit every time.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to python2.7 in Ubuntu.
https://bugs.launchpad.net/bugs/1505670

Title:
  "uncaptured python exception"

Status in squid-deb-proxy package in Ubuntu:
  Confirmed
Status in squid-deb-proxy source package in Bionic:
  New
Status in squid-deb-proxy source package in Focal:
  New
Status in squid-deb-proxy source package in Hirsute:
  New

Bug description:
  Steps to reproduce (for later SRU work)

  #0
  # On the test Host install apt-cacher-ng
  # you need to do so before creating the guest to propagate
  # and configure correctly when spawned
  $ sudo apt install apt-cacher-ng

  #1
  # create a VM guest or container with at least three IPv4 adresses
  # In the example below I used 4 virtio net in KVM all with DHCP configured

  #2
  # install prereq packages
  $ sudo apt install avahi-utils squid-deb-proxy-client

  #3
  # check if all are interfaces are configured and avahi probes them all
  # (you might need to edit netplan or E/N/I to e.g. dhcp on all of them)
  $ avahi-browse -kprtf _apt_proxy._tcp
  +;enp9s0;IPv6;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local
  
+;enp9s0;IPv4;apt-cacher-ng\032proxy\032on\032Keschdeichel;_apt_proxy._tcp;local
  +;enp9s0;IPv4;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local
  +;enp8s0;IPv6;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local
  
+;enp8s0;IPv4;apt-cacher-ng\032proxy\032on\032Keschdeichel;_apt_proxy._tcp;local
  +;enp8s0;IPv4;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local
  +;enp7s0;IPv6;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local
  
+;enp7s0;IPv4;apt-cacher-ng\032proxy\032on\032Keschdeichel;_apt_proxy._tcp;local
  +;enp7s0;IPv4;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local
  +;enp1s0;IPv6;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local
  
+;enp1s0;IPv4;apt-cacher-ng\032proxy\032on\032Keschdeichel;_apt_proxy._tcp;local
  +;enp1s0;IPv4;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local
  +;lo;IPv4;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local
  
=;enp8s0;IPv4;apt-cacher-ng\032proxy\032on\032Keschdeichel;_apt_proxy._tcp;local;Keschdeichel.local;192.168.122.1;3142;
  
=;enp9s0;IPv4;apt-cacher-ng\032proxy\032on\032Keschdeichel;_apt_proxy._tcp;local;Keschdeichel.local;192.168.122.1;3142;
  
=;enp7s0;IPv4;apt-cacher-ng\032proxy\032on\032Keschdeichel;_apt_proxy._tcp;local;Keschdeichel.local;192.168.122.1;3142;
  
=;enp1s0;IPv4;apt-cacher-ng\032proxy\032on\032Keschdeichel;_apt_proxy._tcp;local;Keschdeichel.local;192.168.122.1;3142;
  
=;enp9s0;IPv6;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local;i-deb-proxy.local;fe80::5054:ff:fe3a:53e7;8000;
  
=;enp8s0;IPv6;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local;i-deb-proxy.local;fe80::5054:ff:fe73:b27d;8000;
  
=;enp7s0;IPv6;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local;i-deb-proxy.local;fe80::5054:ff:fe3a:53e7;8000;
  
=;enp1s0;IPv6;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local;i-deb-proxy.local;fe80::5054:ff:fe4e:2923;8000;
  
=;enp9s0;IPv4;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local;i-deb-proxy.local;192.168.122.125;8000;
  
=;enp8s0;IPv4;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local;i-deb-proxy.local;192.168.122.202;8000;
  
=;enp7s0;IPv4;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local;i-deb-proxy.local;192.168.122.186;8000;
  
=;enp1s0;IPv4;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local;i-deb-proxy.local;192.168.122.42;8000;
  
=;lo;IPv4;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local;i-deb-proxy.local;127.0.0.1;8000;

  #5
  # After being announced stop the cacher on the host
  $ sudo systemctl stop apt-cacher-ng.service

  #6
  Check it is now dead from the guests POV
  $ curl 192.168.122.1:3142
  curl: (7) Failed to connect to 192.168.122.1 port 3142: Connection refused

  #7
  # Ensure that it is still announced in avahi in the guest
  $ avahi-browse -kprtf _apt_proxy._tcp | grep '^=' | cut -d";" -f 4,8-9 | grep 
-v '::'
  ...
  apt-cacher-ng\032proxy\032on\032Keschdeichel;192.168.122.1;3142

  #8
  # Now run apt-avahi-discover which shows the python errors
  # bleeding into the output even with stderr redirected
  $ /usr/share/squid-deb-proxy-client/apt-avahi-discover 2>/dev/null 
  error: uncaptured python exception, closing channel <AptAvahiClient> 
('192.168.122.1', 3142): 9223372036854775807 (<class 
'ConnectionRefusedError'>:[Errno 111] Connection refused 
[/usr/lib/python3.9/asyncore.py|read|83] 
[/usr/lib/python3.9/asyncore.py|handle_read_event|417] 
[/usr/lib/python3.9/asyncore.py|handle_connect_event|425])
  error: uncaptured python exception, closing channel <AptAvahiClient> 
('192.168.122.1', 3142): 9223372036854775807 (<class 
'ConnectionRefusedError'>:[Errno 111] Connection refused 
[/usr/lib/python3.9/asyncore.py|read|83] 
[/usr/lib/python3.9/asyncore.py|handle_read_event|417] 
[/usr/lib/python3.9/asyncore.py|handle_connect_event|425])
  error: uncaptured python exception, closing channel <AptAvahiClient> 
('192.168.122.1', 3142): 9223372036854775807 (<class 
'ConnectionRefusedError'>:[Errno 111] Connection refused 
[/usr/lib/python3.9/asyncore.py|read|83] 
[/usr/lib/python3.9/asyncore.py|handle_read_event|417] 
[/usr/lib/python3.9/asyncore.py|handle_connect_event|425])
  error: uncaptured python exception, closing channel <AptAvahiClient> 
('192.168.122.1', 3142): 9223372036854775807 (<class 
'ConnectionRefusedError'>:[Errno 111] Connection refused 
[/usr/lib/python3.9/asyncore.py|read|83] 
[/usr/lib/python3.9/asyncore.py|handle_read_event|417] 
[/usr/lib/python3.9/asyncore.py|handle_connect_event|425])
  http://192.168.122.42:8000/

  P.S. I'm (paelzer) not entirely sure we need "multiple" IPs an
  announced but down entry might be enough, but we want to stick close
  to what was reported.

  ---

  I get the following error when running the discovery script on the
  command line.

  $ /usr/share/squid-deb-proxy-client/apt-avahi-discover
  error: uncaptured python exception, closing channel <AptAvahiClient> 
('10.1.2.3', 3142): 2147483647 (<class 'socket.error'>:[Errno 111] Connection 
refused [/usr/lib/python2.7/asyncore.py|read|83] 
[/usr/lib/python2.7/asyncore.py|handle_read_event|446] 
[/usr/lib/python2.7/asyncore.py|handle_connect_event|454])
  error: uncaptured python exception, closing channel <AptAvahiClient> 
('10.0.3.1', 3142): 2147483647 (<class 'socket.error'>:[Errno 111] Connection 
refused [/usr/lib/python2.7/asyncore.py|read|83] 
[/usr/lib/python2.7/asyncore.py|handle_read_event|446] 
[/usr/lib/python2.7/asyncore.py|handle_connect_event|454])
  error: uncaptured python exception, closing channel <AptAvahiClient> 
('172.24.74.129', 3142): 2147483647 (<class 'socket.error'>:[Errno 111] 
Connection refused [/usr/lib/python2.7/asyncore.py|read|83] 
[/usr/lib/python2.7/asyncore.py|handle_read_event|446] 
[/usr/lib/python2.7/asyncore.py|handle_connect_event|454])
  http://172.24.74.145:3142/

  The last line still returns the proper proxy URI so as far as I can
  tell things are still working.  The IP 10.1.2.3 is for an n2n VPN.
  This is on trusty with version 0.8.6ubuntu1.

  To trigger the bug the environment setup needs to be in a specific way.
  It seems for the problem to occur it need more than one host/IP discovered 
via avahi. This can be probed via $ avahi-browse -kprtf _apt_proxy._tcp
  and e.g. the common LXD setup of IPv4 + ipv6 is NOT enough to trigger it.

  TODO: a sample output of the above command in an affected environment
  could be helpful.

  TODO: if possible outlining how the environment can be configured to
  have this multi host/IP reply in avahi would be helpful as well.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/squid-deb-proxy/+bug/1505670/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to