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

          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Resolved Resolved
          11h 38m 1 Lukasz Lenart 22/Jan/13 15:00
          Resolved Resolved Closed Closed
          60d 18h 39m 1 Lukasz Lenart 24/Mar/13 09:39
          Wilson Rao made changes -
          Link This issue is cloned by WW-4491 [ WW-4491 ]
          Lukasz Lenart made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Lukasz Lenart made changes -
          Fix Version/s 2.3.12 [ 12324067 ]
          Fix Version/s 2.3.11 [ 12323903 ]
          Lukasz Lenart made changes -
          Fix Version/s 2.3.11 [ 12323903 ]
          Fix Version/s 2.3.10 [ 12323841 ]
          Lukasz Lenart made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Assignee Lukasz Lenart [ lukaszlenart ]
          Resolution Fixed [ 1 ]
          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.
          Michael Sebastian made changes -
          Attachment threaddump-1358860578050.tdump [ 12565951 ]
          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.
          Lukasz Lenart made changes -
          Fix Version/s 2.3.9 [ 12323841 ]
          Michael Sebastian made changes -
          Attachment Test Plan.jmx [ 12565902 ]
          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.
          Michael Sebastian made changes -
          Field Original Value New Value
          Attachment Thread_Dump_During_BLOCKED_Threads.tdump [ 12565901 ]
          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.
          Michael Sebastian created issue -

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development