It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Prevent Bamboo from crashing during test with java.lang.IllegalMonitorStateException

While attempting to run a KitchenCI test on Bamboo, we get the following error:

Error occurred while running Task 'Kitchen Convergence Test(5)' of type net.bytesource.bamboo.cheftesttask:kitchenTestTask.
22-Mar-2016 16:47:21 java.lang.IllegalMonitorStateException
22-Mar-2016 16:47:21 at java.lang.Object.wait(Native Method)
22-Mar-2016 16:47:21 at net.bytesource.bamboo.cheftesttask.KitchenTestTask.execute(
22-Mar-2016 16:47:21 at com.atlassian.bamboo.task.TaskExecutorImpl.lambda$executeTasks$124(
22-Mar-2016 16:47:21 at com.atlassian.bamboo.task.TaskExecutorImpl.executeTaskWithPrePostActions(
22-Mar-2016 16:47:21 at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(
22-Mar-2016 16:47:21 at com.atlassian.bamboo.task.TaskExecutorImpl.execute(
22-Mar-2016 16:47:21 at
22-Mar-2016 16:47:21 at
22-Mar-2016 16:47:21 at$
22-Mar-2016 16:47:21 at$
22-Mar-2016 16:47:21 at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(
22-Mar-2016 16:47:21 at
22-Mar-2016 16:47:21 at$
22-Mar-2016 16:47:21 at com.atlassian.bamboo.utils.BambooRunnables$
22-Mar-2016 16:47:21 at
22-Mar-2016 16:47:21 at
22-Mar-2016 16:47:21 at$
22-Mar-2016 16:47:21 at

I have tried tracking the cause of this error down but I am having zero luck figuring it out. I need to know how I can prevent, suppress, or otherwise ignore this error so that Bamboo will continue testing as configured.

1 answer

I am having the exact same problem.  Have you found a resolution yet?


The problem exists in Test Tasks for Chef Cookbooks v1.1 addon. The short answer is to downgrade versions to v1.0 and do not upgrade until the developer fixes the problem. To downgrade:

  1. Download the version 1.0 addon here:
  2. Go to the Settings page in Bamboo (gear icon in top right).
  3. Under Add-Ons on the left, go to Manage add-ons.
  4. Remove the Test Tasks for Chef Cookbooks v1.1 addon.
  5. Choose Upload addon option. Provide the file you downloaded.
  6. Disregard Bamboo whining about alleged incompatibility. In this case, latest is definitely not the greatest.
  7. Profit!

Note that you should not have to go back into all of your build plans and re-add all the Chef related tasks. They should still be there.

The long answer, in case you're crafty with Java programming, is that there is a bug in the TaskResult execute(TaskContext taskContext) function of the KitchenTestTask.class file on line 25, as noted by the error in the log:


I compared this file to the one in version 1.0 and found a block of code that has been added. Unfortunately, it appears as though code comments are an alien concept to this developer, so I'm not sure what they're trying to accomplish by adding the highlighted block:


The above block of highlighted code does not exist in v1.0 and the release notes say nothing of adding this block into the code. I submitted a lengthy request to the developer of the plugin to fix the problem, but have yet to see any progress. We are running Bamboo (latest) on CentOS 6.7 Final with Java JDK 1.8.0u74. If the Developer can't (or won't) fix it, then we'll probably end up forking the plugin and and maintaining our own copy of it.

Ah, perfect.  that did the trick,  Thanks so much for your help!


If you do fork i'd love to know about it.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bamboo

Cannot save a repository using Chrome v83 and other Chromium based browsers such as Edge

Hello Bamboo Community, I'm Jey from Bamboo Support team. If you have upgraded your Chrome browser to version 83 recently, it is observed that the save operation just spins and never completes w...

502 views 3 5
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you