Skip to content

[WIP] Fix notebook execution hang issue with ipykernel 7#17411

Draft
DonJayamanne with Copilot wants to merge 1 commit into
mainfrom
copilot/ipykernel-7-hang-issue-fix
Draft

[WIP] Fix notebook execution hang issue with ipykernel 7#17411
DonJayamanne with Copilot wants to merge 1 commit into
mainfrom
copilot/ipykernel-7-hang-issue-fix

Conversation

Copilot AI commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Thanks for asking me to work on this. I will get started on it and keep this PR's description up to date as I form a plan and make progress.


This section details on the original issue you should resolve

<issue_title>ipykernel 7 causes notebook execution to hang</issue_title>
<issue_description>

Environment data

  • VS Code version: 1.107.1
  • Jupyter Extension version (available under the Extensions sidebar): 2025.9.1
  • Python Extension version (available under the Extensions sidebar): 3.11.11
  • OS (Windows | Mac | Linux distro) and version: Windows 11 25H2 1000.26100.265.0
  • Python and/or Anaconda version: 25.11.1
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda
  • Jupyter server running: Local | Remote | N/A WSL Ubuntu-22.04

Expected behaviour

Can run normally when running code blocks

Actual behaviour

When running a code block, the kernel hangs, interrupt and rerun will also hang, and replacing the kernel will also hang. Only restarting the kernel and rerun will work properly, but after a few hours, it may also hang after hibernation and rerun.Sometimes I click to restart the kernel, but it keeps getting stuck in the loading state

Steps to reproduce:

[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]

run code

Logs

Output for Jupyter in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Jupyter)

XXX

<agent_instructions>Find the root cause</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@DonJayamanne Please could you enable logging as follows: * Open settings & go into `Jupyter->Logging` * Change the value to `trace` * Reload VS Code, * Attempt to repro the issue & then copy the output from the `Jupyter` output panel (use the command `Jupyter: Show Output` to get to the logs). @DonJayamanne Please can you * Determine version of ipykernel, ensure you have the latest version of ipykernel installed * please try running a single cell `print("Hello World")` * If this issue repros, then please share the full logs @DonJayamanne I'm sorry you're running into this issue, please can someone share a very simple repro * Create a virtual environment `python -m venv .venv` * Install python packages (please share a pip file or the like) * Please keep the list of packages to install to a minimum of three, ipykernel, x & y * A simple block of code, just one cell

I know everyone here might be using realworld code with lots of packages.
However i would like it if someone could replicate this with a single package or no new packages, but just IPykernel and some very very simple Python code (few lines) as opposed to a couple of cells

Asking for this as getting a complex setup makes it very difficult to isolate the issue and track it down.

Copilot AI linked an issue Jun 8, 2026 that may be closed by this pull request
Copilot stopped work on behalf of DonJayamanne due to an error June 9, 2026 00:42
Copilot AI requested review from DonJayamanne June 9, 2026 00:42
@ZupoLlask

Copy link
Copy Markdown

This upstream issue is probably relevant: ipython/ipykernel#1469

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ipykernel 7 causes notebook execution to hang

3 participants