-
Type: Build Failure
-
Resolution: Fixed
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: Java binding
-
None
Consistent hangs are observed running gradle on the Java bindings with JDK 8 when -DgitRevision is not set.
This may be causing a task timeout in the publish-java task. Here is an example publish-java timeout task.
To reproduce:
Spawn a ubuntu1804-small or rhel90-dbx-perf-large host and run:
git clone https://github.com/mongodb/libmongocrypt.git
cd libmongocrypt/bindings/java/mongocrypt/
export JAVA_HOME=/opt/java/jdk8
./gradlew check --info
Results in a hang ending with this message:
Starting process 'command 'git''. Working directory: /home/ec2-user/libmongocrypt-D2581_add_benchmarks/bindings/java/mongocrypt Command: git describe --tags --always --dirty
<-------------> 0% CONFIGURING [26s]
The hang appears when evaluating gitDescribe and defaultDownloadRevision. The hang does not appear with JDK 9:
git clone https://github.com/mongodb/libmongocrypt.git
cd libmongocrypt/bindings/java/mongocrypt/
export JAVA_HOME=/opt/java/jdk9
./gradlew check --info
Results in an expected java.lang.NoClassDefFoundError unable to locate the built libmongocrypt library.
Background & Motivation
This was discovered when implementing a benchmark for MONGOCRYPT-589 and avoided by using JDK 17 in the benchmark task.