Details
-
Bug
-
Resolution: Fixed
-
Low
-
8.0.4, 8.0.5, 8.0.11
-
None
-
3
-
Severity 2 - Major
-
1
-
Description
Issue Summary
Unable to add a new linked repository from a plan when there are thousands of repositories in the database.
Thread dumps show significant recursion at:
"http-nio-8085-exec-29" #1558 daemon prio=5 os_prio=0 tid=0x00007f986801c000 nid=0x3f5a3 runnable [0x00007f93698af000] java.lang.Thread.State: RUNNABLE at freemarker.core.AddConcatExpression$ConcatenatedSequence.size(AddConcatExpression.java:184) at freemarker.core.AddConcatExpression$ConcatenatedSequence.size(AddConcatExpression.java:184) at freemarker.core.AddConcatExpression$ConcatenatedSequence.size(AddConcatExpression.java:184) at freemarker.core.AddConcatExpression$ConcatenatedSequence.size(AddConcatExpression.java:184) at freemarker.core.AddConcatExpression$ConcatenatedSequence.size(AddConcatExpression.java:184) at freemarker.core.AddConcatExpression$ConcatenatedSequence.size(AddConcatExpression.java:184)
- Due to the sheer amount of recursion, no further stack lines are present on the thread dump.
This BUG is not to be confused with the issue reported on the following KB:
Though both share similar symptoms, the issues are different.
Steps to Reproduce
- Bamboo instance with thousands of linked repositories
- Try to add a repository from a plan
Expected Results
- The repository should be added
Actual Results
- Users will see a waiting spinning wheel that may or may not complete
Workaround
The official fix available in Bamboo 8.1.2 makes use of the filter built-in, which is only available on FreeMarker 2.3.29+. Bamboo 8.0.x uses FreeMarker 2.3.24.
Backporting the fix to Bamboo 8.0 won't be trivial as we normally don't provide any 3rd party dependencies updates between minor releases for compatibility reasons.
Unless you can't upgrade to Bamboo 8.1.2 or later, you can try the following workaround that will:
- Upgrade FreeMarker to 2.3.31
- Apply the fix to the FTL
Please understand that this solution was not tested by our QA team and is not guaranteed to work in every situation. It is also important to mention that updating the FreeMarker library version in Bamboo 8.0.x may produce unexpected results which are not tracked by our developers and support.
This workaround was validated on Bamboo 8.0.x. No tests were executed on Bamboo 7.x.
Step-by-step:
- Download Bamboo 8.1.2. Extract it to a temporary location.
- Locate the following files:
- atlassian-bamboo-8.1.2/atlassian-bamboo/WEB-INF/lib/freemarker-2.3.31-atlassian-2.jar
- atlassian-bamboo-8.1.2/atlassian-bamboo/build/common/repositoryCommon.ftl
- Stop Bamboo (including any running agents)
- Copy the updated FreeMarker JAR file to your <bamboo-install>/atlassian-bamboo/WEB-INF/lib directory. Make sure to adjust the file ownership/permissions
- Move the original <bamboo-install>/atlassian-bamboo/WEB-INF/lib/freemarker-2.3.24-atlassian-20.jar to a backup location – Do not leave the original file on the same directory
- Back up the original FreeMarker template <bamboo-install>/atlassian-bamboo/build/common/repositoryCommon.ftl
- Replace it with the contents of Bamboo 8.1.2 repositoryCommon.ftl Make sure to adjust the file ownership/permissions
- Start Bamboo & Agents
Attachments
Issue Links
- mentioned in
-
Page Loading...