posit-dev / positron

Positron, a next-generation data science IDE
https://positron.posit.co
Other
2.85k stars 91 forks source link

Error after shutting down running (but not selected) R interpreter #1110

Closed jgutman closed 2 days ago

jgutman commented 1 year ago

Positron Version: 2023.08.0 build 173

Steps to Reproduce:

  1. Start up a new Positron session, no workspace. I am detected as an RStudio user, so my R interpreter is automatically started, with the message INFO Language runtime d6ea515ec747ac1c67c7239097e5d5b9 (language: R name: R (System) version: 4.3) automatically starting. Source: An extension requested the runtime to be started immediately.

  2. User decides to start Python instead, selects Python interpreter from drop down menu. Console switches to Python, and I get the message

    INFO Starting language runtime eef6917b6c04ea97b76a6e74a60086d9 (language: Python name: Python 3.9.9 64-bit ('3.9.9') (ipykernel) version: 3.9.9) (Source: User-requested startup from the Positron top action bar)

    Both interpreters have the green dot indicating they are running in the drop down.

  3. Shut down the R interpreter. This doesn't appear to cause any user-facing issues, but I see the following errors from the extension host

    image
jmcphers commented 1 year ago

Do you see these for other languages, or just R? I have seen these as well, but only for R. I haven't debugged them, but based on the fact that they are happening inside vscode-jsonrpc, I think this is arising from the LSP. We do try to stop the LSP before the kernel is shut down:

https://github.com/rstudio/positron/blob/9c8e5112aa7bf7c9dbe3dca595216c1a0077c01a/extensions/positron-r/src/runtime.ts#L139-L147

but this error looks an awful lot like something is getting unplugged before being turned off. I wonder if we need to ask the kernel to close the connection from its side before we pull the plug on the client side?

jgutman commented 1 year ago

You're right -- it only seems to happen when an R interpreter is shut down

juliasilge commented 4 days ago

We've changed a lot since this issue was opened, including using a whole new kernel supervisor. I no longer can reproduce these errors in any logs.

QA Notes

Can you all confirm you also don't see this error at the current time?

testlabauto commented 2 days ago

Verified Fixed

Positron Version(s) : 2024.12.0-88
OS Version          : OSX

Test scenario(s)

I can no longer reproduce this error on shutdown of R.

Link(s) to TestRail test cases run or created: