Struts 2
  1. Struts 2
  2. WW-3971

Struts 2.3.8 threads BLOCKED in com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.8
    • Fix Version/s: 2.3.12
    • Component/s: XML Configuration
    • Labels:
      None
    • Environment:

      apache-tomcat-6.0.32, jdk1.6.0_27, devMode set to false.

    • Flags:
      Important

      Description

      While load testing a web application on Tomcat 6 using Struts 2.3.8 version. devMode is set to false.
      Found lot of BLOCKED threads in this method:

      com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration()
      This is causing high CPU usage for the application. also found that com.opensymphony.xwork2.config.ConfigurationManager.conditionalRelad is taking time which causes getconfiguration (synchronized) to queue up for processing.

      This happens when concurrent users are above 100.

      1. Test Plan.jmx
        162 kB
        Michael Sebastian
      2. Thread_Dump_During_BLOCKED_Threads.tdump
        718 kB
        Michael Sebastian
      3. threaddump-1358860578050.tdump
        746 kB
        Michael Sebastian

        Issue Links

          Activity

          Hide
          Lukasz Lenart added a comment -

          Thanks for reporting!

          Show
          Lukasz Lenart added a comment - Thanks for reporting!
          Hide
          Lukasz Lenart added a comment -

          Thanks Michael Sebastian! The mentioned blocked threads should be gone with properly configured FreeMarker caching.

          Show
          Lukasz Lenart added a comment - Thanks Michael Sebastian ! The mentioned blocked threads should be gone with properly configured FreeMarker caching.
          Hide
          Michael Sebastian added a comment -

          dump while testing with latest snapshot.

          Show
          Michael Sebastian added a comment - dump while testing with latest snapshot.
          Hide
          Michael Sebastian added a comment -

          Tested with same jmeter script Thread blocks in ConfigurationManagers got removed.
          There are few other BLOCKS in freemarker(not related to this issue), Thread dump attached for reference.

          Show
          Michael Sebastian added a comment - Tested with same jmeter script Thread blocks in ConfigurationManagers got removed. There are few other BLOCKS in freemarker(not related to this issue), Thread dump attached for reference.
          Hide
          Hudson added a comment -

          Integrated in Struts2-JDK6 #625 (See https://builds.apache.org/job/Struts2-JDK6/625/)
          WW-3971 adds ContainerHolder to reduce numbers of calls to getConfiguration() and optimize RuntimeConfiguration class to more thread friendly (Revision 1436878)

          Result = SUCCESS
          lukaszlenart :
          Files :

          • /struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ContainerHolder.java
          • /struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java
          • /struts/struts2/trunk/core/src/test/java/org/apache/struts2/dispatcher/DispatcherTest.java
          • /struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/ui/FormTagTest.java
          • /struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/config/impl/DefaultConfiguration.java
          Show
          Hudson added a comment - Integrated in Struts2-JDK6 #625 (See https://builds.apache.org/job/Struts2-JDK6/625/ ) WW-3971 adds ContainerHolder to reduce numbers of calls to getConfiguration() and optimize RuntimeConfiguration class to more thread friendly (Revision 1436878) Result = SUCCESS lukaszlenart : Files : /struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ContainerHolder.java /struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java /struts/struts2/trunk/core/src/test/java/org/apache/struts2/dispatcher/DispatcherTest.java /struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/ui/FormTagTest.java /struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/config/impl/DefaultConfiguration.java
          Hide
          Lukasz Lenart added a comment -

          I've added a bit more love to code to reduce number of blocked threads, please check it out!

          Show
          Lukasz Lenart added a comment - I've added a bit more love to code to reduce number of blocked threads, please check it out!
          Hide
          Lukasz Lenart added a comment -

          Could you check with the latest snapshot build? I've committed some changes that should improve performance.

          Show
          Lukasz Lenart added a comment - Could you check with the latest snapshot build? I've committed some changes that should improve performance.
          Hide
          Michael Sebastian added a comment -

          Jmeter test plan used to load test struts-mailreader application. which resulted in reported issue.

          Show
          Michael Sebastian added a comment - Jmeter test plan used to load test struts-mailreader application. which resulted in reported issue.
          Hide
          Michael Sebastian added a comment -

          Thread dump taken using VisualVM during blocked threads.

          Show
          Michael Sebastian added a comment - Thread dump taken using VisualVM during blocked threads.

            People

            • Assignee:
              Lukasz Lenart
              Reporter:
              Michael Sebastian
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development