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

Python language server forever analysing workspace #2579

Closed
jarshwah opened this issue Sep 14, 2018 · 1 comment
Closed

Python language server forever analysing workspace #2579

jarshwah opened this issue Sep 14, 2018 · 1 comment
Labels
area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. bug Issue identified by VS Code Team member as probable bug

Comments

@jarshwah
Copy link

jarshwah commented Sep 14, 2018

The new python language server improved dramatically for python 2.7 projects in the August/September release, but it still seems to be getting stuck analysing the workspace.

The CPU spikes for a long time and RAM use continues to increase. It always seems to stall on the same number of items in my particular project (over 100k line project with many modules).

analysing-workspace

I'm not sure how to debug this issue, but I'm happy to help as much as possible if I'm pointed in the right direction.

Environment data

  • VS Code version: 1.27.2
  • Extension version (available under the Extensions sidebar): 2018.8.0
  • OS and version: OSX 10.13.6
  • Python version (& distribution if applicable, e.g. Anaconda): python 2.7.14 installed with pyenv
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): pyenv virtualenv
  • Relevant/affected Python packages and their versions: see below for pip freeze output
pip freeze output
alabaster==0.7.10
amqp==1.4.9
anyjson==0.3.3
appnope==0.1.0
argh==0.26.2
asn1crypto==0.24.0
aspy.yaml==1.1.1
atomicwrites==1.1.5
attrs==18.1.0
awscli==1.14.61
Babel==2.5.3
backports.csv==1.0.5
backports.shutil-get-terminal-size==1.0.0
beautifulsoup4==4.6.0
billiard==3.3.0.23
bleach==2.0.0
boto==2.48.0
botocore==1.9.14
braintree==3.40.0
cached-property==1.4.3
cairocffi==0.8.1
CairoSVG==1.0.22
celery==3.1.25
certifi==2018.1.18
cffi==1.11.5
cfgv==1.1.0
chardet==3.0.4
click==6.7
cloudinary==1.11.0
colorama==0.3.7
configparser==3.5.0
contextlib2==0.5.5
cookies==2.2.1
coreapi==2.3.3
coreschema==0.0.4
coverage==4.5.1
cryptography==2.3
cssmin==0.2.0
cssselect==1.0.3
cssutils==1.0.2
decorator==4.3.0
dj-database-url==0.5.0
Django==1.11.14
django-admin-rangefilter==0.3.2
django-ajax-selects==1.7.0
django-apptemplates==1.4
django-codemirror-widget==0.4.1
django-cors-headers==2.2.0
django-dbsettings==0.10.0
django-debug-toolbar==1.9.1
django-extensions==2.0.6
django-filter==1.1.0
django-getenv==1.3.2
django-grappelli==2.10.2
django-js-asset==1.1.0
django-model-utils==3.1.1
django-mptt==0.9.0
django-picklefield==1.0.0
django-polymorphic==2.0.2
django-ratelimit==1.1.0
django-redis==4.9.0
django-rest-swagger==2.1.2
django-reversion==2.0.13
django-storages==1.6.6
django-taggit==0.22.2
django-taggit-autosuggest==0.3.3
django-waffle==0.14.0
django-wysiwyg-redactor==0.5.1
djangorestframework==3.7.7
docutils==0.14
edgegrid-python==1.1.0
elasticsearch==5.4.0
elasticsearch-dsl==5.4.0
enum34==1.1.6
factory-boy==2.10.0
Faker==0.8.12
flake8==3.5.0
flake8-blind-except==0.1.1
flake8-builtins==1.4.1
flake8-comprehensions==1.4.1
flake8-debugger==3.1.0
flake8-isort==2.5
flake8-mutable==1.2.0
flake8-pep3101==1.2.1
flake8-print==3.1.0
flake8-string-format==0.2.3
flake8-tidy-imports==1.1.0
fpconst==0.7.2
freezegun==0.3.10
funcsigs==1.0.2
future==0.16.0
futures==3.2.0
gdata==2.0.18
generateDS==2.22a0
google-api-python-client==1.6.7
googleads==10.1.0
gunicorn==19.7.1
hiredis==0.2.0
html5lib==1.0.1
httplib2==0.11.3
identify==1.1.3
idna==2.6
ijson==2.3
imagesize==1.0.0
inlinestyler==0.2.5
ipaddress==1.0.22
ipdb==0.11
ipython==5.6.0
ipython-genutils==0.2.0
isort==4.3.4
itypes==1.1.0
Jinja2==2.10
jmespath==0.9.3
jsonfield==2.0.2
jsonpickle==0.9.6
kombu==3.0.37
librabbitmq==2.0.0
linecache2==1.0.0
lru-dict==1.1.6
lxml==4.2.1
Markdown==2.6.11
MarkupSafe==1.0
mccabe==0.6.1
mixpanel==4.3.2
mock==2.0.0
more-itertools==4.2.0
ndg-httpsclient==0.5.0
networkx==2.1
newrelic==4.2.0.100
nltk==3.3
nodeenv==1.3.2
numpy==1.14.5
oauth2client==4.1.2
oauthlib==2.1.0
openapi-codec==1.3.2
ordereddict==1.1
packaging==17.1
pathlib==1.0.1
pathlib2==2.3.2
pathtools==0.1.2
pbr==4.1.0
pexpect==4.6.0
pickleshare==0.7.4
Pillow==5.1.0
pipenv==2018.7.1
pluggy==0.6.0
pre-commit==1.10.3
PredictionIO==0.9.8
prompt-toolkit==1.0.15
psutil==5.4.3
psycopg2==2.7.4
psycopg2-binary==2.7.4
ptyprocess==0.6.0
pwned-passwords-django==1.2.dev0
py==1.5.4
pyasn1==0.4.3
pyasn1-modules==0.2.2
pycodestyle==2.3.1
pycparser==2.18
pycrypto==2.6.1
pyflakes==1.6.0
Pygments==2.2.0
PyJWT==1.6.4
pylibmc==1.5.2
pyOpenSSL==18.0.0
pyparsing==2.2.0
Pyphen==0.9.4
PySocks==1.6.8
pytest==3.6.2
pytest-cov==2.5.1
pytest-django==3.3.2
pytest-env==0.6.2
python-dateutil==2.7.0
python-gcm==0.4
python-gnupg==0.4.1
python-openid==2.2.5
pytz==2018.5
PyYAML==3.13
raven==6.6.0
react-render-client==1.0.0
redis==2.10.6
requests==2.18.4
requests-oauthlib==1.0.0
responses==0.8.1
review-ipsum==0.0.2
rsa==3.4.2
s3transfer==0.1.13
scandir==1.7
Sift==3.2.0.0
simplegeneric==0.8.1
simplejson==3.16.0
six==1.11.0
snowballstemmer==1.2.1
social-auth-app-django==2.1.0
social-auth-core==1.7.0
Sphinx==1.7.4
sphinx-rtd-theme==0.3.1
sphinxcontrib-websupport==1.0.1
sqlparse==0.2.4
suds-jurko==0.6
termcolor==1.1.0
testfixtures==6.2.0
text-unidecode==1.2
textile==3.0.0
textrank==0.1.0
tinycss==0.4
toml==0.9.4
traceback2==1.4.0
traitlets==4.3.2
typing==3.6.4
ua-parser==0.7.3
Unidecode==1.0.22
unittest-xml-reporting==2.1.1
unittest2==1.1.0
uritemplate==3.0.0
urllib3==1.23
user-agents==1.1.0
versiontools==1.9.1
virtualenv==16.0.0
virtualenv-clone==0.3.0
watchdog==0.8.3
wcwidth==0.1.7
WeasyPrint==0.36
webencodings==0.5.1
Werkzeug==0.14.1
wrapt==1.10.11
xmltodict==0.11.0
yapf==0.21.0

