Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Problem

Your builds fail due to Tasks for AWS encountering an java.lang.OutOfMemoryError: Java heap space:

Code Block
languagejava
2016-04-24 22:16:08,421 ERROR [16-BAM::Deployment::Agent:pool-32-thread-1] [TaskExecutorImpl] Error occurred while running Task 'Create Deplyoment Environment' of type net.utoolity.atlassian.bamboo.tasks-for-aws:aws.cloudformation.stack.
java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:3332)
at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:137)
at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:121)
at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:445)
at java.lang.StringBuffer.append(StringBuffer.java:312)
at java.lang.StringBuffer.append(StringBuffer.java:97)
at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:459)
at java.lang.StringBuffer.append(StringBuffer.java:340)
at java.util.regex.Matcher.appendReplacement(Matcher.java:890)
at java.util.regex.Matcher.replaceAll(Matcher.java:955)
at java.lang.String.replace(String.java:2240)
at com.atlassian.bamboo.util.PasswordMaskingUtils.mask(PasswordMaskingUtils.java:107)
at com.atlassian.bamboo.util.PasswordMaskingUtils.maskPossiblePasswordValues(PasswordMaskingUtils.java:163)
at com.atlassian.bamboo.build.logger.interceptors.PasswordMaskingLogMutator.createMutatedLog(PasswordMaskingLogMutator.java:32)
at com.atlassian.bamboo.build.logger.interceptors.PasswordMaskingLogMutator.mutate(PasswordMaskingLogMutator.java:21)
at com.atlassian.bamboo.build.logger.LogMutatorStack.mutate(LogMutatorStack.java:52)
at com.atlassian.bamboo.build.logger.AbstractBuildLogger.interceptAndMutate(AbstractBuildLogger.java:125)
at com.atlassian.bamboo.build.logger.AbstractBuildLogger.addBuildLogEntry(AbstractBuildLogger.java:104)
at com.atlassian.bamboo.build.logger.AbstractBuildLogger.addBuildLogEntry(AbstractBuildLogger.java:163)
at net.utoolity.atlassian.bamboo.taws.AWSTask.createAndLogSingleVariable(AWSTask.java:375)
at net.utoolity.atlassian.bamboo.taws.AWSTask.createAndLogVariables(AWSTask.java:359)
at net.utoolity.atlassian.bamboo.taws.CloudFormationTask.describeSingleResource(CloudFormationTask.java:1253)
at net.utoolity.atlassian.bamboo.taws.CloudFormationTask.describeResources(CloudFormationTask.java:1234)
at net.utoolity.atlassian.bamboo.taws.CloudFormationTask.waitForTransitionCompletion(CloudFormationTask.java:1080)
at net.utoolity.atlassian.bamboo.taws.CloudFormationTask.updateStack(CloudFormationTask.java:643)
at net.utoolity.atlassian.bamboo.taws.CloudFormationTask.executeUpdate(CloudFormationTask.java:443)
at net.utoolity.atlassian.bamboo.taws.CloudFormationTask.execute(CloudFormationTask.java:228)
at net.utoolity.atlassian.bamboo.taws.AWSTask.execute(AWSTask.java:145)
at com.atlassian.bamboo.task.TaskExecutorImpl.lambda$executeTasks$125(TaskExecutorImpl.java:273)
at com.atlassian.bamboo.task.TaskExecutorImpl$$Lambda$170/1230542041.call(Unknown Source)
at com.atlassian.bamboo.task.TaskExecutorImpl.executeTaskWithPrePostActions(TaskExecutorImpl.java:202)
at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:273)


Solution

This problem is caused by an upstream bug introduced in Bamboo 5.9.1 and addressed in Bamboo 5.12.0.2:

  • Jira Legacy
    serverAtlassian JIRA
    serverId144880e9-a353-312f-9412-ed028e8166fa
    keyBAM-17488

Accordingly, you can address it by either upgrading Bamboo to a release that contains a respective fix, or by updating to Tasks for AWS 2.10.4, which provides a respective workaround (refer to 

Jira Legacy
serverJIRA (utoolity.atlassian.net)
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverIdfac61c2e-db0a-39da-bb3c-e0dc0ef556f0
keyUAA-168
for details).

Info
titleFeature flag

The workaround avoids the build log flooding by skipping the creation of variables if they are password variables (variable name contains "password", "awsSecretKey" or "passphrase"and the variable value contains only asterisks.

For the (unlikely) case that this would affect any existing build configurations, the workaround can be disabled by setting a global or plan variable utoolity.flags.disableWorkaroundForBAM17488 to true.

Filter by label (Content by label)
showLabelsfalse
max5
spacesUAAKB
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel in ( "tasks-for-aws" , "memory" , "exception" , "heap" ) and type = "page" and space = "UAAKB"
labelstasks-for-aws exception memory heap

Page Properties
hiddentrue


Related issues