Bamboo Specs scan fails with IllegalStateException

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

When Bamboo runs the Specs scan a process fails with a IllegalStateException (Could not update chain with key BLITZ3-REPO1P as it's being modified in another thread).

Diagnosis

During Specs scan the following error will be seen in the logs:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 Could not update chain with key PROJ-PLAN as it's being modified in another thread. 14-Jul-2021 10:52:43 java.lang.IllegalStateException: Could not update chain with key PROJ-PLAN as it's being modified in another thread. 14-Jul-2021 10:52:43 at com.atlassian.bamboo.configuration.external.PlanConfigImportServiceImpl.modifyExistingTopLevelPlan(PlanConfigImportServiceImpl.java:465) 14-Jul-2021 10:52:43 at com.atlassian.bamboo.configuration.external.PlanConfigImportServiceImpl.lambda$importPlan$0(PlanConfigImportServiceImpl.java:422) 14-Jul-2021 10:52:43 at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140) 14-Jul-2021 10:52:43 at com.atlassian.bamboo.persistence.BambooTransactionHibernateTemplate.execute(BambooTransactionHibernateTemplate.java:28) 14-Jul-2021 10:52:43 at com.atlassian.bamboo.configuration.external.PlanConfigImportServiceImpl.importPlan(PlanConfigImportServiceImpl.java:401) 14-Jul-2021 10:52:43 at com.atlassian.bamboo.configuration.external.rss.DefaultSpecsConsumer.importPlanProperties(DefaultSpecsConsumer.java:131) 14-Jul-2021 10:52:43 at com.atlassian.bamboo.configuration.external.rss.importers.PlanImporterProvider.lambda$getEntityProvider$1(PlanImporterProvider.java:38) 14-Jul-2021 10:52:43 at com.atlassian.bamboo.configuration.external.rss.AllTypesSpecsImporter.importBambooYamlsWithImporter(AllTypesSpecsImporter.java:130) 14-Jul-2021 10:52:43 at com.atlassian.bamboo.configuration.external.rss.AllTypesSpecsImporter.importBambooYamlsOfAllTypes(AllTypesSpecsImporter.java:69) 14-Jul-2021 10:52:43 at com.atlassian.bamboo.configuration.external.rss.YamlSpecsImportServiceImpl.lambda$processSimplifiedYaml$2(YamlSpecsImportServiceImpl.java:112) 14-Jul-2021 10:52:43 at com.atlassian.bamboo.configuration.external.rss.SpecsOptimizeProcessor.processSpecs(SpecsOptimizeProcessor.java:43) 14-Jul-2021 10:52:43 at com.atlassian.bamboo.configuration.external.rss.YamlSpecsImportServiceImpl.processSimplifiedYaml(YamlSpecsImportServiceImpl.java:108) 14-Jul-2021 10:52:43 at com.atlassian.bamboo.configuration.external.RepositoryStoredSpecsServiceImpl.tryProcessYaml(RepositoryStoredSpecsServiceImpl.java:338) 14-Jul-2021 10:52:43 at com.atlassian.bamboo.configuration.external.RepositoryStoredSpecsServiceImpl.runBambooSpecs(RepositoryStoredSpecsServiceImpl.java:184) 14-Jul-2021 10:52:43 at com.atlassian.bamboo.configuration.external.RssDetectionServiceImpl.runRssDetection(RssDetectionServiceImpl.java:374) 14-Jul-2021 10:52:43 at com.atlassian.bamboo.configuration.external.detection.RssDetectionRunnable.run(RssDetectionRunnable.java:42)

Cause

Few Specs scan threads try to modify same plan at the same time. Locking mechanism prevents concurrent plan configuration modification.

Solution

Avoid managing of plan configuration with different repositories. Check if RSS repository manage unique group of plans and deployments. Check same repository is not added twice to linked or project (since Bamboo 8.0 DC) repositories. 

Updated on February 26, 2025

Still need help?

The Atlassian Community is here for you.