Actual behavior

Analzying never completes and uses up system resources

Expected behavior

Analyzing does complete and remains mostly idle

Steps to reproduce:

Enable the new python language server and open a file.

Logs

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

Starting Microsoft Python language server.
Initializing for /Users/josh/.pyenv/versions/k3env/bin/python
##########Linting Output - flake8##########
##########Linting Output - flake8##########

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

Dev Tools Logs
INFO no standard startup: not a new window
/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3260 [PeterJausovec.vscode-docker]: Command `vscode-docker.delete-ACR-Image` appears multiple times in the `commands` section.
/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3260 [samverschueren.final-newline]: Cannot register 'files.insertFinalNewline'. This property is already registered.
w._logMessageInConsole @ /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3260
/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3260 [xabikos.JavaScriptSnippets]: Unknown language in `contributes.JavaScriptSnippets.language`. Provided value: vue
w._logMessageInConsole @ /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3260
/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:276 [Extension Host] add-new-line-to-files is now active!
/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:276 [Extension Host] vscode-icons is active!
2/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:276 [Extension Host] Git extension API method 'getGitPath' is deprecated.
t.log @ /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:276
/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:276 [Extension Host] Failed to get interpreter information for '/Users/josh/.virtualenvs/django-scratch-mhwc5JMB/bin/python' SyntaxError: Unexpected token d in JSON at position 0
	at JSON.parse ()
	at PythonExecutionService. (/Users/josh/Google Drive/Mackup/.vscode/extensions/ms-python.python-2018.8.0/out/client/common/process/pythonProcess.js:42:35)
	at Generator.next ()
	at fulfilled (/Users/josh/Google Drive/Mackup/.vscode/extensions/ms-python.python-2018.8.0/out/client/common/process/pythonProcess.js:12:58)
	at 
