mitogen: mitogen crashed with "error: unpack requires a string argument of length 12"
Hi,
trying the lastest mitogen is crashing with “error: unpack requires a string argument of length 12” while running an apt task - the traceback is:
TASK [jmetex : install jmetex] *******************************************************************************************************************************************************************************************************************************************************************************************************************************************
task path: /Users/tom/repo/infrastructure/ansible/roles/jmetex/tasks/main.yml:6
[pid 9967] 17:29:19 D mitogen: unix.connect(path='/var/folders/jd/tvrdj3v55_z5ql3mgb4jky1c0000gn/T/mitogen_unix_Dc8KhF')
[pid 9953] 17:29:19 D mitogen: register(Context(9, None), mitogen.core.Stream('unix_client.9967'))
[pid 9967] 17:29:19 D mitogen: unix.connect(): local ID is 9, remote is 0
[pid 9967] 17:29:19 D mitogen: register(Context(0, None), mitogen.core.Stream('unix_listener.9953'))
[pid 9967] 17:29:19 D mitogen: Context(0, None).send_async(Message(None, 9, 9, 500, 1000, '\x80\x02}q\x01(U\x08usernameq\x02X\t\x00\x00\x00teichhornq\x03U\x0fcheck_host_key'..298))
[pid 9953] 17:29:19 D mitogen: put() done. woken? True
[pid 9967] 17:29:19 D mitogen: put() done. woken? True
[pid 9967] 17:29:19 D mitogen: Context(0, None).send_async(Message(None, 9, 9, 500, 1001, '\x80\x02}q\x01(U\x08usernameq\x02X\x04\x00\x00\x00rootq\x03U\x03viaq\x04cmitogen.core\n'..224))
[pid 9953] 17:29:19 D mitogen: put() done. woken? True
[pid 9967] 17:29:19 D mitogen: put() done. woken? True
[pid 9967] 17:29:19 D mitogen: Context(5, u'ssh.10.90.4.46.sudo.root').call_async(<function run_module at 0x10a470140>, *('ansible.modules.packaging.os.apt',), **{'args': {'_ansible_version': '2.4.3.0', '_ansible_selinux_special_fs': ['fuse', 'nfs', 'vboxsf', 'ramfs', '9p'], u'name': u'jmetex', '_ansible_module_name': u'apt', '_ansible_syslog_facility': u'LOG_USER', '_ansible_verbosity': 3, '_ansible_socket': None, '_ansible_diff': False, '_ansible_debug': False, '_ansible_shell_executable': u'/bin/sh', '_ansible_check_mode': False, '_ansible_no_log': False}, 'env': {}})
[pid 9967] 17:29:19 D mitogen: Context(5, u'ssh.10.90.4.46.sudo.root').send_async(Message(None, 9, 9, 101, 1002, '\x80\x02(U\x17ansible_mitogen.helpersq\x01NU\nrun_moduleq\x02U ans'..486))
[pid 9968] 17:29:19 D mitogen: unix.connect(path='/var/folders/jd/tvrdj3v55_z5ql3mgb4jky1c0000gn/T/mitogen_unix_Dc8KhF')
[pid 9953] 17:29:19 E mitogen: <mitogen.unix.Listener object at 0x10a47e3d0> crashed
Traceback (most recent call last):
File "/Users/tom/repo/mitogen/mitogen/core.py", line 1185, in _call
func(self)
File "/Users/tom/repo/mitogen/mitogen/unix.py", line 81, in on_receive
pid, = struct.unpack('>L', sock.recv(4))
error: [Errno 35] Resource temporarily unavailable
[pid 9953] 17:29:19 D mitogen: <mitogen.unix.Listener object at 0x10a47e3d0>.on_disconnect()
[pid 9968] 17:29:19 D ansible_mitogen.connection: Call run_module('ansible.modules.packaging.os.apt',) took 7 ms
The full traceback is:
Traceback (most recent call last):
File "/usr/local/Cellar/ansible/2.4.3.0/libexec/lib/python2.7/site-packages/ansible/executor/task_executor.py", line 130, in run
res = self._execute()
File "/usr/local/Cellar/ansible/2.4.3.0/libexec/lib/python2.7/site-packages/ansible/executor/task_executor.py", line 528, in _execute
result = self._handler.run(task_vars=variables)
File "/Users/tom/repo/mitogen/ansible_mitogen/mixins.py", line 128, in run
return super(ActionModuleMixin, self).run(tmp, task_vars)
File "/usr/local/Cellar/ansible/2.4.3.0/libexec/lib/python2.7/site-packages/ansible/plugins/action/normal.py", line 45, in run
results = merge_hash(results, self._execute_module(tmp=tmp, task_vars=task_vars, wrap_async=wrap_async))
File "/Users/tom/repo/mitogen/ansible_mitogen/mixins.py", line 308, in _execute_module
env=cast(env),
File "/Users/tom/repo/mitogen/ansible_mitogen/mixins.py", line 137, in call
return self._connection.call(func, *args, **kwargs)
File "/Users/tom/repo/mitogen/ansible_mitogen/connection.py", line 238, in call
return self.call_async(func, *args, **kwargs).get().unpickle()
File "/Users/tom/repo/mitogen/ansible_mitogen/connection.py", line 224, in call_async
self._connect()
File "/Users/tom/repo/mitogen/ansible_mitogen/connection.py", line 192, in _connect
self.router, self.parent = mitogen.unix.connect(path)
File "/Users/tom/repo/mitogen/mitogen/unix.py", line 100, in connect
mitogen.context_id, remote_id, pid = struct.unpack('>LLL', sock.recv(12))
error: unpack requires a string argument of length 12
fatal: [DE-IX-001-02-02-05-4]: FAILED! => {
"msg": "Unexpected failure during module execution.",
"stdout": ""
}
Ansible and python versions:
ansible 2.4.3.0
config file = /Users/tom/.ansible.cfg
configured module search path = [u'/Users/tom/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/Cellar/ansible/2.4.3.0/libexec/lib/python2.7/site-packages/ansible
executable location = /usr/local/bin/ansible
python version = 2.7.10 (default, Jul 15 2017, 17:16:57) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)]
The relevant playbook part is this:
- name: install jmetex
apt:
name: jmetex
If you need further outputs please ask! You’re work is awesome!
Thanks, Tom
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 21 (13 by maintainers)
Commits related to this issue
- issue #131: import something clean that might tickle the problem — committed to mitogen-hq/mitogen by dw 6 years ago
- issue #131: test with forks=50 — committed to mitogen-hq/mitogen by dw 6 years ago
- issue #131: log stack and PPID with MITOGEN_ROUTER_DEBUG=1 — committed to mitogen-hq/mitogen by dw 6 years ago
- issue #131: disable non-blocking IO during UNIX accept() accept() (per interface) returns a non-blocking socket because the listener socket is in non-blocking mode, therefore it is pure scheduling lu... — committed to mitogen-hq/mitogen by dw 6 years ago
- issue #131: import something clean that might tickle the problem — committed to mitogen-hq/mitogen by dw 6 years ago
- issue #131: test with forks=50 — committed to mitogen-hq/mitogen by dw 6 years ago
- issue #131: log stack and PPID with MITOGEN_ROUTER_DEBUG=1 — committed to mitogen-hq/mitogen by dw 6 years ago
- issue #131: disable non-blocking IO during UNIX accept() accept() (per interface) returns a non-blocking socket because the listener socket is in non-blocking mode, therefore it is pure scheduling lu... — committed to mitogen-hq/mitogen by dw 6 years ago
- Merge pull request #131 from spearlineltd/australia-melbourne Adding configration files for australia-melbourne — committed to cyara/mitogen by ra-patel 3 years ago
Hi, I can confirm this error is gone
Finally managed to reproduce this locally. WIP