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

R cannot start at all: R 4.4.2 failed to start up (exit code -1073741502) #5794

Open
lgaborini opened this issue Dec 18, 2024 · 2 comments
Open
Labels
area: core Issues related to Core category. area:kallichore Issues related to the new kernel supervisor area: kernels Issues related to Jupyter kernels and LSP servers info needed Waiting on information

Comments

@lgaborini
Copy link

lgaborini commented Dec 18, 2024

System details:

Positron and OS details:

Positron Version: 2025.01.0 (user setup) build 39
Code - OSS Version: 1.93.0
Commit: c7ef34f
Date: 2024-12-09T02:49:42.315Z
Electron: 30.4.0
Chromium: 124.0.6367.243
Node.js: 20.15.1
V8: 12.4.254.20-electron.0
OS: Windows_NT x64 10.0.19045

Interpreter details:

R 4.4.2

Describe the issue:

Since Positron 2025.01.0 build 39 I have been having this issue where R cannot start even just after by opening a Positron workspace.
In the console it reads:

R 4.4.2 starting.
R 4.4.2 failed to start up (exit code -1073741502)

The process exited abnormally (exit code: 0xc0000142)

Starting the interpreter manually does not work.
Even by closing and reopening the window (with the same workspace) does not often fix.
It also affected R 4.4.1.

The only way to fix is to delete the folder in Positron\User\workspaceStorage.

Steps to reproduce the issue:

Opening an existing Positron workspace.

Expected or desired behavior:

R Console starts.

Were there any error messages in the UI, Output panel, or Developer Tools console?

Developer Tools console:

Starting language runtime failed. Reason: HTTP request failed
Error starting runtime session: HTTP request failed

The renderer.log contains this:

2024-12-18 08:45:13.807 [warning] Via 'product.json#extensionEnabledApiProposals' extension 'ms-python.python' wants API proposal 'terminalShellIntegration' but that proposal DOES NOT EXIST. Likely, the proposal has been finalized (check 'vscode.d.ts') or was abandoned.
2024-12-18 08:45:13.854 [warning] Via 'product.json#extensionEnabledApiProposals' extension 'github.copilot' wants API proposal 'authGetSessions' but that proposal DOES NOT EXIST. Likely, the proposal has been finalized (check 'vscode.d.ts') or was abandoned.
2024-12-18 08:45:13.855 [warning] Via 'product.json#extensionEnabledApiProposals' extension 'github.copilot-chat' wants API proposal 'authGetSessions' but that proposal DOES NOT EXIST. Likely, the proposal has been finalized (check 'vscode.d.ts') or was abandoned.
2024-12-18 08:45:14.775 [debug] Using cached extensions scan result user vscode-userdata:/c%3A/Users/Lorenzo/.positron/extensions/extensions.json
2024-12-18 08:45:14.776 [debug] ComputeTargetPlatform: win32-x64
2024-12-18 08:45:14.805 [info] Started local extension host with pid 33720.
2024-12-18 08:45:14.984 [debug] No new project configuration found in storage
2024-12-18 08:45:15.416 [warning] Skipping extension /c:/Users/Lorenzo/.positron/extensions/ms-pyright.pyright-1.1.369-universal in favour of the builtin extension /c:/Users/Lorenzo/AppData/Local/Programs/Positron/resources/app/extensions/ms-pyright.pyright.
2024-12-18 08:45:15.416 [warning] Skipping extension /c:/Users/Lorenzo/.positron/extensions/ms-python.debugpy-2024.6.0-win32-x64 in favour of the builtin extension /c:/Users/Lorenzo/AppData/Local/Programs/Positron/resources/app/extensions/ms-python.debugpy.
2024-12-18 08:45:15.417 [warning] Skipping extension /c:/Users/Lorenzo/.positron/extensions/ms-toolsai.jupyter-2024.5.0-universal in favour of the builtin extension /c:/Users/Lorenzo/AppData/Local/Programs/Positron/resources/app/extensions/ms-toolsai.jupyter.
2024-12-18 08:45:15.417 [warning] Skipping extension /c:/Users/Lorenzo/.positron/extensions/ms-toolsai.jupyter-renderers-1.0.18-universal in favour of the builtin extension /c:/Users/Lorenzo/AppData/Local/Programs/Positron/resources/app/extensions/ms-toolsai.jupyter-renderers.
2024-12-18 08:45:15.417 [warning] Skipping extension /c:/Users/Lorenzo/.positron/extensions/ms-toolsai.vscode-jupyter-cell-tags-0.1.9-universal in favour of the builtin extension /c:/Users/Lorenzo/AppData/Local/Programs/Positron/resources/app/extensions/ms-toolsai.vscode-jupyter-cell-tags.
2024-12-18 08:45:15.418 [warning] Skipping extension /c:/Users/Lorenzo/.positron/extensions/ms-toolsai.vscode-jupyter-slideshow-0.1.6-universal in favour of the builtin extension /c:/Users/Lorenzo/AppData/Local/Programs/Positron/resources/app/extensions/ms-toolsai.vscode-jupyter-slideshow.
2024-12-18 08:45:15.418 [warning] Skipping extension /c:/Users/Lorenzo/.positron/extensions/ms-vscode.js-debug-1.91.0-universal in favour of the builtin extension /c:/Users/Lorenzo/AppData/Local/Programs/Positron/resources/app/extensions/ms-vscode.js-debug.
2024-12-18 08:45:15.418 [error] Extension 'ms-python.python' appears in product.json but enables LESS API proposals than the extension wants.
package.json (LOSES): positronResolveSymlinks, contribEditorContentMenu, quickPickSortByLabel, testObserver, quickPickItemTooltip, terminalDataWriteEvent, terminalExecuteCommandEvent, codeActionAI, notebookReplDocument, notebookVariableProvider
product.json (WINS): contribEditorContentMenu, quickPickSortByLabel, portsAttributes, testObserver, quickPickItemTooltip, terminalDataWriteEvent, terminalExecuteCommandEvent, contribIssueReporter
2024-12-18 08:45:15.463 [warning] [ms-python.python]: Cannot register 'python.venvPath'. This property is already registered.
2024-12-18 08:45:15.604 [info] [positron.positron-r]: Command `workbench.action.positronConsole.executeCode` already registered
2024-12-18 08:45:15.605 [debug] [Runtime startup] Extension ms-python.python has been registered for language runtime for language ID 'python'
2024-12-18 08:45:15.605 [debug] [Runtime startup] Extension positron.positron-r has been registered for language runtime for language ID 'r'
2024-12-18 08:45:15.606 [debug] [Runtime startup] Extension positron.positron-reticulate has been registered for language runtime for language ID 'reticulate'
2024-12-18 08:45:16.060 [debug] User data changed
2024-12-18 08:45:16.443 [debug] User data changed
2024-12-18 08:45:16.644 [debug] [Registering Log Channel] File does not exist. Waiting for 1s to retry. file:///c%3A/Users/Lorenzo/AppData/Roaming/Positron/logs/20241218T084512/editSessions.log
2024-12-18 08:45:16.696 [error] spawn c:\Users\Lorenzo\AppData\Local\Programs\Positron\resources\app\extensions\positron-python\python-env-tools\bin\pet.exe ENOENT: Error: spawn c:\Users\Lorenzo\AppData\Local\Programs\Positron\resources\app\extensions\positron-python\python-env-tools\bin\pet.exe ENOENT
	at ChildProcess._handle.onexit (node:internal/child_process:286:19)
	at onErrorNT (node:internal/child_process:484:16)
	at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
