Contentbylabel fails showing 'Error formatting macro: contentbylabel: java.util.ConcurrentModificationException...' to the user.

      This is occuring randomly but repeatedly, hundreds of times a day in our environment with about 10 000 pageviews per day, with contentbylabel used on every space's Homepage.

          Form Name

            [CONFSERVER-15313] Contentbylabel ConcurrentModificationException

            George Varghese added a comment -
            Atlassian Update - 27 March 2025

            Hi,

            At Atlassian, our goal is to ensure we’re providing the best experience for our customers. With our new Data Center strategy, Atlassian's focus is on security, compliance, and performance and is a key driver in prioritizing bugs. Closing the bugs that do not fall into those categories will allow us to focus on the ones in the most current versions of our products.

            This bug is being closed due to a lack of engagement in the last four years, including no new watchers, votes, or comments; this inactivity suggests a low impact.

            Please note the comments on this thread are not being monitored.

            You can read more about our bug fix policy here and how we prioritize bugs.

            To learn more about our recent investments in Confluence Data Center, please check our public roadmap and dashboards containing recently resolved issues, current work, and future plans.

            Kind regards,
            Confluence Data Center

            George Varghese added a comment - Atlassian Update - 27 March 2025 Hi, At Atlassian, our goal is to ensure we’re providing the best experience for our customers. With our new Data Center strategy, Atlassian's focus is on security, compliance, and performance and is a key driver in prioritizing bugs. Closing the bugs that do not fall into those categories will allow us to focus on the ones in the most current versions of our products. This bug is being closed due to a lack of engagement in the last four years , including no new watchers, votes, or comments; this inactivity suggests a low impact. Please note the comments on this thread are not being monitored. You can read more about our bug fix policy here and how we prioritize bugs. To learn more about our recent investments in Confluence Data Center, please check our public roadmap and dashboards containing recently resolved issues , current work, and future plans . Kind regards, Confluence Data Center

            Eveline added a comment -

            We are currently experiencing this problem on our confluence 5.6.6 installation. We've had this for quite some while. The problem seemed to have disappeared completely a while ago, just after an upgrade to 5.6.1. But it slowly creeped back in, and our recent upgrade (because of the security issue) to 5.6.6 did not change this at all. The problem is still getting worse. Nowadays pages containing this macro always give this error, and it often takes multiple reloads to get them to work. We use this macro quite intensively, so we'd really like a quick solution to this problem.

            Eveline added a comment - We are currently experiencing this problem on our confluence 5.6.6 installation. We've had this for quite some while. The problem seemed to have disappeared completely a while ago, just after an upgrade to 5.6.1. But it slowly creeped back in, and our recent upgrade (because of the security issue) to 5.6.6 did not change this at all. The problem is still getting worse. Nowadays pages containing this macro always give this error, and it often takes multiple reloads to get them to work. We use this macro quite intensively, so we'd really like a quick solution to this problem.

            A customer of ours ran into this the other day. They were using version 2.4.3.

            I've fixed it and created a pull request: https://bitbucket.org/atlassian/confluence-advanced-macros-plugin/pull-request/32/fixes-the-concurrency-bug-by-removing/diff

            The fix is against version 2.4.3 so it currently conflicts on master.

            If you would like to build a fixed version of the plugin, you can build this branch: https://bitbucket.org/Adaptavist/confluence-advanced-macros-plugin/branch/CONF-15313-content-by-label-concurrent-modification-exception

            Jon Mort [Adaptavist] added a comment - A customer of ours ran into this the other day. They were using version 2.4.3. I've fixed it and created a pull request: https://bitbucket.org/atlassian/confluence-advanced-macros-plugin/pull-request/32/fixes-the-concurrency-bug-by-removing/diff The fix is against version 2.4.3 so it currently conflicts on master. If you would like to build a fixed version of the plugin, you can build this branch: https://bitbucket.org/Adaptavist/confluence-advanced-macros-plugin/branch/CONF-15313-content-by-label-concurrent-modification-exception

            still have that issue under some load.

            Aleksey Shirokih added a comment - still have that issue under some load.

            Thanks for your confirmation Jonas.

            Roy Hartono [Atlassian] added a comment - Thanks for your confirmation Jonas.

            Hi Roy,

            actually this error won't actually take Confluence down, but the macro call fails and renders the error statement instead of the expected result.

            Since contentbylabel is one of the key macros to take advantage of labels, it should be as stable as possible.

            Jonas

            Jonas Sundman added a comment - Hi Roy, actually this error won't actually take Confluence down, but the macro call fails and renders the error statement instead of the expected result. Since contentbylabel is one of the key macros to take advantage of labels, it should be as stable as possible. Jonas

            Hi Jonas,

            I was looking at a similar case but was not sure if the ConcurrentModificationException error can kill Confluence. If it does, please let me know and I'm happy to create a support ticket for you to troubleshoot this further.

            Cheers,

            Roy Hartono
            Atlassian Support
            Sydney

            Free code hosting... forever. http://www.atlassian.com/hosted/bitbucket/

            Roy Hartono [Atlassian] added a comment - Hi Jonas, I was looking at a similar case but was not sure if the ConcurrentModificationException error can kill Confluence. If it does, please let me know and I'm happy to create a support ticket for you to troubleshoot this further. Cheers, Roy Hartono Atlassian Support Sydney Free code hosting... forever. http://www.atlassian.com/hosted/bitbucket/

            Hi, just updating, this is still occuring more than a hundred times a day with a typical load of around 30000 pageviews per day. We are now running version 3.0.2 on Tomcat 6 and JDK 1.6 on a new dedicated application server and a separate database backend running PostgreSQL.

            Jonas Sundman added a comment - Hi, just updating, this is still occuring more than a hundred times a day with a typical load of around 30000 pageviews per day. We are now running version 3.0.2 on Tomcat 6 and JDK 1.6 on a new dedicated application server and a separate database backend running PostgreSQL.

            Hi Jonathan,

            I don't believe it is related to garbage collection.

            The problem is that some of the state used to render macros in stored in a singleton, so multiple renderings of the same macro at the same time can lead to this problem.

            Unfortunately the fix is quite difficult and we have not yet been able to schedule it yet.
            It is a high priority bug however.

            Regards,
            Andrew Lynch

            Andrew Lynch (Inactive) added a comment - Hi Jonathan, I don't believe it is related to garbage collection. The problem is that some of the state used to render macros in stored in a singleton, so multiple renderings of the same macro at the same time can lead to this problem. Unfortunately the fix is quite difficult and we have not yet been able to schedule it yet. It is a high priority bug however. Regards, Andrew Lynch

            We've gotten suspicious that this error occurs during garbage collection. Andrew, you said you identified the problem, but had to pull the fix. Can you say what the actual problem is?

            Jonathan Simonoff added a comment - We've gotten suspicious that this error occurs during garbage collection. Andrew, you said you identified the problem, but had to pull the fix. Can you say what the actual problem is?

              Unassigned Unassigned
              a9eea17f69d1 Jonas Sundman
              Affected customers:
              17 This affects my team
              Watchers:
              17 Start watching this issue

                Created:
                Updated:
                Resolved: