Closed bturner closed 4 years ago
I've tested this with:
Without this change, Azul 7.36, 8.12 and 8.44 all fail. With it, every version tested above passes.
Note: Since #87 mentioned macOS and Azul, I've re-tested Azul 8.44 and 11.37 there just for a little extra validation; no issues. (I know LinuxProcess
isn't used on macOS; I re-tested just to ensure I hadn't somehow regressed #87.)
As part of preparing to move Atlassian Bitbucket Server over to using NuProcess to run git
processes, rather than Java's ProcessBuilder
, we introduced a check in our 6.9.0 release which uses NuProcess to run java -version
and displays an alert in the UI if that fails, to help detect installations on JVMs, or platforms, where NuProcess won't work.
As a result of that check, we've found that RHEL 5.x can't be used with NuProcess--despite having a sufficiently new kernel--because JNA requires glibc 2.7 or newer. (It might be worth noting this in NuProcess's README, in addition to the kernel minimum version.) That's unfortunate, but not entirely unexpected; RHEL 5 is very nearly end-of-life (November 2020).
However, we also had a support case from a customer running RHEL 7.6, which has a sufficiently new kernel (3.10) and glibc (2.17). Investigating their environment revealed they're using Zulu 8.41 (8u231), which brought us to this issue in NuProcess. We're tracking this issue as BSERV-12135.
In addition to the above testing with Azul's Zulu, I've tested with their Zing JVM too.
Java 8
java version "1.8.0-zing_19.12.100.0"
Zing Runtime Environment for Java Applications (build 1.8.0-zing_19.12.100.0-b1)
Zing 64-Bit Tiered VM (build 1.8.0-zing_19.12.100.0-b1-product-linux-X86_64, mixed mode)
With the above version, NuProcess master fails a mvn verify
with error:
java.lang.NoClassDefFoundError: Could not initialize class com.zaxxer.nuprocess.internal.LibJava10
at com.zaxxer.nuprocess.EnvironmentTest.runNuProcess(EnvironmentTest.java:86)
at com.zaxxer.nuprocess.EnvironmentTest.defaultEnv(EnvironmentTest.java:62)
While using bturner:bturner-azul-java-8
(i.e. this PR) mvn verify
passes.
Java 11
java version "11.0.5.0.101" 2020-01-07 LTS
Zing Runtime Environment for Java Applications 19.12.100.0+1 (product build 11.0.5.0.101+11-LTS)
Zing 64-Bit Tiered VM 19.12.100.0+1 (product build 11.0.5.0.101-zing_19.12.100.0-b1-product-linux-X86_64, mixed mode)
Both master
, and bturner:bturner-azul-java-8
pass.
Awesome! Thanks for the deep investigation and fixes!
@bturner NuProcess v1.2.6 has been published.
On #87 (May 2018), there was a report of a linkage issue when using Azul Zulu 10. As part of fixing that issue, a check was added to use a new code path when the JVM vendor included "Azul".
A month later, #91 (June 2018) was created showing a similar linkage error when using OpenJDK 10. For that issue, the Azul-specific change from #87 was generalized to apply to any Java 10+ JVM, but the Azul vendor check was not removed. As a result, Azul Zulu 8 (for example) attempts to use the Java 10 code path and fails.
Java_java_lang_ProcessImpl_forkAndExec
Java_java_lang_UNIXProcess_forkAndExec