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

Restart kernel on Python interactive window does not actually restart kernel #7081

Closed
shaperilio opened this issue Aug 11, 2021 · 9 comments
Closed
Assignees
Labels
interactive-window Impacts interactive window

Comments

@shaperilio
Copy link

Issue Type: Bug

Start a simple Python file:

# %%
x = 5
# %%
x

Shift+Enter on both blocks. Now Restart the kernel, and Shift+Enter second block - x is still defined (it should not be).

Extension version: 2021.8.2025984474
VS Code version: Code - Insiders 1.60.0-insider (7c25c174726ab969db3f99058cdf24bcfae1cfbe, 2021-08-11T05:15:24.598Z)
OS version: Windows_NT x64 10.0.19043
Restricted Mode: No

System Info
Item Value
CPUs AMD Ryzen 9 5950X 16-Core Processor (32 x 3400)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 63.92GB (52.79GB free)
Process Argv
Screen Reader no
VM 0%
A/B Experiments
vsliv695:30137379
vsins829:30139715
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
pythonvspyt602:30291494
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyt639:30291487
pythontb:30258533
pythonptprofiler:30281269
vshan820:30294714
pythondataviewer:30285072
pythonvsuse255:30319630
vscod805:30301674
pythonvspyt200:30323110
vsccppwt:30312692
pythonvssor306:30340298
bridge0708:30335490
pygetstartedt2:30349639
dockerwalkthrucf:30348714
javagetstartedt:30350119

@vscodebot
Copy link

vscodebot bot commented Aug 11, 2021

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@weinand weinand assigned rebornix and unassigned weinand Aug 11, 2021
@rebornix rebornix transferred this issue from microsoft/vscode Aug 11, 2021
@rebornix rebornix assigned joyceerhl and unassigned rebornix Aug 11, 2021
@rchiodo
Copy link
Contributor

rchiodo commented Aug 11, 2021

Thanks for the bug. Seems to be intermittent. I can get it to repro from a python file, but if I give focus to the IW, the restart sometimes works.

@joyceerhl
Copy link
Contributor

@shaperilio How are you invoking the command to restart a kernel? This is possibly a duplicate of #6996

@shaperilio
Copy link
Author

@joyceerhl I'm hitting the "restart" button in the top toolbar:
image

For me, it happens every time with (so far) every interactive window opened for each Python file

@joyceerhl
Copy link
Contributor

joyceerhl commented Aug 11, 2021

Never mind, this is the same problem as #6983.

const executionQueue = this.documentExecutions.get(document);
if (!executionQueue) {
return;
}

This will be properly addressed by #7067 but that's too risky to release in a recovery build; in the meantime I'll submit a hotfix in the style of #7070. Sorry for the trouble.

@joyceerhl joyceerhl self-assigned this Aug 11, 2021
@joyceerhl joyceerhl added interactive-window Impacts interactive window regression labels Aug 11, 2021
@shaperilio
Copy link
Author

No trouble at all, thanks for working on it!

@joyceerhl
Copy link
Contributor

Oh and as a temporary workaround you can configure "jupyter.enableNativeInteractiveWindow": false to temporarily opt out of the new interactive window experience which contains this issue.

@shaperilio
Copy link
Author

Right; seems that VSCode needs to be restarted for that setting to take effect (but there's no warning as such).

@joyceerhl
Copy link
Contributor

Fix should go out in the next recovery build #7084

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
interactive-window Impacts interactive window
Projects
None yet
Development

No branches or pull requests

6 participants