Skip to content

Unable to stop notebook #1105

@DaiZack

Description

@DaiZack

Bug: Notebook becomes stale and unresponsive — no stop/restart button available

Environment

  • VS Code version: (fill in)
  • dbcode extension version: (fill in)
  • OS: RHEL 8 (Linux)
  • Database type: DuckDB (in-memory via memoryDB connection)

Description

A .dbcnb notebook becomes stuck in a stale/unresponsive state where:

  1. No stop/restart button is available in the notebook toolbar
  2. Stop on cell does not work (clicking stop on an individual cell has no effect)
  3. Cells show previous outputs (mime type x-application/dbcode) but cannot be re-executed
  4. The notebook kernel appears to be in a zombie state — neither running nor stopped

The only workaround is to close and reopen the notebook, or disconnect the connection via the dbcode sidebar/tools.

Steps to Reproduce

  1. Open a .dbcnb notebook connected to a DuckDB (memoryDB) connection
  2. Execute cells that ATTACH external DuckDB files (e.g., ATTACH '...' AS db_name (READ_ONLY))
  3. After some time or after the connection becomes idle, the notebook enters the stale state
  4. Attempting to run any cell results in no response
  5. The stop/restart kernel button is missing from the toolbar

Expected Behavior

  • The notebook should always show a stop/restart button when a kernel session is active
  • If the connection is lost or the kernel becomes unresponsive, there should be a clear error message and the ability to restart the kernel
  • Cells should not be stuck in a state where they cannot be stopped or re-executed

Actual Behavior

  • Notebook is completely unresponsive
  • No kernel controls (stop/restart) are visible
  • Stop on individual cells does nothing
  • The only recovery is closing the editor tab or using dbcode-disconnect via command palette/tools

Additional Context

The notebook uses ATTACH statements to mount external .duckdb files as read-only databases. The stale state may be related to the external file locks or the connection timing out while DuckDB holds references to attached databases.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions