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

Running Out of memory in a process can cause the extension handler to crash #1423

Open
justusschock opened this issue May 22, 2024 · 1 comment
Labels

Comments

@justusschock
Copy link

justusschock commented May 22, 2024

Description

If I run tail /dev/zero in a jupyterlab instance to produce an OOM, it can with ~40% probability trigger the following exception and cause all terminal tabs to close:

Traceback (most recent call last):
  File "/opt/jupyter/envs/main/lib/python3.10/site-packages/tornado/web.py", line 1298, in send_error
    self.write_error(status_code, **kwargs)
  File "/opt/jupyter/envs/main/lib/python3.10/site-packages/jupyter_server/base/handlers.py", line 739, in write_error
    html = self.render_template("%s.html" % status_code, **ns)
  File "/opt/jupyter/envs/main/lib/python3.10/site-packages/jupyter_server/base/handlers.py", line 667, in render_template
    return template.render(**ns)
  File "/opt/jupyter/envs/main/lib/python3.10/site-packages/jinja2/environment.py", line 1304, in render
    self.environment.handle_exception()
  File "/opt/jupyter/envs/main/lib/python3.10/site-packages/jinja2/environment.py", line 939, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "/opt/jupyter/envs/main/lib/python3.10/site-packages/jupyter_server/templates/404.html", line 1, in top-level template code
    {% extends "error.html" %}
  File "/opt/jupyter/envs/main/lib/python3.10/site-packages/jupyter_server/templates/error.html", line 1, in top-level template code
    {% extends "page.html" %}
  File "/opt/jupyter/envs/main/lib/python3.10/site-packages/jupyter_server/templates/page.html", line 9, in top-level template code
    {% block favicon %}<link id="favicon" rel="shortcut icon" type="image/x-icon" href="{{ static_url("favicon.ico") }}">
  File "/opt/jupyter/envs/main/lib/python3.10/site-packages/jupyter_server/templates/page.html", line 9, in block 'favicon'
    {% block favicon %}<link id="favicon" rel="shortcut icon" type="image/x-icon" href="{{ static_url("favicon.ico") }}">
  File "/opt/jupyter/envs/main/lib/python3.10/site-packages/jupyter_server/extension/handler.py", line 118, in static_url
    raise Exception(msg) from None
Exception: This extension doesn't have any static paths listed. Check that the extension's `static_paths` trait is set.

Reproduce

  • Open a jupyterlab instance
  • click on the terminal card
  • run tail /dev/zero
  • repeat until terminal window crashes

Expected behavior

I would expect to have the command killed due to OOM, but not the server getting an exception

Context

  • Operating System and version: Ubuntu 20.04
  • Browser and version: Arc version 1.41.0 (Chromium Engine Version 124.0.6367.92)
  • Jupyter Server version: 2.14.0
Troubleshoot Output
Paste the output from running `jupyter troubleshoot` from the command line here.
You may want to sanitize the paths in the output.
Command Line Output
Paste the output from your command line running `jupyter lab` here, use `--debug` if possible.
Browser Output
Paste the output from your browser Javascript console here, if applicable.
Copy link

welcome bot commented May 22, 2024

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant