Skip to content

Lots of jedi subprocesses created until memory runs out #7144

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

Closed
dorellang opened this issue Aug 29, 2019 · 9 comments
Closed

Lots of jedi subprocesses created until memory runs out #7144

dorellang opened this issue Aug 29, 2019 · 9 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster

Comments

@dorellang
Copy link

It seems to be a regression of #3586 and #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 How to update the language server to the latest stable version #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.
@dorellang dorellang added triage-needed Needs assignment to the proper sub-team bug Issue identified by VS Code Team member as probable bug labels Aug 29, 2019
@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Aug 29, 2019
@karrtikr
Copy link

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.

Can you please provide the file content where you call autocomplete, not aware of it. Thanks!

@karrtikr karrtikr added the info-needed Issue requires more information from poster label Aug 29, 2019
@wj-c
Copy link

wj-c commented Sep 3, 2019

I have the same issue. Lots of processes are spawned after using the extension for a while.
批注 2019-09-01 212403

@karrtikr
Copy link

@wj-c Processes maybe spawned, but are those being killed when you stop using the extension?

@wj-c
Copy link

wj-c commented Sep 14, 2019 via email

@deitry
Copy link

deitry commented Sep 23, 2019

Hi.
There is also similar problem for pylint: #4236
I found recently that processes do not die automatically when spawned for files with errors. Maybe there is something common in these issues?

@karrtikr
Copy link

karrtikr commented Sep 24, 2019

@wj-c Apologies, not sure what might be happening there. Are child process being created in the python code? I am not able to reproduce this just with any code. Please try to provide a reproducible case and create a new issue as it might be a different one.

@deitry Thanks for pointing to that. Unfortunately without a reproducible case, there's not much we can do here.

@karrtikr
Copy link

Closing the original issue for now as no further response was provided by @dorellang . I'll happy to reopen and address this if further clarification is provided.

@ghost ghost removed the triage label Sep 24, 2019
@deitry
Copy link

deitry commented Sep 25, 2019

@karrtikr
See #4236 (comment)
At least for me with pylint - described way reproduces issue 10 times of 10.

@DonJayamanne
Copy link

DonJayamanne commented 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.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

6 participants