Product: TIBCO Spotfire®
TSSS on Linux with open-source R and "rJava" package version 0.9-9: home page works, but ExtendedServerInfo hangs.
TIBCO Spotfire Statistics Services (TSSS) on Linux with open-source R and "rJava" package version 0.9-9: home page works, but ExtendedServerInfo hangs.
Example errors from SplusServer.log:
2018-02-04 11:17:29,315 | ERROR | | SplusMessageServerWrapper | JobExecutionThreadPool-3: Error occurred while trying to start engine service!
<...>
> **** Engine startup error *****
> Message read thrown an unexpected exception: java.io.EOFException
> java.lang.IllegalStateException: problem starting Splus process:
> **** Engine execution output ****
> **** Engine startup output *****
This occurs when TSSS uses open-source R as its statistical engine, but only on Linux.
It appears to be due to a change implemented in version 0.9-9 of the user-contributed "rJava" package from the open-source R community's CRAN repository. The change is described on the CRAN repository at the following URL:
https://cran.r-project.org/web/packages/rJava/NEWS
TSSS uses functions from this "rJava" package to manage engine sessions, when open-source R is the statistical engine.
In an R Console session, the following command will display the "rJava" package version that is in use:
packageVersion( "rJava" )
The workaround (to make open-source R using rJava version 0.9-9 work with TSSS on Linux) is to edit the init.d/spserver file to add the following lines right after the line "export CATALINA_OPTS", then start or restart the TSSS service:
RJAVA_JVM_STACK_WORKAROUND=0
export RJAVA_JVM_STACK_WORKAROUND
Workaround steps:
-----
1. Find the script file SPSERVER_HOME/init.d/spserver (where SPSERVER_HOME is your TSSS server installation directory).
2. Make a backup copy of this file.
3. Open the spserver file in a text editor.
4. Find the following line:
export CATALINA_OPTS
5. Insert the following lines right after the "export CATALINA_OPTS" line:
RJAVA_JVM_STACK_WORKAROUND=0
export RJAVA_JVM_STACK_WORKAROUND
6. Save the spserver file.
7. Close the spserver file.
8. Start or restart the TSSS service.
-----
Background:
This issue appears to be due to the following change that was introduced in version 0.9-9 of the "rJava" package from the open-source R community's CRAN repository:
-----
https://cran.r-project.org/web/packages/rJava/NEWS
0.9-9 (released to CRAN)
o Work around a bug of Oracle's Java on Linux which caps the stack of
R at 2M. The bug leads to segfaults in recursive computations (not
an R error as R doesn't know the stack size has been reduced). The
workaround can be disabled via environment variable
RJAVA_JVM_STACK_WORKAROUND=0, which may produce better results with
memory access checkers (ASAN, valgrind), because the workaround
detects the new stack size by trying to access inaccessible memory.
This JVM behavior was a workaround for an issue in old Linux systems
(JDK-4466587) and is going to be fixed in Java 10.
-----
https://cran.r-project.org/web/packages/rJava/NEWS
https://github.com/s-u/rJava/issues/130
Comments
0 comments
Article is closed for comments.