Skip to content

Server does not shut down if a notebook or editor tab was opened recently #503

@paulmromer

Description

@paulmromer

Description

I am running the most recent version of jupyterlab with the jupter-collaboration extension. If

  • I have recently opened a notebook or file in the editor;
  • I leave its tab open, and
  • I select the Shutdown option from the file menu and accept the shutdown confirmation in the dialog,

then the jupyterlab server does not shut down. The terminal shows something like this indefinitely:

Image

If I use CTRL-C after this freeze, or if I use repeated CTRL-C instead of using the Shutdown option, the terminal still fails to shut down.

Reproduce

  1. Create a venv using pip and a requirements.txt file with only
jupyterlab
jupyter-collaboration
  1. Start JupyterLab
  2. Open one or more notebook or editor tabs for existing files
  3. Select the "Shutdown" option from the File menu and accept the shutdown confirmation dialog
  4. Check the status of the server in the terminal window

Expected behavior

The terminal should reveal that the server has stopped by displaying a prompt for user input.

Context

  • Operating System and version: macOS Sequoia 15.7
  • Browser and version: Version 140.0.7339.134 (Official Build) (arm64)
  • JupyterLab version:
IPython          : 9.5.0
ipykernel        : 6.30.1
ipywidgets       : not installed
jupyter_client   : 8.6.3
jupyter_core     : 5.8.1
jupyter_server   : 2.17.0
jupyterlab       : 4.4.9
nbclient         : 0.10.2
nbconvert        : 7.16.6
nbformat         : 5.10.4
notebook         : not installed
qtconsole        : not installed
traitlets        : 5.14.3
Troubleshoot Output
$ jupyter troubleshoot
$PATH:
	/Users/{user-home}/jl_p/.venv/bin
	/Users/{user-home}/.local/bin
	/Users/{user-home}/.nvm/versions/node/v22.17.1/bin
	/Library/Frameworks/Python.framework/Versions/3.13/bin
	/usr/local/bin
	/System/Cryptexes/App/usr/bin
	/usr/bin
	/bin
	/usr/sbin
	/sbin
	/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin
	/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin
	/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin
	/opt/homebrew/bin

sys.path:
/Users/{user-home}/jl_p/.venv/bin
/Library/Frameworks/Python.framework/Versions/3.13/lib/python313.zip
/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13
/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/lib-dynload
/Users/{user-home}/jl_p/.venv/lib/python3.13/site-packages

sys.executable:
/Users/{user-home}/jl_p/.venv/bin/python3.13

sys.version:
3.13.5 (v3.13.5:6cb20a219a8, Jun 11 2025, 12:23:45) [Clang 16.0.0 (clang-1600.0.26.6)]

platform.platform():
macOS-15.7-arm64-arm-64bit-Mach-O

which -a jupyter:
/Users/{user-home}/jl_p/.venv/bin/jupyter

pip list:
Package Version
------------------------- --------------
anyio 4.11.0
appnope 0.1.4
argon2-cffi 25.1.0
argon2-cffi-bindings 25.1.0
arrow 1.3.0
asttokens 3.0.0
async-lru 2.0.5
attrs 25.3.0
babel 2.17.0
beautifulsoup4 4.14.0
bleach 6.2.0
certifi 2025.8.3
cffi 2.0.0
charset-normalizer 3.4.3
comm 0.2.3
debugpy 1.8.17
decorator 5.2.1
defusedxml 0.7.1
executing 2.2.1
fastjsonschema 2.21.2
fqdn 1.5.1
h11 0.16.0
httpcore 1.0.9
httpx 0.28.1
idna 3.10
ipykernel 6.30.1
ipython 9.5.0
ipython_pygments_lexers 1.1.1
isoduration 20.11.0
jedi 0.19.2
Jinja2 3.1.6
json5 0.12.1
jsonpointer 3.0.0
jsonschema 4.25.1
jsonschema-specifications 2025.9.1
jupyter_client 8.6.3
jupyter-collaboration 4.1.1
jupyter-collaboration-ui 2.1.1
jupyter_core 5.8.1
jupyter-docprovider 2.1.1
jupyter-events 0.12.0
jupyter-lsp 2.3.0
jupyter_server 2.17.0
jupyter_server_fileid 0.9.3
jupyter_server_terminals 0.5.3
jupyter-server-ydoc 2.1.1
jupyter-ydoc 3.1.0
jupyterlab 4.4.9
jupyterlab_pygments 0.3.0
jupyterlab_server 2.27.3
lark 1.3.0
MarkupSafe 3.0.3
matplotlib-inline 0.1.7
mistune 3.1.4
nbclient 0.10.2
nbconvert 7.16.6
nbformat 5.10.4
nest-asyncio 1.6.0
notebook_shim 0.2.4
packaging 25.0
pandocfilters 1.5.1
parso 0.8.5
pexpect 4.9.0
pip 25.2
platformdirs 4.4.0
prometheus_client 0.23.1
prompt_toolkit 3.0.52
psutil 7.1.0
ptyprocess 0.7.0
pure_eval 0.2.3
pycparser 2.23
pycrdt 0.12.36
pycrdt-store 0.1.2
pycrdt-websocket 0.16.0
Pygments 2.19.2
python-dateutil 2.9.0.post0
python-json-logger 3.3.0
PyYAML 6.0.3
pyzmq 27.1.0
referencing 0.36.2
requests 2.32.5
rfc3339-validator 0.1.4
rfc3986-validator 0.1.1
rfc3987-syntax 1.1.0
rpds-py 0.27.1
Send2Trash 1.8.3
setuptools 80.9.0
six 1.17.0
sniffio 1.3.1
soupsieve 2.8
sqlite-anyio 0.2.3
stack-data 0.6.3
terminado 0.18.1
tinycss2 1.4.0
tornado 6.5.2
traitlets 5.14.3
types-python-dateutil 2.9.0.20250822
typing_extensions 4.15.0
uri-template 1.3.0
urllib3 2.5.0
wcwidth 0.2.14
webcolors 24.11.1
webencodings 0.5.1
websocket-client 1.8.0

Command Line Output

See images above.

Browser Output Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions