-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mitogen randomly complains about broken connections when using synchronize module within a loop #925
Comments
Forgot to mention that |
I can second the issue, although my tasks hasn't failed, just seen the Exception ignored. Ansible 2.12.5 I didn't see this problem in Mitogen 2.10 and Ansible 2.9 We rely heavily on this fantastic framework that has greatly improved run time of our playbooks. Been using it daily since beginning of 2019! |
That's weird, because initially I've discovered this bug with ansible 2.9.27 and mitogen 0.2.10, and it still fails for me with other 2.9.x. @rlinq |
So I've tracked it down to 3584084. Commenting Seems like connections don't leak for now as I couldn't reproduce the problem described in #140. Developer's answer in ansible/ansible#37411 also states that forcing connections to close by calling |
I recalled versions from my memory, not having access to that versions right now. The ansible version was pre 2.9.24 if I recall correctly. Looks like you have isolated the issue, great work! |
Refs mitogen-hq#925 mitogen-hq#969 I'm not 100% confident that merely removing this is the full fix, without substituting something else. I am sure keeping it would be the greater of two evils. __del__() should be avoided on general principal, and it's associated with multiple intermittant CI failures, plus multiple user reported issues.
Refs mitogen-hq#925 mitogen-hq#969 I'm not 100% confident that merely removing this is the full fix, without substituting something else. I am sure keeping it would be the greater of two evils. __del__() should be avoided on general principal, and it's associated with multiple intermittant CI failures, plus multiple user reported issues.
Seems like this can be closed. I encountered a conflict when updating my mitogen branch as the problematic code has been removed (0af2ce8). |
Refs mitogen-hq#925 mitogen-hq#969 I'm not 100% confident that merely removing this is the full fix, without substituting something else. I am sure keeping it would be the greater of two evils. __del__() should be avoided on general principal, and it's associated with multiple intermittant CI failures, plus multiple user reported issues.
I see mysterious tracebacks from mitogen appearing in the play output when using synchronize module. Sometimes these tracebacks don't affect the play and things seem to work okay, and sometimes they are followed by "An exception occurred during task execution" error from ansible and thus fail the task.
This is the shortest playbook to reproduce the problem I could come up with:
So here we have
gather_facts: no
, 3 elements in a list, a regular filezero
(obviously, it has zero length), and the error is usually triggered after the second (!) iteration.It becomes a bit tricky to get stable errors when using
gather_facts: yes
, but the general rule is: more items in a loop - more chances to make something go wrong. According to my tests, the following playbook has high chances to fail:It doesn't seem to depend on
synchronize
params much, as it fails when pointing to nonexistent source file too, or even when rsync is not installed on host machine. I can also reproduce the issue with different ansible (2.8.15, 3.2.0, 4.5.0, 5.7.0) and mitogen (0.2.10) versions, and with python 2.7 on the target, and I couldn't find a combination of recent ansible and mitogen versions which works properly.Host system:
python:3.10
)The only lines in my
ansible.cfg
are:Target system:
The text was updated successfully, but these errors were encountered: