Closed klindsey1234 closed 6 months ago
@s-u, Sorry for the explicit tag, however this is a major blocker for our team, and we would appreciate any help you might be able to provide.
This has nothing to do with rJava - it is a known OpenJDK bug. You can increase the process reaper's stack size with jdk.lang.processReaperUseDefaultStackSize
, e.g.:
> .jinit(parameters="-Djdk.lang.processReaperUseDefaultStackSize=true")
> J("java.lang.Runtime")$getRuntime()$exec("echo hello")
[1] "Java-Object{Process[pid=3538, exitValue=0]}"
Overview
When attempting to execute the .jcall() or J() methods with the exec method in rJava, I encounter a java.lang.StackOverflowError in the "process reaper" thread. This issue occurs consistently when executing commands such as J(rt, "exec", "ls"), J(rt, "exec", "echo hello"), or similar exec calls.
Environment
Operating System: Linux Processor: aarch64 R Version: 4.3 rJava Version: 1.0.11, 1.0.6 Java Version: OpenJDK 11.0.20, Zulu11.70+15-CA
I've recreated this issue with every version of R-4.3.X, rJava-1.0.11 and 1.0.6, and openJDK 11.0.20, 11.0.22, 11.0.23. R is installed through conda, and I have tried installing both rJava and openJDK through conda and source. I am unable to update java due to a reliance on jdx.
Steps to Reproduce:
Create a conda environment with the following yaml and command
Run the following in wither an Rscript of R session:
Expected Outcome:
Actual Outcome:
Side Note
I encountered this issue on Linux x86-64 as well. However, I eventually got lucky and downloaded a version of r-base, rJava, and java that worked. I have not yet found a similar solution on ARM.