Skip to content

remote ssh but 'python extension loading' forever #9093

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
PeterJaq opened this issue Dec 13, 2019 · 12 comments
Closed

remote ssh but 'python extension loading' forever #9093

PeterJaq opened this issue Dec 13, 2019 · 12 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug windows

Comments

@PeterJaq
Copy link

PeterJaq commented Dec 13, 2019

Environment data

  • VS Code version: 1.41.0 (but not only on this version)
  • Extension version (available under the Extensions sidebar): 2019.11.50794
  • OS and version: Windows 10 1909
  • Python version (& distribution if applicable, e.g. Anaconda): Anaconda Python 3.7
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda
  • 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): MircoSoft Language Server

Expected behaviour

Vscode connect to python extension which on remote server

Actual behaviour

python loading extension forever

image

Logs

User belongs to experiment group 'ShowPlayIcon - start'
User belongs to experiment group 'AA_testing - experiment'
> conda --version
> pyenv root
> python3.7 -c "import sys;print(sys.executable)"
> python3.6 -c "import sys;print(sys.executable)"
> python3 -c "import sys;print(sys.executable)"
> python2 -c "import sys;print(sys.executable)"
> python -c "import sys;print(sys.executable)"
> ~/.conda/envs/hmm-ml/bin/python -c "import sys;print(sys.executable)"
> conda info --json
> conda env list
> conda env list
Starting Microsoft Python language server.

Output from Console under the Developer Tools panel :

[Extension Host] Info Python Extension: 2019-12-13 10:28:03: Rule = settings, result = runNextRule
console.ts:137 [Extension Host] Info Python Extension: 2019-12-13 10:28:03: Executing next rule from settings
console.ts:137 [Extension Host] Info Python Extension: 2019-12-13 10:28:03: Rule = workspaceEnvs, result = runNextRule
console.ts:137 [Extension Host] Info Python Extension: 2019-12-13 10:28:03: Executing next rule from workspaceEnvs
console.ts:137 [Extension Host] Info Python Extension: 2019-12-13 10:28:03: Cached data exists getEnvironmentVariables, extension-output-#2
console.ts:137 [Extension Host] Info Python Extension: 2019-12-13 10:28:03: Cached data exists getEnvironmentVariables, extension-output-#1
console.ts:137 [Extension Host] Info Python Extension: 2019-12-13 10:28:03: Cached data exists getEnvironmentVariables, tasks
console.ts:137 [Extension Host] Info Python Extension: 2019-12-13 10:28:03: autoSelectInterpreter, Class name = f, completed in 11ms, Arg 1: <Uri:tasks>, Return Value: undefined
console.ts:137 [Extension Host] Info Python Extension: 2019-12-13 10:28:03: Get Interpreters in CacheableLocatorService, Class name = g, completed in 10ms, Arg 1: <Uri:tasks>, Return Value: []
2console.ts:137 [Extension Host] Info Python Extension: 2019-12-13 10:28:03: autoSelectInterpreter, Class name = f, completed in 11ms, Arg 1: <Uri:tasks>, Return Value: undefined
console.ts:137 [Extension Host] Info Python Extension: 2019-12-13 10:28:03: Checking support of .NET, Class name = c, completed in 2ms, , Return Value: true
console.ts:137 [Extension Host] Info Python Extension: 2019-12-13 10:28:03: Build the workspace interpreter watcher, Class name = h, completed in 3ms, Arg 1: <Uri:tasks>, Return Value: <Return value cannot be serialized for logging>
log.ts:184  INFO [remote-connection][ExtensionHost][3a85d…][reconnect] reconnected!
log.ts:196   ERR Object has been destroyed: Error: Object has been destroyed
    at WebContents.send (D:\Microsoft VS Code\resources\electron.asar\browser\api\web-contents.js:102:17)
    at IpcMain.<anonymous> (D:\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:502:823)
log.ts:184  INFO [remote-connection][ExtensionHost][3a85d…][reconnect] starting reconnecting loop. You can get more information with the trace log level.
log.ts:184  INFO [remote-connection][ExtensionHost][3a85d…][reconnect] waiting for 5 seconds before reconnecting...
log.ts:184  INFO [remote-connection][ExtensionHost][3a85d…][reconnect] resolving connection...
log.ts:184  INFO [remote-connection][ExtensionHost][3a85d…][reconnect] connecting to 127.0.0.1:50704...
log.ts:184  INFO [remote-connection][ExtensionHost][3a85d…][reconnect] reconnected!
log.ts:184  INFO [remote-connection][ExtensionHost][3a85d…][reconnect] starting reconnecting loop. You can get more information with the trace log level.
log.ts:184  INFO [remote-connection][ExtensionHost][3a85d…][reconnect] waiting for 5 seconds before reconnecting...
log.ts:184  INFO [remote-connection][ExtensionHost][3a85d…][reconnect] resolving connection...
log.ts:184  INFO [remote-connection][ExtensionHost][3a85d…][reconnect] connecting to 127.0.0.1:50704...
log.ts:184  INFO [remote-connection][ExtensionHost][3a85d…][reconnect] reconnected!
log.ts:184  INFO [remote-connection][ExtensionHost][3a85d…][reconnect] starting reconnecting loop. You can get more information with the trace log level.
log.ts:184  INFO [remote-connection][ExtensionHost][3a85d…][reconnect] waiting for 5 seconds before reconnecting...
log.ts:184  INFO [remote-connection][ExtensionHost][3a85d…][reconnect] resolving connection...
log.ts:184  INFO [remote-connection][ExtensionHost][3a85d…][reconnect] connecting to 127.0.0.1:50704...
log.ts:184  INFO [remote-connection][ExtensionHost][3a85d…][reconnect] reconnected!
log.ts:184  INFO [remote-connection][ExtensionHost][3a85d…][reconnect] starting reconnecting loop. You can get more information with the trace log level.
log.ts:184  INFO [remote-connection][ExtensionHost][3a85d…][reconnect] waiting for 5 seconds before reconnecting...
log.ts:184  INFO [remote-connection][ExtensionHost][3a85d…][reconnect] resolving connection...
log.ts:184  INFO [remote-connection][ExtensionHost][3a85d…][reconnect] connecting to 127.0.0.1:50704...
@PeterJaq PeterJaq added triage-needed Needs assignment to the proper sub-team bug Issue identified by VS Code Team member as probable bug labels Dec 13, 2019
@PeterJaq
Copy link
Author

By the way, the extension works well on my Mac.
This issue happened on both two windows 1909 PC.

@IcarusWizard
Copy link

I have the same issue on my Windows 1903. What I observe is that when the python extension is loading, two machines establish unreasonable network traffic of about 70Mb/s through ssh (which is close to my network bandwidth). I think the data they are exchanging is the key to this issue.

@ChopinSharp
Copy link

Same problem here (Python extension + Remote extension) ...
It's really frustrating. Any updates or workarounds? Or I have to switch back to use Pycharm Deployment ...

@PeterJaq
Copy link
Author

Same Situation, also switch back to use Pycharm

@ChopinSharp
Copy link

It seems to be a compatibility problem. After removing all other extensions leaving only the Remote and Python extension, everything works fine.

@IcarusWizard
Copy link

@ChopinSharp You mean removing any other extension on both side or just remote server?

@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Dec 16, 2019
@brettcannon
Copy link
Member

@ChopinSharp any chance you can turn on your other extensions slowly and let us know which combination seems to cause the issue for you? That way we can figure out if it's on our side or the other extension.

@IcarusWizard
Copy link

@brettcannon Hi Brett. I have tried your advice. I unstalled every extension and reinstall them one by one. Everything works like a charm for now, which is wired. Maybe there is a hidden bug that we fail to find.

Here is something I observed which may help you identify what's wrong:

  • The Python Output Log change
    After I reinstall everything, my Log shows:
User belongs to experiment group 'ShowPlayIcon - start'
User belongs to experiment group 'ShowExtensionSurveyPrompt - control'
User belongs to experiment group 'AA_testing - control'
Starting Microsoft Python language server.
> conda --version
> pyenv root
> python3.7 -c "import sys;print(sys.executable)"
> python3.6 -c "import sys;print(sys.executable)"
> python3 -c "import sys;print(sys.executable)"
> python2 -c "import sys;print(sys.executable)"
> python -c "import sys;print(sys.executable)"
> ~/anaconda2/envs/torch/bin/python -c "import sys;print(sys.executable)"
> ~/anaconda2/bin/conda info --json
> ~/anaconda2/bin/conda env list
> ~/anaconda2/bin/conda env list

I am pretty sure, there were some commands like ..../.vscode-server/...../interpretion.py for every conda enviroment on my server. I do not keep the old logs, maybe the name was wrong.

  • Upstream network traffic goes away
    Before I reinstall, the upstream traffic and downstream traffic were basically the same on my local machine. But now, only downstream traffic remains, which is reasonable for the local machine to drag the cache from the server. My theory is there were services on both sides who want to send the data for the other to process. So they form a data exchanging dead loop.

@Bebotron
Copy link

I have the same issue of python extension loading forever, and when I try to open a remote jupyter notebook, it never renders. I can open .py files and syntax highlights just fine, but .ipynb files don't open. Is this related to #5676 or #5691? It doesn't seem like there was a solution but it wasn't too clear, and they're closed so I'm asking here, sorry if it's a bit of a deviation. I get this from Toggle Developer Tools
vscode-devTools (2)
Version: 1.41.0 (system setup)
Commit: 9579eda04fdb3a9bba2750f15193e5fafe16b959
Date: 2019-12-11T17:59:52.065Z
Electron: 6.1.5
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Windows_NT ia32 10.0.18362

@ChopinSharp
Copy link

ChopinSharp commented Dec 17, 2019

@ChopinSharp You mean removing any other extension on both side or just remote server?

On both sides.

@ChopinSharp
Copy link

ChopinSharp commented Dec 17, 2019

@ChopinSharp any chance you can turn on your other extensions slowly and let us know which combination seems to cause the issue for you? That way we can figure out if it's on our side or the other

Sorry, but I can't remember what extention I had installed.

@brettcannon
Copy link
Member

@Bebotron that's a potentially separate issue, so please open a separate bug.

@IcarusWizard thanks for at least trying and we're glad your issue (magically) got resolved!

@ChopinSharp no problem. I'm going to close this issue since no one seems to know how to reproduce it. But if it comes up again and you can provide a reproducer then please feel free to open a another issue.

@ghost ghost removed the triage label Dec 17, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Dec 26, 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 windows
Projects
None yet
Development

No branches or pull requests

6 participants