ssh connection_plugin deadlock

Hi,

I’ve been trying to figure out why that happens for almost 1 day now, but still cannot get to any solution.

I’m using the Runner to run the setup module against a set of servers, and it is defined this way:
runner = Runner(
        module_name="setup",
        module_args="",
        inventory=inventory_manager,
        pattern=pattern,
        run_hosts=run_hosts,
        sudo=True,
        forks=1,
        timeout=15
    )

This fails sometimes ( random, as far as I’ve seen ), sending a Traceback because i ssh plugin fails to get lock on the socket:

Traceback (most recent call last):\n File "/usr/lib/python2.6/site-packages/ansible/runner/__init__.py", line 590, in _executor\n exec_rc = self._executor_internal(host, new_stdin)\n File "/usr/lib/python2.6/site-packages/ansible/runner/__init__.py", line 793, in _executor_internal\n return self._executor_internal_inner(host, self.module_name, self.module_args, inject, port, complex_args=complex_args)\n File "/usr/lib/python2.6/site-packages/ansible/runner/__init__.py", line 962, in _executor_internal_inner\n conn = self.connector.connect(actual_host, actual_port, actual_user, actual_pass, actual_transport, actual_private_key_file)\n File "/usr/lib/python2.6/site-packages/ansible/runner/connection.py", line 35, in connect\n conn = utils.plugins.connection_loader.get(transport, self.runner, host, port, user=user, password=password, private_key_file=private_key_file)\n File "/usr/lib/python2.6/site-packages/ansible/utils/plugins.py", line 222, in get\n return getattr(self._module_cache[path], self.class_name)(*args, **kwargs)\n File "/usr/lib/python2.6/site-packages/ansible/runner/connection_plugins/ssh.py", line 51, in __init__\n fcntl.lockf(self.runner.process_lockfile, fcntl.LOCK_EX)\nIOError: [Errno 35] Resource deadlock avoided\n

The runner is working on 1 host at a time and it does not run concurrently on the same host.

Anyone has an idea on why that’s happening?

Thanks,

Andrea