Uploaded image for project: 'Libmongocrypt'
  1. Libmongocrypt
  2. MONGOCRYPT-590

Gradle may hang in CONFIGURING step

    • Type: Icon: Build Failure Build Failure
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.9.0
    • 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.

            Assignee:
            kevin.albertson@mongodb.com Kevin Albertson
            Reporter:
            kevin.albertson@mongodb.com Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: