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

"Too many open files" crash on master #4130

Closed
akerl opened this issue Sep 16, 2013 · 2 comments
Closed

"Too many open files" crash on master #4130

akerl opened this issue Sep 16, 2013 · 2 comments

Comments

@akerl
Copy link
Contributor

akerl commented Sep 16, 2013

When I run ansible-playbook on HEAD, I get the following traceback:

TASK: [Check known pacnews] ***************************************************
ok: [grego] => (item={'path': '/etc/fstab', 'old': '4ebaee2c67a0e6df3def1fbd8ce5194d07ca6546', 'new': 'a805082718eb9814229968ab11be76a8d34d6033', 'keep': 'old'})
changed: [grego] => (item={'path': '/etc/pacman.d/mirrorlist', 'old': '162f45764216fe0cc2697c5ca63f901032f26ea6', 'new': 'ANY', 'keep': 'old'})
ok: [grego] => (item={'path': '/etc/shadow', 'old': 'ANY', 'new': 'e0d59e5430b4dd9c6ed721e29de450487d4ad89f', 'keep': 'old'})
ok: [grego] => (item={'path': '/etc/gshadow', 'old': '1dbb1d43b8c1854898589bb6d1ea92d49be508c6', 'new': 'c96a71de4466893f090905f536f418ddac708e71', 'keep': 'old'})
ok: [grego] => (item={'path': '/etc/passwd', 'old': '110262be0777e00239aa9413eba1bd9f8e82e84c', 'new': '5db8ef768aa79940d0c28347ebfa8755cfb53920', 'keep': 'old'})
ok: [grego] => (item={'path': '/etc/group', 'old': 'fe85b1c169d6ecff70868e05d762dd7528f65e7c', 'new': '27d785a76a1e5c61f691ce2bbc3cbe441310b7c2', 'keep': 'old'})
ok: [grego] => (item={'path': '/etc/locale.gen', 'old': '13d6ce49547f3bd457364983fab74b254569dd90', 'new': '5672ef37a399b86ef417fa42155777e93840dd53', 'keep': 'new'})
ok: [grego] => (item={'path': '/etc/pacman.conf', 'old': 'd5825b3d61c7e71f16c8790af1cb0a2c429bbff6', 'new': '3c1bddf27602e02fb57801c0ea7313b3869acc92', 'keep': 'old'})
ok: [grego] => (item={'path': '/boot/grub/grub.cfg', 'old': 'NONE', 'new': '5b7fcb0718a23035c039eb2fda9e088bb13ae611', 'keep': 'new'})
ok: [grego] => (item={'path': '/etc/mkinitcpio.conf', 'old': '67ca9a323c979ee93c4c1a5592b02c89564d630e', 'new': 'c27c0ae5797582f47f8db1368fc730658c8d4cfe', 'keep': 'new'})
fatal: [grego] => Traceback (most recent call last):
  File "/usr/local/brew/lib/python2.7/site-packages/ansible/runner/__init__.py", line 368, in _executor
    exec_rc = self._executor_internal(host, new_stdin)
  File "/usr/local/brew/lib/python2.7/site-packages/ansible/runner/__init__.py", line 481, in _executor_internal
    complex_args=complex_args
  File "/usr/local/brew/lib/python2.7/site-packages/ansible/runner/__init__.py", line 612, in _executor_internal_inner
    tmp = self._make_tmp_path(conn)
  File "/usr/local/brew/lib/python2.7/site-packages/ansible/runner/__init__.py", line 736, in _make_tmp_path
    result = self._low_level_exec_command(conn, cmd, None, sudoable=False)
  File "/usr/local/brew/lib/python2.7/site-packages/ansible/runner/__init__.py", line 671, in _low_level_exec_command
    rc, stdin, stdout, stderr = conn.exec_command(cmd, tmp, sudo_user, sudoable=sudoable, executable=executable)
  File "/usr/local/brew/lib/python2.7/site-packages/ansible/runner/connection_plugins/ssh.py", line 165, in exec_command
    stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/usr/local/brew/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 703, in __init__
    errread, errwrite) = self._get_handles(stdin, stdout, stderr)
  File "/usr/local/brew/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1120, in _get_handles
    errread, errwrite = self.pipe_cloexec()
  File "/usr/local/brew/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1153, in pipe_cloexec
    r, w = os.pipe()
OSError: [Errno 24] Too many open files

Here's that task:

-   name: Check known pacnews
    pacnew: >
        path={{item.path}}
        new={{item.new}}
        old={{item.old}}
        keep={{item.keep}}
    with_items: pacnews

It's using my pacnew module: https://github.com/akerl/archer/blob/master/library/pacnew

The full plays and such are here:
https://github.com/akerl/archer

I traced this issue down to 4d1f447, and confirmed it doesn't occur in baffa8d. My test runs are here:

https://gist.github.com/akerl/6584034

Somebody in #ansible suggested I use "-f 1", which I tried; the issue was the same. That run is in the gist as well.

@jimi-c
Copy link
Member

jimi-c commented Sep 16, 2013

I believe this is a duplicate of #3877, so closing this one. @cayblood posted a rough patch that I have not yet tested that fixes the issue for him, if you'd like to give it a try.

@jimi-c jimi-c closed this as completed Sep 16, 2013
@akerl
Copy link
Contributor Author

akerl commented Sep 16, 2013

Wow, my bad for not catching that issue. I'll test out that patch and update there with my results.

@ansible ansible locked and limited conversation to collaborators Apr 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants