Open julienlavergne opened 1 month ago
I pinpointed the issue with an upgrade of gevent dependency. Version 24.10.2
has the issue, but version 24.2.1
does not. Could you freeze that dependency while figuring out what is wrong ?
Hrm that's a big jump in versions, we should try pin down the exact version with the issue and ideally an issue on gevent's side to track against before disabling.
Describe the bug
A exception is raise when running some tasks on 13 hosts. I do not get the error when running only on 4 hosts, or only 1 hosts. I suspect the error shows more often as the number of hosts increases.
PyInfra v3.1.1
I noticed it happends with machines on which the
Connecting to hosts
part takes a bit of time (1-3 seconds). When I use hosts that connects in less than ~1 sec, there is not issue.In some occasions, I only get the Key Error _print_spinner Exception, but then the process is able to continue without facing any other Exception.
EDIT: I confirm that I can trigger the issue when using only 2 hosts that are slow to connect to.
To Reproduce
I was not able to create a minimal reproducible example. My set of files always reproduces the issue. But when I reduce it, the error disappear. So it may have something to do with a particular timing.
@docker
connector (helps isolate the problem)Expected behavior
No exception
Meta
Include output of
pyinfra --support
.-vv
and--debug
.--> Loading config... --> Loading inventory... --> Connecting to hosts... No host key for host08 found in known_hosts No host key for host07 found in known_hosts No host key for host03 found in known_hosts No host key for host08 found in known_hosts No host key for host04 found in known_hosts No host key for host09 found in known_hosts No host key for host11 found in known_hosts No host key for host07 found in known_hosts No host key for host05 found in known_hosts No host key for host10 found in known_hosts No host key for host01 found in known_hosts No host key for host06 found in known_hosts No host key for host02 found in known_hosts [host08] Connected [host07] Connected [host03] Connected [host04] Connected [host11] Connected [host09] Connected [host08] Connected [host05] Connected [host10] Connected [host07] Connected [host06] Connected [host01] Connected [host02] Connected
--> Preparing operations... --> Preparing Operations... Loading: my_task.py Traceback (most recent call last): File "src/gevent/greenlet.py", line 906, in gevent._gevent_cgreenlet.Greenlet.run File "/opt/tools/python-3.11.8/lib/python3.11/threading.py", line 1002, in _bootstrap self._bootstrap_inner() File "/opt/tools/python-3.11.8/lib/python3.11/threading.py", line 1037, in _bootstrap_inner del _limbo[self]