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.

Lots of jedi subprocesses created until memory runs out

See original GitHub issue

It seems to be a regression of https://github.com/microsoft/vscode-python/issues/3586 and https://github.com/microsoft/vscode-python/issues/3514 . This started to happen recently (I can’t tell exactly when, but a couple of weeks back I didn’t experience this issue).

Environment data

  • VS Code version: 1.37.1
  • Extension version (available under the Extensions sidebar): 2019.8.30787
  • OS and version: MacOS High Sierra Version 10.13.6
  • Python version (& distribution if applicable, e.g. Anaconda): Python 3.7.3
  • Type of virtual environment used (N/A | venv | virtualenv | conda | …): virtualenv
  • Relevant/affected Python packages and their versions: XXX
  • Jedi or Language Server? (i.e. what is "python.jediEnabled" set to; more info #3977): Jedi

Actual behaviour

After working for a while in a Django project, python completion.py spawns lots of subprocesses that are never killed. Eventually the system runs out of memory and fork fails. You can close the visual studio folder in order to free memory, but it takes a while for the python processes to be killed and the computer gets unresponsive.

Screen Shot 2019-08-29 at 10 30 43 AM

Steps to reproduce:

  1. Open a python project
  2. Browse some files, and on each of them call autocomplete and save several times. After a while you should get a lot processes that won’t go away.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:9

github_iconTop GitHub Comments

1reaction
deitrycommented, Sep 23, 2019

Hi. There is also similar problem for pylint: https://github.com/microsoft/vscode-python/issues/4236 I found recently that processes do not die automatically when spawned for files with errors. Maybe there is something common in these issues?

0reactions
DonJayamannecommented, Sep 25, 2019

@deitry Thanks, however that’s a separate issue even though they may seem related. We’ll monitor/track that issue separately. If indeed they end up being related (generic issue), then we’ll end up fixing this as well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python memory allocation error using subprocess.Popen
The solution is to use posix_spawn, or create all your subprocesses at the beginning of the script, while memory consumption is low, ...
Read more >
What are Python Subprocesses & Why Do They Matter?
A subprocess is a task that is created by a process to complete a task ... would quickly run out of memory for...
Read more >
An Introduction to Subprocess in Python With Examples
Subprocess in Python is used to run new codes by creating new processes. Learn how to use the Python subprocess module along with...
Read more >
(PDF) Memory handling in the ATLAS submission system from job ...
1. Introduction. The ATLAS [1] workload management system is a pilot system that wasn't originally designed · 2. Changes affecting ATLAS jobs memory...
Read more >
subprocess — Subprocess management — Python 3.11.1 ...
When used, the internal Popen object is automatically created with stdout=PIPE and stderr=PIPE . The stdout and stderr arguments may not be supplied...
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