question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Orphaned processes every time I save resulting in my mac running out of file descriptors

See original GitHub issue

Environment data

  • VS Code version: 1.29.1
  • Extension version (available under the Extensions sidebar): 2018.11.0
  • OS and version: macOS Mojave 10.14.1
  • Python version (& distribution if applicable, e.g. Anaconda): 3.7.1 (via Homebrew)
  • Type of virtual environment used (N/A | venv | virtualenv | conda | …): Pipenv
  • Relevant/affected Python packages and their versions: n/a

Expected behaviour

I expect this plugin to run at most 1 process? Or at least kill the processes it no longer needs.

Actual behaviour

It creates a new python process everytime I edit my code. These pile up until my OS runs out of file descriptors. screenshot 2018-12-04 at 14 05 55

Steps to reproduce:

  1. Just having this plugin on my machine produces the same results every time I edit python code.
  2. It might be relevant to note that I’m using Pipenv?

Logs

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

(nothing...)

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help)

console.ts:134 [Extension Host] Python Extension: stderr jediProxy, Error (stderr)     self._kill()

t.log @ console.ts:134
console.ts:134 [Extension Host] Python Extension: stderr jediProxy, Error (stderr)   File "/Users/sithembiso/.vscode/extensions/ms-python.python-2018.11.0/pythonFiles/jedi/evaluate/compiled/subprocess/__init__.py", line 207, in _kill

t.log @ console.ts:134
console.ts:134 [Extension Host] Python Extension: stderr jediProxy, Error (stderr)     self._process.kill()
t.log @ console.ts:134
console.ts:134 [Extension Host] Python Extension: stderr jediProxy, Error (stderr) 
  File "/Users/sithembiso/.vscode/extensions/ms-python.python-2018.11.0/pythonFiles/jedi/cache.py", line 143, in wrapper

t.log @ console.ts:134
console.ts:134 [Extension Host] Python Extension: stderr jediProxy, Error (stderr)     result = method(self, *args, **kwargs)

t.log @ console.ts:134
console.ts:134 [Extension Host] Python Extension: stderr jediProxy, Error (stderr)   File "/Users/sithembiso/.vscode/extensions/ms-python.python-2018.11.0/pythonFiles/jedi/evaluate/compiled/subprocess/__init__.py", line 177, in _process

t.log @ console.ts:134
console.ts:134 [Extension Host] Python Extension: stderr jediProxy, Error (stderr)     bufsize=-1
t.log @ console.ts:134
console.ts:134 [Extension Host] Python Extension: stderr jediProxy, Error (stderr) 
  File "/Users/sithembiso/.vscode/extensions/ms-python.python-2018.11.0/pythonFiles/jedi/_compatibility.py", line 525, in __init__

t.log @ console.ts:134
console.ts:134 [Extension Host] Python Extension: stderr jediProxy, Error (stderr)     super(GeneralizedPopen, self).__init__(*args, **kwargs)
t.log @ console.ts:134
console.ts:134 [Extension Host] Python Extension: stderr jediProxy, Error (stderr) 
  File "/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 769, in __init__

t.log @ console.ts:134
console.ts:134 [Extension Host] Python Extension: stderr jediProxy, Error (stderr)     restore_signals, start_new_session)
t.log @ console.ts:134
console.ts:134 [Extension Host] Python Extension: stderr jediProxy, Error (stderr) 
  File "/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 1447, in _execute_child

t.log @ console.ts:134
console.ts:134 [Extension Host] Python Extension: stderr jediProxy, Error (stderr)     restore_signals, start_new_session, preexec_fn)
t.log @ console.ts:134
console.ts:134 [Extension Host] Python Extension: stderr jediProxy, Error (stderr) 
BlockingIOError: [Errno 35] Resource temporarily unavailable

t.log @ console.ts:134
console.ts:134 [Extension Host] Python Extension: stderr jediProxy, Error (stderr) Traceback (most recent call last):
  File "/Users/sithembiso/.vscode/extensions/ms-python.python-2018.11.0/pythonFiles/jedi/cache.py", line 141, in wrapper
    return dct[key]
KeyError: ((), frozenset())

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/sithembiso/.vscode/extensions/ms-python.python-2018.11.0/pythonFiles/jedi/api/environment.py", line 74, in _get_subprocess
    info = self._subprocess._send(None, _get_info)
  File "/Users/sithembiso/.vscode/extensions/ms-python.python-2018.11.0/pythonFiles/jedi/evaluate/compiled/subprocess/__init__.py", line 229, in _send
    pickle_dump(data, self._process.stdin, self._pickle_protocol)
  File "/Users/sithembiso/.vscode/extensions/ms-python.python-2018.11.0/pythonFiles/jedi/cache.py", line 143, in wrapper
    result = method(self, *args, **kwargs)
  File "/Users/sithembiso/.vscode/extensions/ms-python.python-2018.11.0/pythonFiles/jedi/evaluate/compiled/subprocess/__init__.py", line 177, in _process
    bufsize=-1
  File "/Users/sithembiso/.vscode/extensions/ms-python.python-2018.11.0/pythonFiles/jedi/_compatibility.py", line 525, in __init__
    super(GeneralizedPopen, self).__init__(*args, **kwargs)
  File "/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 769, in __init__
    restore_signals, start_new_session)
  File "/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 1447, in _execute_child
    restore_signals, start_new_session, preexec_fn)
BlockingIOError: [Errno 35] Resource temporarily unavailable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "completion.py", line 620, in watch
    response = self._process_request(rq)
  File "completion.py", line 564, in _process_request
    all_scopes=True),
  File "/Users/sithembiso/.vscode/extensions/ms-python.python-2018.11.0/pythonFiles/jedi/api/__init__.py", line 474, in names
    script = Script(source, line=1, column=0, path=path, encoding=encoding, environment=environment)
  File "/Users/sithembiso/.vscode/extensions/ms-python.python-2018.11.0/pythonFiles/jedi/api/__init__.py", line 108, in __init__
    project, environment=environment, script_path=self.path
  File "/Users/sithembiso/.vscode/extensions/ms-python.python-2018.11.0/pythonFiles/jedi/evaluate/__init__.py", line 94, in __init__
    self.compiled_subprocess = environment.get_evaluator_subprocess(self)
  File "/Users/sithembiso/.vscode/extensions/ms-python.python-2018.11.0/pythonFiles/jedi/api/environment.py", line 113, in get_evaluator_subprocess
    return EvaluatorSubprocess(evaluator, self._get_subprocess())
  File "/Users/sithembiso/.vscode/extensions/ms-python.python-2018.11.0/pythonFiles/jedi/api/environment.py", line 79, in _get_subprocess
    exc))
jedi.api.environment.InvalidPythonEnvironment: Could not get version information for '/Users/sithembiso/.local/share/virtualenvs/lepsta-6UJ54azG/bin/python': BlockingIOError(35, 'Resource temporarily unavailable')

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
davidhaltercommented, Dec 15, 2018

I only just realized how bad this issue was. Big sorry for that. I therefore did a release immediately. (0.13.2)

1reaction
mlcdfcommented, Dec 4, 2018

It looks related to this issue https://github.com/davidhalter/jedi/issues/1242.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Locating file descriptor leak in OS X application - Stack Overflow
The biggest problem on Solaris is getting the file descriptor for the file in the kernel code that closes orphaned file descriptors. Solaris ......
Read more >
Find and remove large files that are open but have been deleted
The situation is that we are running a process that is filling up a log file at a terrific rate. I know the...
Read more >
Is there a fix for the "Too many open files in system" error on ...
I am running command line phpUnit tests > selenium server > firefox > apache > php > mysql all on the same macbook....
Read more >
Mac OS X Manual Page For intro(2) - Apple Developer
This document is a Mac OS X manual page. Manual pages are a command-line technology for providing documentation. You can view these manual...
Read more >
How to diagnose 'TOO MANY OPEN FILES' issues? - IBM
Answer. Applications or servers can sometimes fail with an error indicating that there are too many open files for the current process.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found