Axis2
  1. Axis2
  2. AXIS2-5310

Axis2.0 : 1.6.2 : Memory Leak Issue

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Not a Problem
    • Affects Version/s: 1.6.2
    • Fix Version/s: None
    • Component/s: databinding, transports
    • Environment:
      Axis2.0 version used : 1.6.2
      NSJSP7.0 and ITP webserver 7.2 for HP Nonstop Tandem

      Description

      I'm facing below error message after deploying a webservice using Axis2.0 in webserver.

      Mon, Apr 30, 16:08:27;$Z0QF;INFO;StandardService#stopInternal;Stopping service NSJSP
      Mon, Apr 30, 16:08:29;$Z0QF;SEVERE;WebappClassLoader#clearReferencesThreads;The web application [/PSAPI-V1-0/axis2] is still processing a request that has yet to finish. This is very likely to create a memory leak. You can control the time allowed for requests to finish by using the unloadDelay attribute of the standard Context implementation.
      Mon, Apr 30, 16:08:29;$Z0QF;SEVERE;WebappClassLoader#checkThreadLocalMapForLeaks;The web application [/PSAPI-V1-0/axis2] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@2465e5]) and a value of type [org.apache.axis2.context.MessageContext] (value [[MessageContext: logID=3fecb85757bee1e6fd9cdc8eb6a0e146d5c1eaa7dd28d0e7]]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
      Mon, Apr 30, 16:08:29;$Z0QF;SEVERE;WebappClassLoader#checkThreadLocalMapForLeaks;The web application [/PSAPI-V1-0/axis2] created a ThreadLocal with key of type [org.apache.axiom.util.UIDGenerator$1] (value [org.apache.axiom.util.UIDGenerator$1@b103dd]) and a value of type [long[]] (value [[J@174d4c9]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
      Mon, Apr 30, 16:08:29;$Z0QF;INFO;AbstractProtocolHandler#stop;Stopping ProtocolHandler ["http-bio-0"]

      As per error logs i understand that "Axis2.0 - framework" is not able to delete/failed to cleanup a thread. Please provide me with resolution if any.

        Activity

        Hide
        Andreas Veithen added a comment -

        Do you have any evidence that the class loader is indeed not garbage collected and that it's Axis2's fault (and not your service's)? Note that the messages generated by Tomcat are not evidence because they are not reliable as explained above.

        Show
        Andreas Veithen added a comment - Do you have any evidence that the class loader is indeed not garbage collected and that it's Axis2's fault (and not your service's)? Note that the messages generated by Tomcat are not evidence because they are not reliable as explained above.
        Hide
        Santhosh added a comment -

        Hi Team,

        Below message is displayed while firing requests to the service after deployment but not during the deployment. I have deployed some other services but didn't faced any issue with them, only with one service I'm facing this exception.
        Code changes are almost similar compared to other services hosted.

        Thanks & Regards
        Santhosh Kumar Arvapalli

        Show
        Santhosh added a comment - Hi Team, Below message is displayed while firing requests to the service after deployment but not during the deployment. I have deployed some other services but didn't faced any issue with them, only with one service I'm facing this exception. Code changes are almost similar compared to other services hosted. Thanks & Regards Santhosh Kumar Arvapalli
        Andreas Veithen made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Not A Problem [ 8 ]
        Hide
        Andreas Veithen added a comment -

        The conclusion given in the description is not correct. Please note that it says "probable memory leak". Tomcat's leak detector is far from perfect. In this case:

        1. org.apache.axiom.util.UIDGenerator$1 doesn't cause a class loader leak because the value of that thread local is of type long[]. See http://code.google.com/p/arit/wiki/ThreadLocal for more information. Note that previous Axiom versions indeed caused a class loader leak, but this has been fixed; see AXIOM-354.

        2. The thread local storing the org.apache.axis2.context.MessageContext is cleared when the request has been processed. This doesn't occur because as shown by the previous error message, "The web application [...] is still processing a request that has yet to finish". This is generally caused by bugs in application code, not in Axis2. If you believe that there is an issue in Axis2 blocking the request, then you need to provide a thread dump that shows this.

        Show
        Andreas Veithen added a comment - The conclusion given in the description is not correct. Please note that it says "probable memory leak". Tomcat's leak detector is far from perfect. In this case: 1. org.apache.axiom.util.UIDGenerator$1 doesn't cause a class loader leak because the value of that thread local is of type long[]. See http://code.google.com/p/arit/wiki/ThreadLocal for more information. Note that previous Axiom versions indeed caused a class loader leak, but this has been fixed; see AXIOM-354 . 2. The thread local storing the org.apache.axis2.context.MessageContext is cleared when the request has been processed. This doesn't occur because as shown by the previous error message, "The web application [...] is still processing a request that has yet to finish". This is generally caused by bugs in application code, not in Axis2. If you believe that there is an issue in Axis2 blocking the request, then you need to provide a thread dump that shows this.
        Andreas Veithen made changes -
        Field Original Value New Value
        Priority Blocker [ 1 ] Major [ 3 ]
        Hide
        Andreas Veithen added a comment -

        Class loader leaks are not blockers. Please refer to the definition of the priority levels.

        Show
        Andreas Veithen added a comment - Class loader leaks are not blockers. Please refer to the definition of the priority levels.
        Santhosh created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Santhosh
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 972h
              972h
              Remaining:
              Remaining Estimate - 972h
              972h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development