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

Interrupt kernel doesn't report status when failed to interrupt and kernel crashed #3757

Closed
ronglums opened this issue Nov 29, 2018 · 5 comments
Assignees

Comments

@ronglums
Copy link

  1. Run all cells on this code:
    #%% [markdown]

## This is markdown.

#%%

Let's load and review some data

import pandas as pd # pandas is a dataframe library
df = pd.read_csv("./data/pima-data.csv") # load Pima data
df.head(5)

#%% Let's plot the correlation between data columns
import matplotlib.pyplot as plt # matplotlib.pyplot plots data
import matplotlib.style as style
style.use('dark_background')

def draw_corr(df, size = 11):
corr = df.corr() # data frame correlation function
fig, ax = plt.subplots(figsize=(11, 11))
ax.matshow(corr) # color code the rectangles by correlation value
plt.xticks(range(len(corr.columns)), corr.columns) # draw x tick marks
plt.yticks(range(len(corr.columns)), corr.columns) # draw y tick marks

draw_corr(df)

  1. Then immediately hit the "Interrupt kernel" button.
  2. Executing get stuck on the 3rd cell with status bar showing "Executing Cell" but it never finishes.

What happened was that the kernel wasn't interrupt-able at the time and it crashed and restarted itself, but VS Code doesn't report that status. And if trying to run more cells at this point, the execution order shows [-2].

image

@ronglums ronglums changed the title Interrupt kernel doesn't report status when failed to interrupt and kernel crashed and restarted Interrupt kernel doesn't report status when failed to interrupt and kernel crashed Nov 29, 2018
@ronglums
Copy link
Author

A Jupyter-like message would be helpful.
image

@rchiodo
Copy link
Contributor

rchiodo commented Nov 30, 2018

The SessionManager.runningChanged signal might fire when this problem occurs.

@ronglums
Copy link
Author

ronglums commented Dec 4, 2018

  1. If Jupyter is not interruptable (check timeout limit), prompt if a restart is desired.
  2. If Jupyter crashed and restarted, show a message.

@rchiodo rchiodo self-assigned this Dec 5, 2018
@rchiodo
Copy link
Contributor

rchiodo commented Dec 5, 2018

Hmm. Having a problem fixing this. Jupyter is not interrupting anything:
ipython/ipython#3400

rchiodo referenced this issue in microsoft/vscode-python Dec 10, 2018
For #3511
Also did some work around making sure cancel behaves correctly. Cancelling a connection happens on exporting a file and running all cells. There was a bug where the cancel token from one request was being reused in another.
@rchiodo
Copy link
Contributor

rchiodo commented Dec 10, 2018

Should be fixed now in our insiders build

@rchiodo rchiodo closed this as completed Dec 10, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jan 7, 2019
@microsoft microsoft unlocked this conversation Nov 14, 2020
@DonJayamanne DonJayamanne transferred this issue from microsoft/vscode-python Nov 14, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants