Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.
This repository was archived by the owner on Jan 12, 2024. It is now read-only.

Zombie dotnet-iqsharp kernel processes after IPython kernel restart #618

@xinyi-joffre

Description

@xinyi-joffre

Describe the bug
The underlying IQ# kernel spun up behind the scenes of the IPython kernel are not always cleaned up when the IPython kernel is restarted or shutdown.

To Reproduce
Steps to reproduce the behavior:

  1. Open notebook with IPython kernel
  2. Run import qsharp
  3. Restart the kernel and maybe repeat 2-3 a few times
  4. Check running processes on either Windows or Linux, and see that there are zombie dotnet-iqsharp processes leftover from the kernel that was restarted.

The good thing is that when the notebook server is shutdown, then all child processes are cleaned up correctly.

Expected behavior
There should only be one dotnet-iqsharp process per IPython kernel where import qsharp is run. After killing the IPython kernel, the dotnet-iqsharp process should also be killed.

Screenshots
On windows:
dotnet-iqsharp processes

On linux:
linux defunct dotnet-iqsharp processes

System information

  • OS: [e.g. iOS] Windows + Ubuntu Container
  • Browser [e.g. chrome, safari] N/A
  • Version [e.g. 22] QDK + qsharp python package version: 0.23.195983

Additional context
This seems possibly related to the issues that were fixed in ipykernel recently:
ipython/ipykernel#869 (27 days ago)
ipython/ipykernel#874 (24 days ago)

But I installed the latest 6.9.2 of ipykernel, and these issues did not resolve.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-PythonIssue relates to the Python client for the IQ# kernel.Kind-BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions