Skip to content
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

Maximum recursion depth exceeded #185

Closed
kravietz opened this issue Aug 20, 2018 · 1 comment
Closed

Maximum recursion depth exceeded #185

kravietz opened this issue Aug 20, 2018 · 1 comment

Comments

@kravietz
Copy link
Contributor

I'm getting this exceptions during execution of task dev-sec.os-hardening : minimize access and since the task crawls through a number of directories with binaries (/bin, /usr/bin etc) I suspect this is related to the number of binaries in each of them. Specifically, the task only crashes in /usr/bin which has over 2100 binaries in my system, while other dirs have just around a hundred.

An exception occurred during task execution. To see the full traceback, use -vvv. The error was: RuntimeError: maximum recursion depth exceeded in __instancecheck__
failed: [tyler] (item={'_ansible_parsed': True, u'stat': {u'charset': u'binary', u'uid': 0, u'exists': True, u'attr_flags': u'Ie', u'woth': False, u'isreg': False, u'device_type': 0, u'mtime': 1534792111.616, u'block_size': 4096, u'inode': 1602, u'isgid': False, u'size': 28672, u'executable': True, u'roth': True, u'isuid': False, u'readable': True, u'version': u'18446744073006874116', u'pw_name': u'root', u'gid': 0, u'ischr': False, u'wusr': True, u'writeable': True, u'isdir': True, u'blocks': 64, u'xoth': True, u'rusr': True, u'nlink': 2, u'issock': False, u'rgrp': True, u'gr_name': u'root', u'path': u'/usr/bin', u'xusr': True, u'atime': 1534792113.544, u'mimetype': u'inode/directory', u'ctime': 1534792111.616, u'isblk': False, u'xgrp': True, u'dev': 2049, u'wgrp': False, u'isfifo': False, u'mode': u'0755', u'islnk': False, u'attributes': [u'indexed', u'extents']}, u'changed': False, '_ansible_no_log': False, 'failed': False, '_ansible_item_result': True, 'item': u'/usr/bin', u'invocation': {u'module_args': {u'checksum_algorithm': u'sha1', u'get_checksum': True, u'follow': False, u'path': u'/usr/bin', u'get_md5': None, u'get_mime': True, u'get_attributes': True}}, '_ansible_ignore_errors': None, '_ansible_item_label': u'/usr/bin'}) => {"changed": false, "item": {"changed": false, "failed": false, "invocation": {"module_args": {"checksum_algorithm": "sha1", "follow": false, "get_attributes": true, "get_checksum": true, "get_md5": null, "get_mime": true, "path": "/usr/bin"}}, "item": "/usr/bin", "stat": {"atime": 1534792113.544, "attr_flags": "Ie", "attributes": ["indexed", "extents"], "block_size": 4096, "blocks": 64, "charset": "binary", "ctime": 1534792111.616, "dev": 2049, "device_type": 0, "executable": true, "exists": true, "gid": 0, "gr_name": "root", "inode": 1602, "isblk": false, "ischr": false, "isdir": true, "isfifo": false, "isgid": false, "islnk": false, "isreg": false, "issock": false, "isuid": false, "mimetype": "inode/directory", "mode": "0755", "mtime": 1534792111.616, "nlink": 2, "path": "/usr/bin", "pw_name": "root", "readable": true, "rgrp": true, "roth": true, "rusr": true, "size": 28672, "uid": 0, "version": "18446744073006874116", "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": true, "xoth": true, "xusr": true}}, "module_stderr": "Traceback (most recent call last):\n  File \"/tmp/ansible_zi3u_L/ansible_module_file.py\", line 742, in <module>\n    main()\n  File \"/tmp/ansible_zi3u_L/ansible_module_file.py\", line 728, in main\n    result = ensure_directory(path, follow, recurse)\n  File \"/tmp/ansible_zi3u_L/ansible_module_file.py\", line 465, in ensure_directory\n    changed |= recursive_set_attributes(b_path, follow, file_args)\n  File \"/tmp/ansible_zi3u_L/ansible_module_file.py\", line 251, in recursive_set_attributes\n    changed |= recursive_set_attributes(b_fsname, follow, file_args)\n  File \"/tmp/ansible_zi3u_L/ansible_module_file.py\", line 251, in recursive_set_attributes\n    changed |= recursive_set_attributes(b_fsname, follow, file_args)\n  File \"/tmp/ansible_zi3u_L/ansible_module_file.py\", line 251, in recursive_set_attributes\n    changed |= recursive_set_attributes(b_fsname, follow, file_args)\n  File \"/tmp/ansible_zi3u_L/ansible_module_file.py\", line 251, in recursive_set_attributes\n    changed |= recursive_set_attributes(b_fsname, follow, file_args)\n  File \"/tmp/ansible_zi3u_L/ansible_module_file.py\", line 251, in recursive_set_attributes\n    changed |= recursive_set_attributes(b_fsname, follow, file_args)\n  File \"/tmp/ansible_zi3u_L/ansible_module_file.py\", line 251, in recursive_set_attributes\n    changed |= recursive_set_attributes(b_fsname, follow, file_args)\n  File \"/tmp/ansible_zi3u_L/ansible_module_file.py\", line 251, in recursive_set_attributes\n    changed |= recursive_set_attributes(b_fsname, follow, file_args)\n  File \"/tmp/ansible_zi3u_L/ansible_module_file.py\", line 251, in recursive_set_attributes\n    changed |= recursive_set_attributes(b_fsname, follow, file_args)\n  File \"/tmp/ansible_zi3u_L/ansible_module_file.py\", line 251, in recursive_set_attributes\n    changed |= recursive_set_attributes(b_fsname, follow, file_args)\n  File \"/tmp/ansible_zi3u_L/ansible_module_file.py\", line 251,
@rndmh3ro
Copy link
Member

Hey @kravietz, thanks for reporting.
I believe, you're hitting this bug: #171

Can you try again with the master-branch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants