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

Remote SSH Interactive Terminal crashes suddenly #11791

Closed
lucacerone opened this issue May 13, 2020 · 7 comments
Closed

Remote SSH Interactive Terminal crashes suddenly #11791

lucacerone opened this issue May 13, 2020 · 7 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug

Comments

@lucacerone
Copy link

lucacerone commented May 13, 2020

Bug: Notebook Editor, Interactive Window, Editor cells

Steps to cause the bug to occur

In a remote workspace I open a Python file.

I select some lines and execute "Run Selection/Line in Python terminal".

The integratedShell opens, load ipython (I set this up) and the command is executed.

I have the following in the workspace settings.json

    "python.terminal.launchArgs": [
        "-m",
        "IPython",
        "--no-autoindent"
    ]

Actual behavior

After some time executing lines in the terminal, I just see a message:

"Killed" and the shell crashes.

The remote host has plenty of free RAM and the CPU load is very low.

The crash sometimes occurs also when executing lines that run correctly in other occasions.

Expected behavior

I would like to be able to execute commands in the shell, as long as I have free memory
and cpus.

Your Jupyter and/or Python environment

User settings:

{
    // Python Projects Settings
    "python.pythonPath": "path/to/a/conda/env",
    "python.linting.pylintEnabled": false,
    "python.linting.mypyEnabled": true,
    "python.linting.enabled": true,
    "python.formatting.provider": "black",
    "[python]": {
        "editor.formatOnPaste": false
    },
    "python.terminal.launchArgs": [
        "-m",
        "IPython",
        "--no-autoindent"
    ],
    // IDE Settings
    "workbench.colorTheme": "Default Light+",
    "editor.formatOnPaste": true,
    "workbench.settings.useSplitJSON": true,
    "workbench.settings.editor": "json",
    "files.autoSave": "afterDelay",
    "files.autoSaveDelay": 1000,
    "files.watcherExclude": {
        "**/.git/objects/**": true,
        "**/.git/subtree-cache/**": true,
        "**/node_modules/*/**": true,
        "**/.hg/store/**": true
    },
    "workbench.editor.enablePreview": false,
    "workbench.startupEditor": "welcomePage",
    "terminal.integrated.inheritEnv": false,
    "git.confirmSync": false,
    "terminal.integrated.shell.linux": "/bin/bash",
}

Workspace Settings:

```json
{
    "python.pythonPath": "/path/to/project/venv/bin/python",
    "python.linting.mypyEnabled": true,
    "python.linting.enabled": true,
}

Developer Tools Console Output

Microsoft Data Science for VS Code Engineering Team: @rchiodo, @IanMatthewHuff, @DavidKutu, @DonJayamanne, @greazer

@lucacerone lucacerone added data science bug Issue identified by VS Code Team member as probable bug labels May 13, 2020
@ghost ghost added the triage-needed Needs assignment to the proper sub-team label May 13, 2020
@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label May 14, 2020
@lucacerone
Copy link
Author

Hi, I have a question, does VS Code limit the amount of memory available to the console/terminal? Could it be possible that even though I have plenty of memory availabe, I pass the max limit allowed and that's why the process is killed?

@ericsnowcurrently
Copy link
Member

@lucacerone, I'm not aware of any such limit and find it unlikely. However, it is possible. Let's look at a few other things before we go down that path. Please provide the content of the "Python" output panel. Also, what happens when you drop the "--no-autoindent" flag from your setting? What happens when you run IPython manually in the terminal window (with and without the flag)?

@ericsnowcurrently
Copy link
Member

Related: #8945, #11803, #11435

@ericsnowcurrently ericsnowcurrently added the info-needed Issue requires more information from poster label May 18, 2020
@lucacerone
Copy link
Author

Hi @ericsnowcurrently first of all many thanks for your answer.
I am now working with much less data and the issue didn't happen anymore, but as soon as I will use larger amount of data I'll post the output.

But really it was something like:

myfunction(x)
Killed

I have opened an IPythin shell in a terminal and I didn't run into issues (but again I am using much less data now).

What I realized though is that even when I have no python shell open (just vscode with a couple of files opened, and a couple of bash shells), vscode server is using around 18GB of RAM on the remote host.

@lucacerone
Copy link
Author

lucacerone commented May 21, 2020

@ericsnowcurrently ok, so now I went back to working with large data structures (2GB of text more or less)

And I was was working in an IPython shell called from bash within VS Code with python -m IPython.

When loading a parquet file the shell just crashed (note that I could import the file previously in the same shell.. Also if I work with Ipython from a bash shell outside of VS Code I never run into such issues.

import pandas as pd
In [13]: text = pd.read_parquet(text_file)                                                                                                                                                
Killed
(venv) ubuntu@hostname:/data/text-files

@lucacerone
Copy link
Author

Nope I am sorry, now it happened also in an ipython shell outside of VSCode, so I don't think it is an issue with VSCode server

@ericsnowcurrently
Copy link
Member

Thanks for the update. I was about to ask if the same thing happens with the Python extension disabled. 🙂 It sounds like that's irrelevant. If there's anything else we can do please let us know.

@ghost ghost removed the triage label May 27, 2020
@ericsnowcurrently ericsnowcurrently removed the info-needed Issue requires more information from poster label May 27, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 16, 2021
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
Projects
None yet
Development

No branches or pull requests

4 participants