Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1155490 - [GSS] (6.4.0) Memory leak in JBoss WS CXF Client's HandlerChainSortInterceptor
[GSS] (6.4.0) Memory leak in JBoss WS CXF Client's HandlerChainSortInterceptor
Status: VERIFIED
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Web Services (Show other bugs)
6.3.0
Unspecified Unspecified
high Severity high
: DR10
: EAP 6.4.0
Assigned To: Alessio Soldano
Rostislav Svoboda
:
Depends On:
Blocks: 1153972 1158330
  Show dependency treegraph
 
Reported: 2014-10-22 04:52 EDT by Tadayoshi Sato
Modified: 2018-03-06 15:57 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
If the JAX-WS client was implemented with one JAX-WS handler, on invoking the service port method indefinitely, it resulted in a memory leak. This issue has been fixed in this release.
Story Points: ---
Clone Of:
: 1158330 (view as bug list)
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker JBWS-3847 Major Closed Memory leak in JBoss WS CXF Client's HandlerChainSortInterceptor 2018-08-21 09:20 EDT

  None (edit)
Description Tadayoshi Sato 2014-10-22 04:52:29 EDT
Description of problem:
Platform BZ for https://issues.jboss.org/browse/JBWS-3847

HandlerChainSortInterceptor.handleMessage(Message) sorts and sets JAX-WS handlers every time it handles a SOAP message:

   public void handleMessage(Message message) throws Fault
   {
      if (binding != null) {
         @SuppressWarnings("rawtypes")
         List<Handler> list = binding.getHandlerChain();
         if (list != null && !list.isEmpty()) {
            Collections.sort(list, comparator);
            binding.setHandlerChain(list);
         }
      }
   }

However, inside the org.apache.cxf.jaxws.binding.AbstractBindingImpl and org.apache.cxf.jaxws.support.JaxWsEndpointImpl implementations the handler chain is not reset every time but piled up with interceptors, which leads to subtle but indefinite memory leak in JBoss WS CXF client.

Furthermore, org.apache.cxf.jaxws.support.JaxWsEndpointImpl holds the interceptors as a kind of java.util.concurrent.CopyOnWriteArrayList. So modifying the growing list of interceptors per each message should cause a growing performance drawback, which is also not a good implementation.

How reproducible:
100%

Steps to Reproduce:
1. Implement a JAX-WS client with one JAX-WS handler
2. Run the client invoking the service port method indefinitely


Actual results:
You'll see memory leak (= increase of memory usage).


Expected results:
Memory leak should not happen.
Comment 1 JBoss JIRA Server 2014-10-30 06:07:55 EDT
Alessio Soldano <asoldano@redhat.com> updated the status of jira JBWS-3847 to Resolved
Comment 2 Kabir Khan 2014-11-10 13:33:20 EST
See component upgrade https://bugzilla.redhat.com/show_bug.cgi?id=1153972#c2 for explanation of why the upgrade was reverted and this BZ is set back to ASSIGNED
Comment 3 Jan Blizňák 2014-11-20 12:04:45 EST
Verified on 6.4.0.DR10
Comment 4 JBoss JIRA Server 2015-04-25 16:26:40 EDT
Alessio Soldano <asoldano@redhat.com> updated the status of jira JBWS-3847 to Closed

Note You need to log in before you can comment on or make changes to this bug.