2024-12-18 08:45:16.709 [debug] [Registering Log Channel] File does not exist. Waiting for 1s to retry. file:///c%3A/Users/Lorenzo/AppData/Roaming/Positron/logs/20241218T084512/window1/exthost/positron.positron-r/Positron%20R%20Extension.log
2024-12-18 08:45:17.112 [debug] User data changed
2024-12-18 08:45:17.197 [debug] [Registering Log Channel] File does not exist. Waiting for 1s to retry. file:///c%3A/Users/Lorenzo/AppData/Roaming/Positron/logs/20241218T084512/window1/exthost/ms-python.python/Python.log
2024-12-18 08:45:17.198 [debug] [Registering Log Channel] File does not exist. Waiting for 1s to retry. file:///c%3A/Users/Lorenzo/AppData/Roaming/Positron/logs/20241218T084512/window1/exthost/positron.positron-proxy/Positron%20Proxy.log
2024-12-18 08:45:17.199 [debug] [Registering Log Channel] File does not exist. Waiting for 1s to retry. file:///c%3A/Users/Lorenzo/AppData/Roaming/Positron/logs/20241218T084512/window1/exthost/ms-python.python/Python%20Locator.log
2024-12-18 08:45:17.661 [debug] [Registering Log Channel] File does not exist. Waiting for 1s to retry. file:///c%3A/Users/Lorenzo/AppData/Roaming/Positron/logs/20241218T084512/window1/exthost/vscode.git/Git.log
2024-12-18 08:45:17.679 [debug] User data changed
2024-12-18 08:45:17.723 [info] [perf] Render performance baseline is 75ms
2024-12-18 08:45:17.734 [debug] [Registering Log Channel] File does not exist. Waiting for 1s to retry. file:///c%3A/Users/Lorenzo/AppData/Roaming/Positron/logs/20241218T084512/window1/exthost/vscode.github/GitHub.log
2024-12-18 08:45:18.676 [debug] User data changed
2024-12-18 08:45:19.454 [debug] [Runtime startup] Session restore; workspace: 7b5136b2e52a612f6c1a49670ca97018, workbench state: 3, startupKind: 1
2024-12-18 08:45:19.476 [debug] [Runtime startup] Phase changed to 'starting'
2024-12-18 08:45:19.476 [debug] [Runtime startup] Activating extension positron.positron-r for language ID r
2024-12-18 08:45:19.767 [info] Language runtime 912077798d99e95f382c96e6337fbb96 (language: R name: R 4.4.1 version: 4.4.1) automatically starting. Source: Affiliated r runtime for workspace
2024-12-18 08:45:19.768 [debug] [Runtime startup] Activating extension ms-python.python for language ID python
2024-12-18 08:45:19.768 [debug] [Runtime startup] Activating extension positron.positron-r for language ID r
2024-12-18 08:45:19.769 [debug] [Runtime startup] Activating extension positron.positron-reticulate for language ID reticulate
2024-12-18 08:45:19.938 [debug] [Ext host 0] Runtime manager for 'R 4.4.1': true
2024-12-18 08:45:20.075 [debug] [Runtime startup] All extensions contributing language runtimes have been activated.
2024-12-18 08:45:20.076 [debug] [Runtime startup] Phase changed to 'discovering'
2024-12-18 08:45:20.294 [debug] [Registering Log Channel] File does not exist. Waiting for 1s to retry. file:///c%3A/Users/Lorenzo/AppData/Roaming/Positron/logs/20241218T084512/window1/exthost/positron.positron-notebook-controllers/Positron%20Notebook%20Controllers.log
2024-12-18 08:45:20.300 [debug] [Registering Log Channel] File does not exist. Waiting for 1s to retry. file:///c%3A/Users/Lorenzo/AppData/Roaming/Positron/logs/20241218T084512/window1/exthost/positron.positron-run-app/Positron%20Run%20App.log
2024-12-18 08:45:20.346 [debug] [Registering Log Channel] File does not exist. Waiting for 1s to retry. file:///c%3A/Users/Lorenzo/AppData/Roaming/Positron/logs/20241218T084512/window1/exthost/positron.jupyter-adapter/Jupyter%20Adapter.log
2024-12-18 08:45:20.347 [debug] [Registering Log Channel] File does not exist. Waiting for 1s to retry. file:///c%3A/Users/Lorenzo/AppData/Roaming/Positron/logs/20241218T084512/window1/exthost/positron.positron-supervisor/Positron%20Kernel%20Supervisor.log
2024-12-18 08:45:21.584 [info] Replacing runtime 912077798d99e95f382c96e6337fbb96 (language: R name: R 4.4.1 version: 4.4.1) => 522ccb764409e208740394125df4e075 (language: R name: R 4.4.2 version: 4.4.2)
2024-12-18 08:45:21.607 [debug] [Ext host 0] Runtime manager for 'R 4.4.2': true
2024-12-18 08:45:21.678 [warning] Already attached to session, disposing existing listeners before reattaching: r-87cc85de
2024-12-18 08:45:21.839 [debug] [Runtime startup] Saving workspace sessions (0)
2024-12-18 08:45:21.840 [debug] [Runtime startup] Saving workspace sessions (0)
2024-12-18 08:45:21.840 [debug] [Runtime startup] Saving workspace sessions (0)
2024-12-18 08:45:21.840 [error] Starting language runtime failed. Reason: HTTP request failed
2024-12-18 08:45:21.841 [debug] Error starting runtime session: HTTP request failed
2024-12-18 08:45:25.377 [debug] Comments: URIs of continue on comments to add to storage .
2024-12-18 08:45:25.582 [debug] User data changed
2024-12-18 08:45:27.010 [debug] Comments: URIs of continue on comments to add to storage .
2024-12-18 08:45:29.567 [debug] Comments: URIs of continue on comments to add to storage .

