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

Getting coverage results in Too many open files error in some cases #174

Open
afsafzal opened this issue Jan 14, 2019 · 1 comment
Open
Labels

Comments

@afsafzal
Copy link
Member

When build_traces is building many traces, it stops working after a while due to this error:

failed to build trace 475: 512eae84
Traceback (most recent call last):
  File "experiments/build_traces.py", line 69, in trace
    trace = sandbox.run_and_trace(mission.commands)
  File "/home/afsoon/Houston-forked/houston/ardu/sandbox.py", line 345, in run_and_trace
    coverage = self.__get_coverage(directory=directory)
  File "/home/afsoon/Houston-forked/houston/ardu/sandbox.py", line 362, in __get_coverage
    coverage = self._bugzoo.coverage.extract(self.container)
  File "/home/afsoon/python3.5-venv/lib/python3.5/site-packages/bugzoo/mgr/coverage.py", line 325, in extract
    mgr_ctr.copy_from(container, fn_temp_ctr, fn_temp_host)
  File "/home/afsoon/python3.5-venv/lib/python3.5/site-packages/bugzoo/mgr/container.py", line 478, in copy_from
    subprocess.check_output(cmd, shell=True)
  File "/usr/lib/python3.5/subprocess.py", line 626, in check_output
    **kwargs).stdout
  File "/usr/lib/python3.5/subprocess.py", line 693, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.5/subprocess.py", line 947, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.5/subprocess.py", line 1454, in _execute_child
    errpipe_read, errpipe_write = os.pipe()
OSError: [Errno 24] Too many open files
generating trace for mission 478: 5fa8c670
>>> Skipping invalid cmd #176^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
last_wp: [2, 5] len: 10
failed to build trace 477: 2d3183ea
Traceback (most recent call last):
  File "/home/afsoon/python3.5-venv/lib/python3.5/site-packages/urllib3/connectionpool.py", line 600, in urlopen
  File "/home/afsoon/python3.5-venv/lib/python3.5/site-packages/urllib3/connectionpool.py", line 354, in _make_request
  File "/usr/lib/python3.5/http/client.py", line 1106, in request
  File "/usr/lib/python3.5/http/client.py", line 1151, in _send_request
  File "/usr/lib/python3.5/http/client.py", line 1102, in endheaders
  File "/usr/lib/python3.5/http/client.py", line 934, in _send_output
  File "/usr/lib/python3.5/http/client.py", line 877, in send
  File "/home/afsoon/python3.5-venv/lib/python3.5/site-packages/docker/transport/unixconn.py", line 44, in connect
  File "/usr/lib/python3.5/socket.py", line 134, in __init__
OSError: [Errno 24] Too many open files

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/afsoon/python3.5-venv/lib/python3.5/site-packages/requests/adapters.py", line 445, in send
  File "/home/afsoon/python3.5-venv/lib/python3.5/site-packages/urllib3/connectionpool.py", line 638, in urlopen
  File "/home/afsoon/python3.5-venv/lib/python3.5/site-packages/urllib3/util/retry.py", line 367, in increment
  File "/home/afsoon/python3.5-venv/lib/python3.5/site-packages/urllib3/packages/six.py", line 685, in reraise
  File "/home/afsoon/python3.5-venv/lib/python3.5/site-packages/urllib3/connectionpool.py", line 600, in urlopen
  File "/home/afsoon/python3.5-venv/lib/python3.5/site-packages/urllib3/connectionpool.py", line 354, in _make_request
  File "/usr/lib/python3.5/http/client.py", line 1106, in request
  File "/usr/lib/python3.5/http/client.py", line 1151, in _send_request
  File "/usr/lib/python3.5/http/client.py", line 1102, in endheaders
  File "/usr/lib/python3.5/http/client.py", line 934, in _send_output
  File "/usr/lib/python3.5/http/client.py", line 877, in send
  File "/home/afsoon/python3.5-venv/lib/python3.5/site-packages/docker/transport/unixconn.py", line 44, in connect
  File "/usr/lib/python3.5/socket.py", line 134, in __init__
urllib3.exceptions.ProtocolError: ('Connection aborted.', OSError(24, 'Too many open files'))
@afsafzal
Copy link
Member Author

This is a known BugZoo issue. Relevant issue in flask: psf/requests#239

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

No branches or pull requests

2 participants