jupyter / jupyter/notebook

Unable to create/open notebook when disk is full. Misleading error.

Open
#4,592 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jupyter Notebook
Stars
13.3k
Forks
5.8k
Avg merge
6d 11h
Merged PRs (30d)
7

Description

Asked to duplicate here from jupyterlab/jupyterlab#6248.

When running out of disk space Jupyter Lab starts giving error messages which seem unrelated.

image

When checking the logs you can see disk space related errors

[I 2019-04-25 15:40:51.771 SingleUserLabApp handlers:153] Creating new notebook in /work/revolver
[E 2019-04-25 15:40:51.772 SingleUserLabApp filemanager:485] Error while saving file: work/revolver/Untitled.ipynb database or disk is full
    Traceback (most recent call last):
      File "/opt/conda/lib/python3.6/site-packages/notebook/services/contents/filemanager.py", line 470, in save
        self.check_and_sign(nb, path)
      File "/opt/conda/lib/python3.6/site-packages/notebook/services/contents/manager.py", line 487, in check_and_sign
        self.notary.sign(nb)
      File "/opt/conda/lib/python3.6/site-packages/nbformat/sign.py", line 449, in sign
        self.store.store_signature(signature, self.algorithm)
      File "/opt/conda/lib/python3.6/site-packages/nbformat/sign.py", line 207, in store_signature
        if not self.check_signature(digest, algorithm):
      File "/opt/conda/lib/python3.6/site-packages/nbformat/sign.py", line 239, in check_signature
        (datetime.utcnow(), algorithm, digest),
    sqlite3.OperationalError: database or disk is full

Steps to reproduce:

  • Run Jupyter Lab on a machine with a size limited disk
  • Fill the disk (dd if=/dev/zero of=/path/to/some/file until full)
  • Try to create or open a notebook

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue by filling a size-limited disk, then trace notebook creation and saving through handlers, notebook/services/contents/filemanager.py, manager.py, and nbformat/sign.py. Check how the sqlite3.OperationalError is surfaced during create or open, and use the reported disk-full scenario as the completion check: the user should receive an appropriate disk-space error instead of an unrelated message.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter-notebook, python, sqlite
Domain
backend, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.