The Positron Kernel Supervisor.log contains this (stripping the old tailed logs):

2024-12-18 08:45:20.369 [info] Positron Kernel Supervisor activated
2024-12-18 08:45:20.370 [info] Reconnecting to Kallichore server at http://localhost:58055 (PID 9396)
2024-12-18 08:45:20.370 [info] Streaming Kallichore server logs at C:\Users\Lorenzo\AppData\Local\Temp\kallichore-64f000d9.log

...

2024-12-18 08:45:20.406 [info] 
Creating session: {"sessionId":"r-87cc85de","sessionName":"R 4.4.2","sessionMode":"console","createdTimestamp":1734507921606,"startReason":"Affiliated r runtime for workspace"}
07:45:21 [INFO] new_session("r-87cc85de") - X-Span-ID: "393c7666-c1fe-42b5-b919-804b69e89bba"
07:45:21 [DEBUG] (3) kcserver::server: Created connection file for session r-87cc85de at "C:\\Users\\Lorenzo\\AppData\\Local\\Temp\\connection_r-87cc85de.json"
07:45:21 [DEBUG] (3) kcserver::server: Created log file for session r-87cc85de at "C:\\Users\\Lorenzo\\AppData\\Local\\Temp\\kernel_log_r-87cc85de.txt"
07:45:21 [INFO] start_session("r-87cc85de") - X-Span-ID: "3625a740-b09c-478a-8610-a035fc8d1788"
07:45:21 [DEBUG] (3) kcserver::kernel_state: [session r-87cc85de] status 'idle' => 'starting' (start API called)
07:45:21 [DEBUG] (3) kcserver::kernel_session: Starting kernel for session r-87cc85de: ["c:\\Users\\Lorenzo\\AppData\\Local\\Programs\\Positron\\resources\\app\\extensions\\positron-r\\resources\\ark\\ark.exe", "--connection_file", "C:\\Users\\Lorenzo\\AppData\\Local\\Temp\\connection_r-87cc85de.json", "--log", "C:\\Users\\Lorenzo\\AppData\\Local\\Temp\\kernel-3UjVnK\\kernel.log", "--startup-file", "c:\\Users\\Lorenzo\\AppData\\Local\\Programs\\Positron\\resources\\app\\extensions\\positron-r\\resources\\scripts\\startup.R", "--session-mode", "console", "--", "--interactive", "--no-restore-data"]
07:45:21 [DEBUG] (3) kcserver::kernel_session: End of output stream (kind: Stdout)
07:45:21 [DEBUG] (11) kcserver::kernel_session: End of output stream (kind: Stderr)
07:45:21 [INFO] Child process for session r-87cc85de exited with status: exit code: 0xc0000142
07:45:21 [DEBUG] (11) kcserver::kernel_state: [session r-87cc85de] status 'starting' => 'exited' (child process exited)
07:45:21 [ERROR] [session r-87cc85de] Startup failed; abnormal exit with code -1073741502: The process exited abnormally (exit code: 0xc0000142)
07:45:21 [ERROR] KS-14: The kernel exited before a connection could be established
07:45:21 [ERROR] [session r-87cc85de] Output before exit: 
@nstrayer
Copy link
Contributor

You can get the runtime to startup after you delete Positron\User\workspaceStorage?
If so, does the problem re-occur when you restart Positron?

@nstrayer nstrayer added area: core Issues related to Core category. area: kernels Issues related to Jupyter kernels and LSP servers labels Dec 18, 2024
@juliasilge
Copy link
Contributor

Can you go to settings and find "Kernel Supervisor: Enable" and unclick it?

Image

This will cause Positron to use the old Jupyter Adapter and not the new Kernel Supervisor. I will be interested to see if this either solves your problem or gives us an error message that is more informative than "HTTP request failed".

@juliasilge juliasilge added info needed Waiting on information area:kallichore Issues related to the new kernel supervisor labels Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: core Issues related to Core category. area:kallichore Issues related to the new kernel supervisor area: kernels Issues related to Jupyter kernels and LSP servers info needed Waiting on information
Projects
None yet
Development

No branches or pull requests

3 participants