t.log @ /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:276
/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:276 [Extension Host] Failed to get interpreter information for '/Users/josh/.virtualenvs/django-scratch-mhwc5JMB/bin/python3' SyntaxError: Unexpected token d in JSON at position 0
	at JSON.parse ()
	at PythonExecutionService. (/Users/josh/Google Drive/Mackup/.vscode/extensions/ms-python.python-2018.8.0/out/client/common/process/pythonProcess.js:42:35)
	at Generator.next ()
	at fulfilled (/Users/josh/Google Drive/Mackup/.vscode/extensions/ms-python.python-2018.8.0/out/client/common/process/pythonProcess.js:12:58)
	at 
t.log @ /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:276
/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:276 [Extension Host] Failed to get interpreter information for '/Users/josh/.virtualenvs/django-scratch-mhwc5JMB/bin/python3.6' SyntaxError: Unexpected token d in JSON at position 0
	at JSON.parse ()
	at PythonExecutionService. (/Users/josh/Google Drive/Mackup/.vscode/extensions/ms-python.python-2018.8.0/out/client/common/process/pythonProcess.js:42:35)
	at Generator.next ()
	at fulfilled (/Users/josh/Google Drive/Mackup/.vscode/extensions/ms-python.python-2018.8.0/out/client/common/process/pythonProcess.js:12:58)
	at 
t.log @ /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:276
/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:276 [Extension Host] Failed to get interpreter information for '/Users/josh/.virtualenvs/ksub/bin/python' SyntaxError: Unexpected token d in JSON at position 0
	at JSON.parse ()
	at PythonExecutionService. (/Users/josh/Google Drive/Mackup/.vscode/extensions/ms-python.python-2018.8.0/out/client/common/process/pythonProcess.js:42:35)
	at Generator.next ()
	at fulfilled (/Users/josh/Google Drive/Mackup/.vscode/extensions/ms-python.python-2018.8.0/out/client/common/process/pythonProcess.js:12:58)
	at 
t.log @ /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:276
/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:276 [Extension Host] Failed to get interpreter information for '/Users/josh/.virtualenvs/ksub/bin/python2' SyntaxError: Unexpected token d in JSON at position 0
	at JSON.parse ()
	at PythonExecutionService. (/Users/josh/Google Drive/Mackup/.vscode/extensions/ms-python.python-2018.8.0/out/client/common/process/pythonProcess.js:42:35)
	at Generator.next ()
	at fulfilled (/Users/josh/Google Drive/Mackup/.vscode/extensions/ms-python.python-2018.8.0/out/client/common/process/pythonProcess.js:12:58)
	at 
t.log @ /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:276
/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:276 [Extension Host] Failed to get interpreter information for '/Users/josh/.virtualenvs/ksub/bin/python2.7' SyntaxError: Unexpected token d in JSON at position 0
	at JSON.parse ()
	at PythonExecutionService. (/Users/josh/Google Drive/Mackup/.vscode/extensions/ms-python.python-2018.8.0/out/client/common/process/pythonProcess.js:42:35)
	at Generator.next ()
	at fulfilled (/Users/josh/Google Drive/Mackup/.vscode/extensions/ms-python.python-2018.8.0/out/client/common/process/pythonProcess.js:12:58)
	at 
