connection.py / create_connection blocks forever if socket.getaddrinfo stalls · Issue #3588 · urllib3/urllib3 · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was not able to determine if they ended up implementing an always-terminating behavior on all OS and whether that even is to the exact point of the problem here.
Log
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/home/sleischnig/sandbox/mb-inst-stable/ws/path/spl-infra/python/spl_infra/cli/__main__.py", line 5, in <module>
sys.exit(main())
^^^^^^
File "/home/sleischnig/sandbox/mb-inst-stable/ws/path/spl-infra/python/spl_infra/cli/__init__.py", line 25, in main
app = create_app(repo_path)
^^^^^^^^^^^^^^^^^^^^^
[elided for privacy]
File "/home/sleischnig/sandbox/mb-inst-stable/ws/<...>", line 159, in from_path
gl_project = session.projects.get(path_with_namespace)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sleischnig/sandbox/mb-inst-stable/.cache/PythonEnv/__main_____main__/lib/python3.12/site-packages/gitlab/v4/objects/projects.py", line 871, in get
return cast(Project, super().get(id=id, lazy=lazy, **kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sleischnig/sandbox/mb-inst-stable/.cache/PythonEnv/__main_____main__/lib/python3.12/site-packages/gitlab/exceptions.py", line 344, in wrapped_f
return f(*args, **kwargs)
^^^^^^^^^^^^^^^^^^
File "/home/sleischnig/sandbox/mb-inst-stable/.cache/PythonEnv/__main_____main__/lib/python3.12/site-packages/gitlab/mixins.py", line 125, in get
server_data = self.gitlab.http_get(path, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sleischnig/sandbox/mb-inst-stable/.cache/PythonEnv/__main_____main__/lib/python3.12/site-packages/gitlab/client.py", line 813, in http_get
result = self.http_request(
^^^^^^^^^^^^^^^^^^
File "/home/sleischnig/sandbox/mb-inst-stable/.cache/PythonEnv/__main_____main__/lib/python3.12/site-packages/gitlab/client.py", line 737, in http_request
result = self._backend.http_request(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sleischnig/sandbox/mb-inst-stable/.cache/PythonEnv/__main_____main__/lib/python3.12/site-packages/gitlab/_backends/requests_backend.py", line 157, in http_request
response: requests.Response = self._client.request(
^^^^^^^^^^^^^^^^^^^^^
File "/home/sleischnig/sandbox/mb-inst-stable/ws/path/vims-layer-simlei-base/shared/pack/dev/opt/gv/mb-module/PythonEnv_venv/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sleischnig/sandbox/mb-inst-stable/ws/path/vims-layer-simlei-base/shared/pack/dev/opt/gv/mb-module/PythonEnv_venv/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sleischnig/sandbox/mb-inst-stable/ws/path/vims-layer-simlei-base/shared/pack/dev/opt/gv/mb-module/PythonEnv_venv/lib/python3.12/site-packages/requests/adapters.py", line 669, in send
method=request.method,
^^^^^^^^^^^^^^^^^^^
File "/home/sleischnig/sandbox/mb-inst-stable/ws/path/vims-layer-simlei-base/shared/pack/dev/opt/gv/mb-module/PythonEnv_venv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 787, in urlopen
response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "/home/sleischnig/sandbox/mb-inst-stable/ws/path/vims-layer-simlei-base/shared/pack/dev/opt/gv/mb-module/PythonEnv_venv/lib/python3.12/site-packages/urllib3/connectionpool.py", line 493, in _make_request
conn.request(
File "/home/sleischnig/sandbox/mb-inst-stable/ws/path/vims-layer-simlei-base/shared/pack/dev/opt/gv/mb-module/PythonEnv_venv/lib/python3.12/site-packages/urllib3/connection.py", line 445, in request
self.endheaders()
File "/home/sleischnig/sandbox/mb-inst-stable/ws/path/simlei_python/installation/lib/python3.12/http/client.py", line 1333, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/home/sleischnig/sandbox/mb-inst-stable/ws/path/simlei_python/installation/lib/python3.12/http/client.py", line 1093, in _send_output
self.send(msg)
File "/home/sleischnig/sandbox/mb-inst-stable/ws/path/simlei_python/installation/lib/python3.12/http/client.py", line 1037, in send
self.connect()
File "/home/sleischnig/sandbox/mb-inst-stable/ws/path/vims-layer-simlei-base/shared/pack/dev/opt/gv/mb-module/PythonEnv_venv/lib/python3.12/site-packages/urllib3/connection.py", line 276, in connect
self.sock = self._new_conn()
^^^^^^^^^^^^^^^^
File "/home/sleischnig/sandbox/mb-inst-stable/ws/path/vims-layer-simlei-base/shared/pack/dev/opt/gv/mb-module/PythonEnv_venv/lib/python3.12/site-packages/urllib3/connection.py", line 214, in _new_conn
self, f"Failed to establish a new connection: {e}"
^^^
KeyboardInterrupt
I had to Control-C the process to error out eventually...
The text was updated successfully, but these errors were encountered:
Environment
Problem
My problem is, the connection.py request does not time out ever.
I traced it down to
urllib3/src/urllib3/util/connection.py
Line 60 in 2f68c53
Here, the
socket.getaddrinfo()
is not returning.Expectation
The timeout to apply to all connection-setup-related things like getaddrinfo, too.
Research
https://groups.google.com/g/python-tulip/c/-SFI8kkQEj4
I was not able to determine if they ended up implementing an always-terminating behavior on all OS and whether that even is to the exact point of the problem here.
Log
I had to Control-C the process to error out eventually...
The text was updated successfully, but these errors were encountered: