Open rk-exxec opened 1 month ago
Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.91.1. Please try upgrading to the latest version and checking whether this issue remains.
Happy Coding!
Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.91.1. Please try upgrading to the latest version and checking whether this issue remains.
Happy Coding!
It was a typo. I'm using the newest version.
Thanks for filing this issue. I'm unable to replicate this issue. Here's the code I'm using to run in the second cell with async io and kernel crash. I'll send a custom VSIX that will contain some additional logging, hopefully that will help.
import asyncio
sources = ['']
def background(f):
def wrapped(*args, **kwargs):
return asyncio.get_event_loop().run_in_executor(None, f, *args, **kwargs)
return wrapped
@background
def async_fun(file):
try:
# something that causes a kernel crash
import IPython
app = IPython.Application.instance()
app.kernel.do_shutdown(True)
except Exception as e:
print(str(e), traceback.format_exc())
print(file)
futures = list()
sem = asyncio.Semaphore(4)
for file in sources:
async with sem:
futures.append(async_fun(file))
res = await asyncio.gather(*futures)
Does this issue occur when all extensions are disabled?: No, Jupyter and Python need to be enabled for the code to run. But I did a bisect and cant identify an extension that would be responsible. The crash only occurs occasionally.
The second cell causes a kernel crash in the "fit" cell while executing asyncio futures. The crash message shows in the previous cell "init" output, but only when "Execute all" is used.
Steps to Reproduce:
I wasn't able to create a minimal reproducible example, because the crash only happens in my specific case and not every time. Here is the code for the crashing cell: