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

Jupyter Collaboration prevents JupyterLab from being killed from the terminal #161

Open
martinRenou opened this issue Jun 7, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@martinRenou
Copy link
Member

Issue

Installing jupyter_collaboration results in not being able to kill JupyterLab from the terminal.

Reproduce

  1. Install jupyterlab and jupyter_collaboration
  2. Create a Notebook, so that you create at least one room
  3. Try to kill jupyterlab with Ctrl + C in the terminal

Attempts to fix the issue

After some investigation, it looks like this sys.exit call does not work as expected even though it properly raises a SystemExit.

One reason for sys.exit to not work can be a hanging thread or subprocess that has not been terminated.

My investigations so far have been:

None of these attempts fixed the issue. Though I think the refactor of the tasks cleanup could be good to include anyway.

@martinRenou martinRenou added the bug Something isn't working label Jun 7, 2023
@martinRenou
Copy link
Member Author

I'm out of ideas for now. I feel like the "AnyIO worker thread" could be the culprit, but I don't know who creates it.

@davidbrochart
Copy link
Collaborator

One idea: BaseException catches all built-in exceptions, while Exception catches all built-in, non-system-exiting exceptions. I think KeyboardInterrupt is a system-exiting exception.
Maybe we catch BaseException instead of Exception somewhere, preventing it to be propagated up the stack?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants