[MONGOCRYPT-590] Gradle may hang in CONFIGURING step Created: 30/Aug/23  Updated: 02/Oct/23

Status: Backlog
Project: Libmongocrypt
Component/s: Java binding
Affects Version/s: None
Fix Version/s: None

Type: Build Failure Priority: Minor - P4
Reporter: Kevin Albertson Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

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.


Generated at Thu Feb 08 09:09:02 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.