Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GroovyGradle fails with IndexOutOfBoundsException in multiproject build + parallel #877

Closed
2 tasks
k-brooks opened this issue Jun 14, 2021 · 4 comments
Closed
2 tasks

Comments

@k-brooks
Copy link

If you are submitting a bug, please include the following:

  • summary of problem
    Spotless groovyGradle occasionally fails with an IndexOutOfBoundsException when run in a multi-project build with parallel execution.
  • gradle or maven version
    Gradle version = 6.8.3
  • spotless version
    Spotless version = 5.1.1
  • operating system and version
    Windows 10, Ubuntu 20, Centos 7, AWS Linux 2
  • copy-paste your full Spotless configuration block(s), and a link to a public git repo that reproduces the problem if possible
apply plugin: 'com.diffplug.spotless'

spotless {
  format 'misc', {
    target '.gitignore'
    trimTrailingWhitespace()
    indentWithSpaces(2)
  }
  groovyGradle {
    target '*.gradle', 'gradle/*.gradle'
    importOrderFile eclipseSupport.vestmarkImportOrder
    greclipse().configFile([
      eclipseSupport.vestmarkFormat,
      eclipseSupport.groovyEclipseUiPrefs
    ])
  }
}
  • copy-paste the full content of any console errors emitted by gradlew spotless[Apply/Check] --stacktrace
[2021-06-08T02:09:38.430Z] FAILURE: Build failed with an exception.

[2021-06-08T02:09:38.430Z] 

[2021-06-08T02:09:38.430Z] * What went wrong:

[2021-06-08T02:09:38.430Z] Execution failed for task ':redacted:spotlessGroovyGradle'.

[2021-06-08T02:09:38.430Z] > java.lang.ArrayIndexOutOfBoundsException (no error message)

[2021-06-08T02:09:38.430Z] 

[2021-06-08T02:09:38.430Z] * Try:

[2021-06-08T02:09:38.430Z] Run with --debug option to get more log output. Run with --scan to get full insights.

[2021-06-08T02:09:38.430Z] 

[2021-06-08T02:09:38.430Z] * Exception is:

[2021-06-08T02:09:38.430Z] org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':applications:mda:components:mmi:spotlessGroovyGradle'.

[2021-06-08T02:09:38.430Z] 	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$3(ExecuteActionsTaskExecuter.java:186)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:268)

[2021-06-08T02:09:38.430Z] 	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:184)

[2021-06-08T02:09:38.430Z] 	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:173)

[2021-06-08T02:09:38.430Z] 	at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:109)

[2021-06-08T02:09:38.430Z] 	at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)

[2021-06-08T02:09:38.430Z] 	at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:62)

[2021-06-08T02:09:38.430Z] 	at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)

[2021-06-08T02:09:38.430Z] 	at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56)

[2021-06-08T02:09:38.430Z] 	at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)

[2021-06-08T02:09:38.430Z] 	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)

[2021-06-08T02:09:38.430Z] 	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)

[2021-06-08T02:09:38.430Z] 	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:200)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:195)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:62)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$call$2(DefaultBuildOperationExecutor.java:76)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.callWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:54)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:76)

[2021-06-08T02:09:38.430Z] 	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)

[2021-06-08T02:09:38.430Z] 	at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:41)

[2021-06-08T02:09:38.430Z] 	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:411)

[2021-06-08T02:09:38.430Z] 	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:398)

[2021-06-08T02:09:38.430Z] 	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:391)

[2021-06-08T02:09:38.430Z] 	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:377)

[2021-06-08T02:09:38.430Z] 	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.lambda$run$0(DefaultPlanExecutor.java:127)

[2021-06-08T02:09:38.430Z] 	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:191)

[2021-06-08T02:09:38.430Z] 	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:182)

[2021-06-08T02:09:38.430Z] 	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:124)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)

[2021-06-08T02:09:38.430Z] Caused by: java.lang.ArrayIndexOutOfBoundsException

[2021-06-08T02:09:38.430Z] 	at com.diffplug.spotless.extra.eclipse.groovy.GrEclipseFormatterStepImpl$GroovyErrorListener.errorsDetected(GrEclipseFormatterStepImpl.java:111)

[2021-06-08T02:09:38.430Z] 	at com.diffplug.spotless.extra.eclipse.groovy.GrEclipseFormatterStepImpl.format(GrEclipseFormatterStepImpl.java:78)

[2021-06-08T02:09:38.430Z] 	at com.diffplug.spotless.extra.groovy.GrEclipseFormatterStep.lambda$apply$0(GrEclipseFormatterStep.java:54)

[2021-06-08T02:09:38.430Z] 	at com.diffplug.spotless.FormatterFunc.apply(FormatterFunc.java:32)

[2021-06-08T02:09:38.430Z] 	at com.diffplug.spotless.FormatterStepImpl$Standard.format(FormatterStepImpl.java:78)

[2021-06-08T02:09:38.430Z] 	at com.diffplug.spotless.FormatterStep$Strict.format(FormatterStep.java:76)

