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

Closing notebook during startup can cause infinite loop setting preferred kernel #15320

Closed
amunger opened this issue Mar 6, 2024 · 3 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster

Comments

@amunger
Copy link
Contributor

amunger commented Mar 6, 2024

I opened vs code with several notebooks open, and started closing them while the extension was still activating.
The logs show that there is some code stuck in a loop. Not much of a usability impact, but really blows up the logs

verbose 15:53:55.651: Jupyter Extension: Notebook document c:\src\test\3\otherlanguages\julia.ipynb got closed
extensionHostProcess.js:144
verbose 15:53:55.703: Jupyter Extension: Preferred Remote kernel for c:\src\test\3\otherlanguages\julia.ipynb is undefined
extensionHostProcess.js:144
verbose 15:53:55.743: Jupyter Extension: Notebook document c:\src\test\3\otherlanguages\julia.ipynb got closed
extensionHostProcess.js:144
verbose 15:53:55.818: Jupyter Extension: Preferred Remote kernel for c:\src\test\3\otherlanguages\julia.ipynb is undefined
extensionHostProcess.js:144
verbose 15:53:55.865: Jupyter Extension: Notebook document c:\src\test\3\otherlanguages\julia.ipynb got closed
extensionHostProcess.js:144
verbose 15:53:55.946: Jupyter Extension: Preferred Remote kernel for c:\src\test\3\otherlanguages\julia.ipynb is undefined
extensionHostProcess.js:144
verbose 15:53:55.973: Jupyter Extension: Notebook document c:\src\test\3\otherlanguages\julia.ipynb got closed
extensionHostProcess.js:144
verbose 15:53:56.065: Jupyter Extension: Preferred Remote kernel for c:\src\test\3\otherlanguages\julia.ipynb is undefined
extensionHostProcess.js:144
verbose 15:53:56.272: Jupyter Extension: Notebook document c:\src\test\3\otherlanguages\julia.ipynb got closed
extensionHostProcess.js:144
verbose 15:53:56.417: Jupyter Extension: Preferred Remote kernel for c:\src\test\3\otherlanguages\julia.ipynb is undefined
extensionHostProcess.js:144
verbose 15:53:56.476: Jupyter Extension: Notebook document c:\src\test\3\otherlanguages\julia.ipynb got closed
@amunger amunger added the bug Issue identified by VS Code Team member as probable bug label Mar 6, 2024
@DonJayamanne
Copy link
Contributor

This looks like a bug in VS Code,
This is the only place we log when a notebook is closed

        workspace.onDidCloseNotebookDocument(
            (e) => {
                traceVerbose(`Notebook document ${getDisplayPath(e.uri)} got closed`);
                this.disposeOldKernel(e.uri);
            },
            this,
            disposables
        );

Given this event can only be fired when a notebook is closed, it looks like VS Code code into a state where the event was fired more than once and leading to this crazy loop.

@rebornix any idea what could cause this?
I'm assuming its a flaky issue.

@amunger Please can you try to replicate this again, I cannot replicate this.

@DonJayamanne DonJayamanne added the info-needed Issue requires more information from poster label Mar 7, 2024
@amunger
Copy link
Contributor Author

amunger commented Mar 7, 2024

I only hit it once, haven't seen it since

@DonJayamanne
Copy link
Contributor

Closing this for now, as there's really nothing in jupyter extension that we can to do address this.
Must have been a flaky vscode issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 22, 2024
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

2 participants