Gradle 4.7 -- errors: Some child operations have not yet completed & Some worker leases have not been marked as completed


(jim.gish) #1

Can anyone offer any insight into this failure? It occurs on a test task.

FAILURE: Build failed with an exception.

  • What went wrong:
    Some child operations have not yet completed.

  • Try:
    Run with --debug option to get more log output. Run with --scan to get full insights.

  • Exception is:
    java.lang.IllegalStateException: Some child operations have not yet completed.
    at org.gradle.internal.work.DefaultWorkerLeaseService$DefaultWorkerLease.releaseLock(DefaultWorkerLeaseService.java:350)
    at org.gradle.internal.resources.AbstractTrackedResourceLock.unlock(AbstractTrackedResourceLock.java:60)
    at org.gradle.internal.resources.DefaultResourceLockCoordinationService$ReleaseLocks.transform(DefaultResourceLockCoordinationService.java:213)
    at org.gradle.internal.resources.DefaultResourceLockCoordinationService$ReleaseLocks.transform(DefaultResourceLockCoordinationService.java:203)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan$10.transform(DefaultTaskExecutionPlan.java:675)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan$10.transform(DefaultTaskExecutionPlan.java:669)
    at org.gradle.internal.resources.DefaultResourceLockCoordinationService.withStateLock(DefaultResourceLockCoordinationService.java:45)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:669)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:596)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:98)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
    at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
    at java.lang.Thread.run(Thread.java:748)

  • Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
See https://docs.gradle.org/4.7/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 1m 24s
29 actionable tasks: 29 executed
Stopped 4 worker daemon(s).

FAILURE: Build failed with an exception.

  • What went wrong:
    Some worker leases have not been marked as completed.

  • Try:
    Run with --debug option to get more log output. Run with --scan to get full insights.

  • Exception is:
    java.lang.IllegalStateException: Some worker leases have not been marked as completed.
    at org.gradle.internal.work.DefaultWorkerLeaseService$1.transform(DefaultWorkerLeaseService.java:121)
    at org.gradle.internal.work.DefaultWorkerLeaseService$1.transform(DefaultWorkerLeaseService.java:117)
    at org.gradle.internal.resources.DefaultResourceLockCoordinationService.withStateLock(DefaultResourceLockCoordinationService.java:45)
    at org.gradle.internal.work.DefaultWorkerLeaseService.stop(DefaultWorkerLeaseService.java:117)
    at org.gradle.internal.concurrent.CompositeStoppable.stop(CompositeStoppable.java:103)
    at org.gradle.internal.service.DefaultServiceRegistry$ManagedObjectServiceProvider.stop(DefaultServiceRegistry.java:597)
    at org.gradle.internal.concurrent.CompositeStoppable.stop(CompositeStoppable.java:103)
    at org.gradle.internal.service.DefaultServiceRegistry$OwnServices.stop(DefaultServiceRegistry.java:489)
    at org.gradle.internal.concurrent.CompositeStoppable.stop(CompositeStoppable.java:103)
    at org.gradle.internal.service.DefaultServiceRegistry$CompositeServiceProvider.stop(DefaultServiceRegistry.java:1002)
    at org.gradle.internal.concurrent.CompositeStoppable.stop(CompositeStoppable.java:103)
    at org.gradle.internal.service.DefaultServiceRegistry.close(DefaultServiceRegistry.java:257)
    at org.gradle.internal.concurrent.CompositeStoppable$2.stop(CompositeStoppable.java:88)
    at org.gradle.internal.concurrent.CompositeStoppable.stop(CompositeStoppable.java:103)
    at org.gradle.internal.service.scopes.CrossBuildSessionScopeServices.close(CrossBuildSessionScopeServices.java:103)
    at org.gradle.internal.concurrent.CompositeStoppable$2.stop(CompositeStoppable.java:88)
    at org.gradle.internal.concurrent.CompositeStoppable.stop(CompositeStoppable.java:103)
    at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:69)
    at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:34)
    at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:36)
    at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:25)
    at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigurationBuildActionExecuter.java:43)
    at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigurationBuildActionExecuter.java:29)
    at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:64)
    at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:29)
    at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:59)
    at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:44)
    at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:46)
    at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:30)
    at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:67)
    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
    at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:37)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
    at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
    at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
    at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74)
    at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72)
    at org.gradle.util.Swapper.swap(Swapper.java:38)
    at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
    at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
    at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:62)
    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
    at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:82)
    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
    at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50)
    at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:295)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
    at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
    at java.lang.Thread.run(Thread.java:748)

  • Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
See https://docs.gradle.org/4.7/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 1m 24s


(jim.gish) #2

After much frustrating debugging, I found the problem. The failing test run had the following in build.gradle:
test {
scanForTestClasses = false
workingDir “${testClassesDir}”
systemProperty ‘javax.wsdl.factory.WSDLFactoryCandidate’, ‘oracle.j2ee.ws.wsdl.factory.WSDLFactoryImpl’
include “**/oracle/j2ee/ws/wsdl/OraWSDLTestSuite.class”
}

Since testClassesDir is deprecated, this caused workingDir to be set to null. I failed to notice (for a very long time), the following output that finally made me realize what had happened:
Starting process ‘Gradle Test Executor 1’. Working directory: /weblogic/dev/src123100/webservices/src/base/orawsdl-api/null Command: /weblogic/dev/auto_download/x86_64/jdk180161b12/jdk1.8.0_161/bin/java -Djava.awt.headless=true -Djava.security.manager=worker.org.gradle.process.internal.worker.child.BootstrapSecurityManager -Djavax.wsdl.factory.WSDLFactoryCandidate=oracle.j2ee.ws.wsdl.factory.WSDLFactoryImpl -Dorg.gradle.native=false -XX:+HeapDumpOnOutOfMemoryError -Xmx1g -Dfile.encoding=ISO-8859-1 -Djava.io.tmpdir=/weblogic/dev/src123100/webservices/src/base/orawsdl-api/target/classes/java/test -Duser.country=US -Duser.language=en -Duser.variant -ea -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5006 -cp /scratch/jgish/gradle_cache/caches/4.7/workerMain/gradle-worker.jar worker.org.gradle.process.internal.worker.GradleWorkerMain ‘Gradle Test Executor 1’

The only errors I got were the messages above and stack traces that were totally misleading. Apparently an internal exception was swallowed and not reported.

Suggestion – I believe this all could be avoided if the gradle test builder would simply do a if (!workingDir.exists()) { fail }

Thanks,
Jim