= hirsute verification =
# Start by showing we can still reproduce the problem w/o the -proposed packages:
ubuntu@avoton02:~$ sudo iptables -A INPUT -p tcp -s 91.189.88.136 -m string --string maas.io --algo bm -j DROP
ubuntu@avoton02:~$ python3 ./repro.py & sleep 60
[1] 3386
# 60 seconds have passed, still hung:
ubuntu@avoton02:~$ sudo strace -p 3386
strace: Process 3386 attached
read(3, ^Cstrace: Process 3386 detached
<detached ...>
ubuntu@avoton02:~$ fg
python3 ./repro.py
^CTraceback (most recent call last):
File "/home/ubuntu/./repro.py", line 6, in <module>
r = RequestsUrlReader(url)
File "/usr/lib/python3/dist-packages/simplestreams/contentsource.py", line 381, in __init__
self.req = requests.get(url, stream=True, auth=auth, headers=headers)
File "/usr/lib/python3/dist-packages/requests/api.py", line 76, in get
return request('get', url, params=params, **kwargs)
File "/usr/lib/python3/dist-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 382, in _make_request
self._validate_conn(conn)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 1012, in _validate_conn
conn.connect()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 411, in connect
self.sock = ssl_wrap_socket(
File "/usr/lib/python3/dist-packages/urllib3/util/ssl_.py", line 428, in ssl_wrap_socket
ssl_sock = _ssl_wrap_socket_impl(
File "/usr/lib/python3/dist-packages/urllib3/util/ssl_.py", line 472, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
File "/usr/lib/python3.9/ssl.py", line 500, in wrap_socket
return self.sslsocket_class._create(
File "/usr/lib/python3.9/ssl.py", line 1040, in _create
self.do_handshake()
File "/usr/lib/python3.9/ssl.py", line 1309, in do_handshake
self._sslobj.do_handshake()
KeyboardInterrupt
# Now upgrade and demonstrate the problem is fixed
ubuntu@avoton02:~$ sudo apt install python3-simplestreams simplestreams -y
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be upgraded:
python3-simplestreams simplestreams
2 upgraded, 0 newly installed, 0 to remove and 68 not upgraded.
Need to get 31.8 kB/37.8 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu hirsute-proposed/main amd64 python3-simplestreams all 0.1.0-30-g3cc8988a-0ubuntu1.21.04.1 [31.8 kB]
Fetched 31.8 kB in 0s (119 kB/s)
(Reading database ... 79414 files and directories currently installed.)
Preparing to unpack .../python3-simplestreams_0.1.0-30-g3cc8988a-0ubuntu1.21.04.1_all.deb ...
Unpacking python3-simplestreams (0.1.0-30-g3cc8988a-0ubuntu1.21.04.1) over (0.1.0-30-g3cc8988a-0ubuntu1) ...
Preparing to unpack .../simplestreams_0.1.0-30-g3cc8988a-0ubuntu1.21.04.1_all.deb ...
Unpacking simplestreams (0.1.0-30-g3cc8988a-0ubuntu1.21.04.1) over (0.1.0-30-g3cc8988a-0ubuntu1) ...
Setting up python3-simplestreams (0.1.0-30-g3cc8988a-0ubuntu1.21.04.1) ...
Setting up simplestreams (0.1.0-30-g3cc8988a-0ubuntu1.21.04.1) ...
Scanning processes...
Scanning processor microcode...
Scanning linux images...
Running kernel seems to be up-to-date.
The processor microcode seems to be up-to-date.
No services need to be restarted.
No containers need to be restarted.
No user sessions are running outdated binaries.
ubuntu@avoton02:~$ python3 ./repro.py & sleep 60
[1] 3605
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 382, in _make_request
self._validate_conn(conn)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 1012, in _validate_conn
conn.connect()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 411, in connect
self.sock = ssl_wrap_socket(
File "/usr/lib/python3/dist-packages/urllib3/util/ssl_.py", line 428, in ssl_wrap_socket
ssl_sock = _ssl_wrap_socket_impl(
File "/usr/lib/python3/dist-packages/urllib3/util/ssl_.py", line 472, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
File "/usr/lib/python3.9/ssl.py", line 500, in wrap_socket
return self.sslsocket_class._create(
File "/usr/lib/python3.9/ssl.py", line 1040, in _create
self.do_handshake()
File "/usr/lib/python3.9/ssl.py", line 1309, in do_handshake
self._sslobj.do_handshake()
socket.timeout: _ssl.c:1106: The handshake operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 755, in urlopen
retries = retries.increment(
File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 531, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/usr/lib/python3/dist-packages/six.py", line 703, in reraise
raise value
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 385, in _make_request
self._raise_timeout(err=e, url=url, timeout_value=conn.timeout)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 336, in _raise_timeout
raise ReadTimeoutError(
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='images.maas.io', port=443): Read timed out. (read timeout=10)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ubuntu/./repro.py", line 6, in <module>
r = RequestsUrlReader(url)
File "/usr/lib/python3/dist-packages/simplestreams/contentsource.py", line 382, in __init__
self.req = requests.get(
File "/usr/lib/python3/dist-packages/requests/api.py", line 76, in get
return request('get', url, params=params, **kwargs)
File "/usr/lib/python3/dist-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 529, in send
raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='images.maas.io', port=443): Read timed out. (read timeout=10)
= hirsute verification =
# Start by showing we can still reproduce the problem w/o the -proposed packages:
ubuntu@avoton02:~$ sudo iptables -A INPUT -p tcp -s 91.189.88.136 -m string --string maas.io --algo bm -j DROP
ubuntu@avoton02:~$ python3 ./repro.py & sleep 60
[1] 3386
# 60 seconds have passed, still hung:
ubuntu@avoton02:~$ sudo strace -p 3386
strace: Process 3386 attached
read(3, ^Cstrace: Process 3386 detached
<detached ...>
ubuntu@avoton02:~$ fg ubuntu/ ./repro. py", line 6, in <module> er(url) python3/ dist-packages/ simplestreams/ contentsource. py", line 381, in __init__ python3/ dist-packages/ requests/ api.py" , line 76, in get python3/ dist-packages/ requests/ api.py" , line 61, in request request( method= method, url=url, **kwargs) python3/ dist-packages/ requests/ sessions. py", line 542, in request python3/ dist-packages/ requests/ sessions. py", line 655, in send send(request, **kwargs) python3/ dist-packages/ requests/ adapters. py", line 439, in send python3/ dist-packages/ urllib3/ connectionpool. py", line 699, in urlopen response = self._make_request( python3/ dist-packages/ urllib3/ connectionpool. py", line 382, in _make_request _validate_ conn(conn) python3/ dist-packages/ urllib3/ connectionpool. py", line 1012, in _validate_conn python3/ dist-packages/ urllib3/ connection. py", line 411, in connect python3/ dist-packages/ urllib3/ util/ssl_ .py", line 428, in ssl_wrap_socket socket_ impl( python3/ dist-packages/ urllib3/ util/ssl_ .py", line 472, in _ssl_wrap_ socket_ impl wrap_socket( sock, server_ hostname= server_ hostname) python3. 9/ssl.py" , line 500, in wrap_socket class._ create( python3. 9/ssl.py" , line 1040, in _create do_handshake( ) python3. 9/ssl.py" , line 1309, in do_handshake _sslobj. do_handshake( )
python3 ./repro.py
^CTraceback (most recent call last):
File "/home/
r = RequestsUrlRead
File "/usr/lib/
self.req = requests.get(url, stream=True, auth=auth, headers=headers)
File "/usr/lib/
return request('get', url, params=params, **kwargs)
File "/usr/lib/
return session.
File "/usr/lib/
resp = self.send(prep, **send_kwargs)
File "/usr/lib/
r = adapter.
File "/usr/lib/
resp = conn.urlopen(
File "/usr/lib/
httplib_
File "/usr/lib/
self.
File "/usr/lib/
conn.connect()
File "/usr/lib/
self.sock = ssl_wrap_socket(
File "/usr/lib/
ssl_sock = _ssl_wrap_
File "/usr/lib/
return ssl_context.
File "/usr/lib/
return self.sslsocket_
File "/usr/lib/
self.
File "/usr/lib/
self.
KeyboardInterrupt
# Now upgrade and demonstrate the problem is fixed
ubuntu@avoton02:~$ sudo apt install python3- simplestreams simplestreams -y simplestreams simplestreams archive. ubuntu. com/ubuntu hirsute- proposed/ main amd64 python3- simplestreams all 0.1.0-30- g3cc8988a- 0ubuntu1. 21.04.1 [31.8 kB] simplestreams_ 0.1.0-30- g3cc8988a- 0ubuntu1. 21.04.1_ all.deb ... simplestreams (0.1.0- 30-g3cc8988a- 0ubuntu1. 21.04.1) over (0.1.0- 30-g3cc8988a- 0ubuntu1) ... ms_0.1. 0-30-g3cc8988a- 0ubuntu1. 21.04.1_ all.deb ... 30-g3cc8988a- 0ubuntu1. 21.04.1) over (0.1.0- 30-g3cc8988a- 0ubuntu1) ... simplestreams (0.1.0- 30-g3cc8988a- 0ubuntu1. 21.04.1) ... 30-g3cc8988a- 0ubuntu1. 21.04.1) ...
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be upgraded:
python3-
2 upgraded, 0 newly installed, 0 to remove and 68 not upgraded.
Need to get 31.8 kB/37.8 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://
Fetched 31.8 kB in 0s (119 kB/s)
(Reading database ... 79414 files and directories currently installed.)
Preparing to unpack .../python3-
Unpacking python3-
Preparing to unpack .../simplestrea
Unpacking simplestreams (0.1.0-
Setting up python3-
Setting up simplestreams (0.1.0-
Scanning processes...
Scanning processor microcode...
Scanning linux images...
Running kernel seems to be up-to-date.
The processor microcode seems to be up-to-date.
No services need to be restarted.
No containers need to be restarted.
No user sessions are running outdated binaries. python3/ dist-packages/ urllib3/ connectionpool. py", line 382, in _make_request _validate_ conn(conn) python3/ dist-packages/ urllib3/ connectionpool. py", line 1012, in _validate_conn python3/ dist-packages/ urllib3/ connection. py", line 411, in connect python3/ dist-packages/ urllib3/ util/ssl_ .py", line 428, in ssl_wrap_socket socket_ impl( python3/ dist-packages/ urllib3/ util/ssl_ .py", line 472, in _ssl_wrap_ socket_ impl wrap_socket( sock, server_ hostname= server_ hostname) python3. 9/ssl.py" , line 500, in wrap_socket class._ create( python3. 9/ssl.py" , line 1040, in _create do_handshake( ) python3. 9/ssl.py" , line 1309, in do_handshake _sslobj. do_handshake( )
ubuntu@avoton02:~$ python3 ./repro.py & sleep 60
[1] 3605
Traceback (most recent call last):
File "/usr/lib/
self.
File "/usr/lib/
conn.connect()
File "/usr/lib/
self.sock = ssl_wrap_socket(
File "/usr/lib/
ssl_sock = _ssl_wrap_
File "/usr/lib/
return ssl_context.
File "/usr/lib/
return self.sslsocket_
File "/usr/lib/
self.
File "/usr/lib/
self.
socket.timeout: _ssl.c:1106: The handshake operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last): python3/ dist-packages/ requests/ adapters. py", line 439, in send python3/ dist-packages/ urllib3/ connectionpool. py", line 755, in urlopen python3/ dist-packages/ urllib3/ util/retry. py", line 531, in increment type(error) , error, _stacktrace) python3/ dist-packages/ six.py" , line 703, in reraise python3/ dist-packages/ urllib3/ connectionpool. py", line 699, in urlopen response = self._make_request( python3/ dist-packages/ urllib3/ connectionpool. py", line 385, in _make_request _raise_ timeout( err=e, url=url, timeout_ value=conn. timeout) python3/ dist-packages/ urllib3/ connectionpool. py", line 336, in _raise_timeout exceptions. ReadTimeoutErro r: HTTPSConnection Pool(host= 'images. maas.io' , port=443): Read timed out. (read timeout=10)
File "/usr/lib/
resp = conn.urlopen(
File "/usr/lib/
retries = retries.increment(
File "/usr/lib/
raise six.reraise(
File "/usr/lib/
raise value
File "/usr/lib/
httplib_
File "/usr/lib/
self.
File "/usr/lib/
raise ReadTimeoutError(
urllib3.
During handling of the above exception, another exception occurred:
Traceback (most recent call last): ubuntu/ ./repro. py", line 6, in <module> er(url) python3/ dist-packages/ simplestreams/ contentsource. py", line 382, in __init__ python3/ dist-packages/ requests/ api.py" , line 76, in get python3/ dist-packages/ requests/ api.py" , line 61, in request request( method= method, url=url, **kwargs) python3/ dist-packages/ requests/ sessions. py", line 542, in request python3/ dist-packages/ requests/ sessions. py", line 655, in send send(request, **kwargs) python3/ dist-packages/ requests/ adapters. py", line 529, in send exceptions. ReadTimeout: HTTPSConnection Pool(host= 'images. maas.io' , port=443): Read timed out. (read timeout=10)
File "/home/
r = RequestsUrlRead
File "/usr/lib/
self.req = requests.get(
File "/usr/lib/
return request('get', url, params=params, **kwargs)
File "/usr/lib/
return session.
File "/usr/lib/
resp = self.send(prep, **send_kwargs)
File "/usr/lib/
r = adapter.
File "/usr/lib/
raise ReadTimeout(e, request=request)
requests.
[1]+ Exit 1 python3 ./repro.py