t.log @ /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:276
/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:276 [Extension Host] Failed to get interpreter information for '/Users/josh/.virtualenvs/django-scratch-mhwc5JMB/bin/python' SyntaxError: Unexpected token d in JSON at position 0
	at JSON.parse ()
	at PythonExecutionService. (/Users/josh/Google Drive/Mackup/.vscode/extensions/ms-python.python-2018.8.0/out/client/common/process/pythonProcess.js:42:35)
	at Generator.next ()
	at fulfilled (/Users/josh/Google Drive/Mackup/.vscode/extensions/ms-python.python-2018.8.0/out/client/common/process/pythonProcess.js:12:58)
	at 
t.log @ /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:276
/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:276 [Extension Host] Failed to get interpreter information for '/Users/josh/.virtualenvs/django-scratch-mhwc5JMB/bin/python3' SyntaxError: Unexpected token d in JSON at position 0
	at JSON.parse ()
	at PythonExecutionService. (/Users/josh/Google Drive/Mackup/.vscode/extensions/ms-python.python-2018.8.0/out/client/common/process/pythonProcess.js:42:35)
	at Generator.next ()
	at fulfilled (/Users/josh/Google Drive/Mackup/.vscode/extensions/ms-python.python-2018.8.0/out/client/common/process/pythonProcess.js:12:58)
	at 
t.log @ /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:276
/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:276 [Extension Host] Failed to get interpreter information for '/Users/josh/.virtualenvs/django-scratch-mhwc5JMB/bin/python3.6' SyntaxError: Unexpected token d in JSON at position 0
	at JSON.parse ()
	at PythonExecutionService. (/Users/josh/Google Drive/Mackup/.vscode/extensions/ms-python.python-2018.8.0/out/client/common/process/pythonProcess.js:42:35)
	at Generator.next ()
	at fulfilled (/Users/josh/Google Drive/Mackup/.vscode/extensions/ms-python.python-2018.8.0/out/client/common/process/pythonProcess.js:12:58)
	at 
t.log @ /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:276
/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:276 [Extension Host] Failed to get interpreter information for '/Users/josh/.virtualenvs/ksub/bin/python' SyntaxError: Unexpected token d in JSON at position 0
	at JSON.parse ()
	at PythonExecutionService. (/Users/josh/Google Drive/Mackup/.vscode/extensions/ms-python.python-2018.8.0/out/client/common/process/pythonProcess.js:42:35)
	at Generator.next ()
	at fulfilled (/Users/josh/Google Drive/Mackup/.vscode/extensions/ms-python.python-2018.8.0/out/client/common/process/pythonProcess.js:12:58)
	at 
t.log @ /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:276
/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:276 [Extension Host] Failed to get interpreter information for '/Users/josh/.virtualenvs/ksub/bin/python2' SyntaxError: Unexpected token d in JSON at position 0
	at JSON.parse ()
	at PythonExecutionService. (/Users/josh/Google Drive/Mackup/.vscode/extensions/ms-python.python-2018.8.0/out/client/common/process/pythonProcess.js:42:35)
	at Generator.next ()
	at fulfilled (/Users/josh/Google Drive/Mackup/.vscode/extensions/ms-python.python-2018.8.0/out/client/common/process/pythonProcess.js:12:58)
	at 
t.log @ /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:276
/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:276 [Extension Host] Failed to get interpreter information for '/Users/josh/.virtualenvs/ksub/bin/python2.7' SyntaxError: Unexpected token d in JSON at position 0
	at JSON.parse ()
	at PythonExecutionService. (/Users/josh/Google Drive/Mackup/.vscode/extensions/ms-python.python-2018.8.0/out/client/common/process/pythonProcess.js:42:35)
	at Generator.next ()
	at fulfilled (/Users/josh/Google Drive/Mackup/.vscode/extensions/ms-python.python-2018.8.0/out/client/common/process/pythonProcess.js:12:58)
	at 
t.log @ /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:276
2/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:1411   ERR Cannot read property 'map' of null: TypeError: Cannot read property 'map' of null
	at asCompletionResult (/Users/josh/Google Drive/Mackup/.vscode/extensions/ms-python.python-2018.8.0/node_modules/vscode-languageclient/lib/protocolConverter.js:145:51)
	at 
@d3r3kk d3r3kk added bug Issue identified by VS Code Team member as probable bug area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. needs verification labels Sep 14, 2018
@DonJayamanne
Copy link

Closing as a duplicate of #2297

@lock lock bot locked as resolved and limited conversation to collaborators Oct 13, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

3 participants