R encounters a crash when the help function is invoked on the remote machine.
System details:
My local client operates on macOS 14, and I am employing a remote SSH connection to Ubuntu 22.04.
Positron and OS details:
Positron Version: 2024.09.0 (Universal) build 103
Interpreter details:
R 4.3.3
Describe the issue:
R encounters a crash when the help function is invoked on the remote machine.
Steps to reproduce the issue:
- open console
- type
?library
Expected or desired behavior:
Were there any error messages in the UI, Output panel, or Developer Tools console?
Thanks for flagging this! We appreciate your help improving Positron and we’ll address it when we’re working on the next release; keep an eye on this issue for updates 🚀.
If the Open Logs action has any logs, please attach them as they may help fix the issue.
There are my Positron R Extension log output:
2024-10-05 18:27:04.754 [info] Log level: Debug
2024-10-05 18:27:06.068 [info] Refreshing testthat status
2024-10-05 18:27:08.315 [info] Not working in an R package
2024-10-05 18:27:08.315 [info] Context key 'testthatIsConfigured' is 'false'
2024-10-05 18:27:08.315 [info] Context key 'testthatHasTests' is 'false'
2024-10-05 18:27:09.016 [info] Possibly found R on PATH: /usr/bin/R.
2024-10-05 18:27:09.017 [info] Resolved R binary at /home/user/micromamba/envs/R/bin/R
2024-10-05 18:27:09.018 [info] Possibly found R on PATH: /usr/bin/R.
2024-10-05 18:27:09.018 [info] Resolved R binary at /home/user/micromamba/envs/R/bin/R
2024-10-05 18:27:09.020 [info] Candidate R binary at /home/user/micromamba/envs/R/bin/R
2024-10-05 18:27:09.020 [info] R installation discovered: {
"valid": true,
"supported": true,
"binpath": "/home/user/micromamba/envs/R/bin/R",
"homepath": "/home/user/micromamba/envs/R/lib/R",
"semVersion": {
"options": {},
"loose": false,
"includePrerelease": false,
"raw": "4.3.3",
"major": 4,
"minor": 3,
"patch": 3,
"prerelease": [],
"build": [],
"version": "4.3.3"
},
"version": "4.3.3",
"arch": "x86_64",
"current": true,
"orthogonal": true
}
2024-10-05 18:27:09.020 [info] Candidate R binary at /opt/R/4.3.3/bin/R
2024-10-05 18:27:09.020 [info] R installation discovered: {
"valid": true,
"supported": true,
"binpath": "/opt/R/4.3.3/bin/R",
"homepath": "/opt/R/4.3.3/lib/R",
"semVersion": {
"options": {},
"loose": false,
"includePrerelease": false,
"raw": "4.3.3",
"major": 4,
"minor": 3,
"patch": 3,
"prerelease": [],
"build": [],
"version": "4.3.3"
},
"version": "4.3.3",
"arch": "x86_64",
"current": false,
"orthogonal": true
}
2024-10-05 18:27:09.529 [info] Creating Positron R 4.3.3 language client (port 54965)
2024-10-05 18:27:09.529 [info] ARK (R 4.3.3) language client state changed uninitialized => starting
2024-10-05 18:27:09.547 [info] ARK (R 4.3.3) language client init successful
2024-10-05 18:27:09.547 [info] ARK (R 4.3.3) language client state changed starting => running
2024-10-05 18:28:31.771 [info] ARK (R 4.3.3) language client state changed running => stopped
2024-10-05 18:28:31.771 [warning] ARK (R 4.3.3) language client error occurred (port 54965). 'Error' with message: This socket has been ended by the other party. This is error number 1.
2024-10-05 18:28:32.642 [info] Creating Positron R 4.3.3 language client (port 51234)
2024-10-05 18:28:32.642 [info] ARK (R 4.3.3) language client state changed uninitialized => starting
2024-10-05 18:28:32.665 [info] ARK (R 4.3.3) language client init successful
2024-10-05 18:28:32.665 [info] ARK (R 4.3.3) language client state changed starting => running
2024-10-05 18:29:04.116 [info] ARK (R 4.3.3) language client state changed running => stopped
2024-10-05 18:29:04.117 [warning] ARK (R 4.3.3) language client error occurred (port 51234). 'Error' with message: This socket has been ended by the other party. This is error number 1.
2024-10-05 18:29:04.901 [info] Creating Positron R 4.3.3 language client (port 57720)
2024-10-05 18:29:04.901 [info] ARK (R 4.3.3) language client state changed uninitialized => starting
2024-10-05 18:29:04.912 [info] ARK (R 4.3.3) language client init successful
2024-10-05 18:29:04.912 [info] ARK (R 4.3.3) language client state changed starting => running
2024-10-05 18:29:23.343 [info] Log level: Trace
2024-10-05 18:29:31.801 [info] ARK (R 4.3.3) language client state changed running => stopped
2024-10-05 18:29:31.801 [warning] ARK (R 4.3.3) language client error occurred (port 57720). 'Error' with message: This socket has been ended by the other party. This is error number 1.
2024-10-05 18:29:32.598 [info] Creating Positron R 4.3.3 language client (port 59922)
2024-10-05 18:29:32.598 [info] ARK (R 4.3.3) language client state changed uninitialized => starting
2024-10-05 18:29:32.608 [info] ARK (R 4.3.3) language client init successful
2024-10-05 18:29:32.608 [info] ARK (R 4.3.3) language client state changed starting => running
2024-10-05 18:29:42.176 [info] ARK (R 4.3.3) language client state changed running => stopped
2024-10-05 18:29:42.176 [warning] ARK (R 4.3.3) language client error occurred (port 59922). 'Error' with message: This socket has been ended by the other party. This is error number 1.
2024-10-05 18:29:42.945 [info] Creating Positron R 4.3.3 language client (port 43988)
2024-10-05 18:29:42.945 [info] ARK (R 4.3.3) language client state changed uninitialized => starting
2024-10-05 18:29:42.956 [info] ARK (R 4.3.3) language client init successful
2024-10-05 18:29:42.956 [info] ARK (R 4.3.3) language client state changed starting => running
Thanks for your help.
Thanks for sharing those logs! It looks like it may be using the R installed via micromamba rather than the one installed at /opt/R/4.3.3/bin/R, which may be a problem.
Can you try running help directly on the remote machine?
- Start the micromamba R in the terminal on the remote machine.
- Type
?library
Do you observe any crashes?
It works on remote machine.
It catches my eye that both versions of R are 4.3.3. Somehow it feels more likely to get unintentional crosstalk between two installations that are the exact same version. But this could be a complete red herring (though still important to think about in general).
I'm going to move both of our issues on problems with REH/SSH + R Help to triage, although I note we are not able to reproduce either.
Thanks for confirming that help works on the remote machine @GladioFeng. If you are able, can you share some more logs?
- First, set your R Kernel log level to something like "info" (in your settings):
- Take a look at both the "Console" and "Kernel" output channels after the crash. You can drag whole log files into a GitHub issue as an attachment:
- If you are feeling extra adventurous, bring up the Developer Tools console via the command "Developer: Toggle Developer Tools" and find the line like this one, then see if there are any interesting errors after that:
INFO PositronHelpService language runtime server sent show help event for: http://127.0.0.1:60873/library/stats/html/lm.html
Unfortunately these logs and output channels are quite busy but more info would be helpful, as we cannot reproduce your problem currently.
There are infor output when crash:
kernel_output.txt
console_output.txt
R devs: do the attached logs have anything that can suggest the source of the crash (and/or if this is a true process crash?)
We haven't had a report on this in quite a while, so we're going to call this done. If anyone has a similar crash, please open a new issue!