[2021-06-08T02:09:38.430Z] 	at com.diffplug.spotless.Formatter.compute(Formatter.java:230)

[2021-06-08T02:09:38.430Z] 	at com.diffplug.spotless.PaddedCell.calculateDirtyState(PaddedCell.java:201)

[2021-06-08T02:09:38.430Z] 	at com.diffplug.spotless.PaddedCell.calculateDirtyState(PaddedCell.java:188)

[2021-06-08T02:09:38.430Z] 	at com.diffplug.gradle.spotless.SpotlessTaskImpl.processInputFile(SpotlessTaskImpl.java:71)

[2021-06-08T02:09:38.430Z] 	at com.diffplug.gradle.spotless.SpotlessTaskImpl.performAction(SpotlessTaskImpl.java:57)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:104)

[2021-06-08T02:09:38.430Z] 	at org.gradle.api.internal.project.taskfactory.IncrementalInputsTaskAction.doExecute(IncrementalInputsTaskAction.java:32)

[2021-06-08T02:09:38.430Z] 	at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:51)

[2021-06-08T02:09:38.430Z] 	at org.gradle.api.internal.project.taskfactory.AbstractIncrementalTaskAction.execute(AbstractIncrementalTaskAction.java:25)

[2021-06-08T02:09:38.430Z] 	at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:29)

[2021-06-08T02:09:38.430Z] 	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$2.run(ExecuteActionsTaskExecuter.java:494)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:56)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$run$1(DefaultBuildOperationExecutor.java:71)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.runWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:45)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:71)

[2021-06-08T02:09:38.430Z] 	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:479)

[2021-06-08T02:09:38.430Z] 	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:462)

[2021-06-08T02:09:38.430Z] 	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.access$400(ExecuteActionsTaskExecuter.java:105)

[2021-06-08T02:09:38.430Z] 	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution.executeWithPreviousOutputFiles(ExecuteActionsTaskExecuter.java:273)

[2021-06-08T02:09:38.430Z] 	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution.execute(ExecuteActionsTaskExecuter.java:251)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.execution.steps.ExecuteStep.lambda$executeOperation$0(ExecuteStep.java:65)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.execution.steps.ExecuteStep.executeOperation(ExecuteStep.java:65)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.execution.steps.ExecuteStep.access$000(ExecuteStep.java:34)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.execution.steps.ExecuteStep$1.call(ExecuteStep.java:47)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.execution.steps.ExecuteStep$1.call(ExecuteStep.java:44)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:200)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:195)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:62)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$call$2(DefaultBuildOperationExecutor.java:76)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.callWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:54)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:76)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:44)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:34)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.execution.steps.RemovePreviousOutputsStep.execute(RemovePreviousOutputsStep.java:72)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.execution.steps.RemovePreviousOutputsStep.execute(RemovePreviousOutputsStep.java:42)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:53)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:39)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.execution.steps.CancelExecutionStep.execute(CancelExecutionStep.java:44)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.execution.steps.TimeoutStep.executeWithoutTimeout(TimeoutStep.java:77)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.execution.steps.TimeoutStep.execute(TimeoutStep.java:58)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:54)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:32)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.execution.steps.CaptureStateAfterExecutionStep.execute(CaptureStateAfterExecutionStep.java:57)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.execution.steps.CaptureStateAfterExecutionStep.execute(CaptureStateAfterExecutionStep.java:38)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.execution.steps.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:63)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.execution.steps.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:30)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.execution.steps.BuildCacheStep.executeWithoutCache(BuildCacheStep.java:176)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.execution.steps.BuildCacheStep.execute(BuildCacheStep.java:76)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.execution.steps.BuildCacheStep.execute(BuildCacheStep.java:47)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:43)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:32)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:39)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:25)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.execution.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:102)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.execution.steps.SkipUpToDateStep.lambda$execute$0(SkipUpToDateStep.java:95)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:55)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:39)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:83)

[2021-06-08T02:09:38.430Z] 	at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:44)

[2021-06-08T02:09:38.431Z] 	at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:37)

[2021-06-08T02:09:38.431Z] 	at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:27)

[2021-06-08T02:09:38.431Z] 	at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:96)

[2021-06-08T02:09:38.431Z] 	at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:52)

[2021-06-08T02:09:38.431Z] 	at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:83)

[2021-06-08T02:09:38.431Z] 	at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:54)

[2021-06-08T02:09:38.431Z] 	at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:74)

[2021-06-08T02:09:38.431Z] 	at org.gradle.internal.execution.steps.SkipEmptyWorkStep.lambda$execute$2(SkipEmptyWorkStep.java:88)

[2021-06-08T02:09:38.431Z] 	at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:88)

[2021-06-08T02:09:38.431Z] 	at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:34)

[2021-06-08T02:09:38.431Z] 	at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsStartedStep.execute(MarkSnapshottingInputsStartedStep.java:38)

[2021-06-08T02:09:38.431Z] 	at org.gradle.internal.execution.steps.LoadExecutionStateStep.execute(LoadExecutionStateStep.java:46)

[2021-06-08T02:09:38.431Z] 	at org.gradle.internal.execution.steps.LoadExecutionStateStep.execute(LoadExecutionStateStep.java:34)

[2021-06-08T02:09:38.431Z] 	at org.gradle.internal.execution.steps.AssignWorkspaceStep.lambda$execute$0(AssignWorkspaceStep.java:43)

[2021-06-08T02:09:38.431Z] 	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution$3.withWorkspace(ExecuteActionsTaskExecuter.java:286)

[2021-06-08T02:09:38.431Z] 	at org.gradle.internal.execution.steps.AssignWorkspaceStep.execute(AssignWorkspaceStep.java:43)

[2021-06-08T02:09:38.431Z] 	at org.gradle.internal.execution.steps.AssignWorkspaceStep.execute(AssignWorkspaceStep.java:33)

[2021-06-08T02:09:38.431Z] 	at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:40)

[2021-06-08T02:09:38.431Z] 	at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:30)

[2021-06-08T02:09:38.431Z] 	at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:54)

[2021-06-08T02:09:38.431Z] 	at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:40)

[2021-06-08T02:09:38.431Z] 	at org.gradle.internal.execution.impl.DefaultExecutionEngine.execute(DefaultExecutionEngine.java:41)

[2021-06-08T02:09:38.431Z] 	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:183)

[2021-06-08T02:09:38.431Z] 	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:183)

[2021-06-08T02:09:38.431Z] 	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:173)

[2021-06-08T02:09:38.431Z] 	at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:109)

[2021-06-08T02:09:38.431Z] 	at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)

[2021-06-08T02:09:38.431Z] 	at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:62)

[2021-06-08T02:09:38.431Z] 	at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)

[2021-06-08T02:09:38.431Z] 	at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56)

[2021-06-08T02:09:38.431Z] 	at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)

[2021-06-08T02:09:38.431Z] 	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)

[2021-06-08T02:09:38.431Z] 	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)

[2021-06-08T02:09:38.431Z] 	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)

[2021-06-08T02:09:38.431Z] 	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:200)

[2021-06-08T02:09:38.431Z] 	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:195)

[2021-06-08T02:09:38.431Z] 	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)

[2021-06-08T02:09:38.431Z] 	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)

[2021-06-08T02:09:38.431Z] 	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)

[2021-06-08T02:09:38.431Z] 	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)

[2021-06-08T02:09:38.431Z] 	at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:62)

[2021-06-08T02:09:38.431Z] 	at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$call$2(DefaultBuildOperationExecutor.java:76)

[2021-06-08T02:09:38.431Z] 	at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.callWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:54)

[2021-06-08T02:09:38.431Z] 	at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:76)

[2021-06-08T02:09:38.431Z] 	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)

[2021-06-08T02:09:38.431Z] 	at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:41)

[2021-06-08T02:09:38.431Z] 	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:411)

[2021-06-08T02:09:38.431Z] 	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:398)

[2021-06-08T02:09:38.431Z] 	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:391)

[2021-06-08T02:09:38.431Z] 	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:377)

[2021-06-08T02:09:38.431Z] 	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.lambda$run$0(DefaultPlanExecutor.java:127)

[2021-06-08T02:09:38.431Z] 	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:191)

[2021-06-08T02:09:38.431Z] 	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:182)

[2021-06-08T02:09:38.431Z] 	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:124)

[2021-06-08T02:09:38.431Z] 	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)

[2021-06-08T02:09:38.431Z] 	at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)

[2021-06-08T02:09:38.431Z] 	at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)

@k-brooks
Copy link
Author

k-brooks commented Jun 14, 2021

Although the line numbers do not line up with the method in the GrEclipseFormatterStepImpl class, I think the issue is with the GroovyLogManager - it is not thread safe and is backed by an array. It would explain the exception.
Specifically https://github.com/diffplug/spotless/blob/gradle/5.1.1/_ext/eclipse-groovy/src/main/java/com/diffplug/spotless/extra/eclipse/groovy/GrEclipseFormatterStepImpl.java#L109
and
https://github.com/diffplug/spotless/blob/gradle/5.1.1/_ext/eclipse-groovy/src/main/java/com/diffplug/spotless/extra/eclipse/groovy/GrEclipseFormatterStepImpl.java#L120

k-brooks pushed a commit to Vestmark/spotless that referenced this issue Jun 14, 2021
k-brooks pushed a commit to Vestmark/spotless that referenced this issue Jun 14, 2021
@fvgh
Copy link
Member

fvgh commented Jun 14, 2021

@k-brooks I agree with your analysis and fix. Thanks a lot.

k-brooks pushed a commit to Vestmark/spotless that referenced this issue Jun 14, 2021
fvgh pushed a commit that referenced this issue Jun 15, 2021
@fvgh
Copy link
Member

fvgh commented Jun 15, 2021

Closed by PR #877.
Thanks for the fix @k-brooks !

@fvgh fvgh closed this as completed Jun 15, 2021
@nedtwigg
Copy link
Member

Fixed in plugin-gradle 5.14.0 and plugin-maven 2.12.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants