Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-7026

o.a.c.transport.http.osgi.HttpServiceTrackerCust service leak

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.7
    • Fix Version/s: 3.1.8, 3.2.0
    • Component/s: OSGi
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      During memory leak search I saw some old registrations of org.apache.cxf.transport.servlet.CXFNonSpringServlet. Here's GC root path:

      this     - value: org.eclipse.jetty.server.ServerConnector$ServerConnectorManager #1
       <- _manager     - class: org.eclipse.jetty.server.ServerConnector, value: org.eclipse.jetty.server.ServerConnector$ServerConnectorManager #1
        <- [0]     - class: java.lang.Object[], value: org.eclipse.jetty.server.ServerConnector #1
         <- array     - class: java.util.concurrent.CopyOnWriteArrayList, value: java.lang.Object[] #17136
          <- _connectors     - class: org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper, value: java.util.concurrent.CopyOnWriteArrayList #521
           <- _server     - class: org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler, value: org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper #1
            <- _servletHandler     - class: org.eclipse.jetty.servlet.ServletHolder, value: org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler #1
             <- this$0     - class: org.eclipse.jetty.servlet.ServletHolder$Config, value: org.eclipse.jetty.servlet.ServletHolder #1
              <- config     - class: org.apache.cxf.transport.servlet.CXFNonSpringServlet, value: org.eclipse.jetty.servlet.ServletHolder$Config #1
               <- servlet     - class: org.apache.cxf.transport.http.osgi.ServletExporter, value: org.apache.cxf.transport.servlet.CXFNonSpringServlet #1
                <- m_svcObj     - class: org.apache.felix.framework.ServiceRegistrationImpl, value: org.apache.cxf.transport.http.osgi.ServletExporter #1
                 <- [2]     - class: org.osgi.framework.ServiceRegistration[], value: org.apache.felix.framework.ServiceRegistrationImpl #311
                  <- value     - class: java.util.HashMap$Node, value: org.osgi.framework.ServiceRegistration[] #87
                   <- [179]     - class: java.util.HashMap$Node[], value: java.util.HashMap$Node #47874
                    <- table     - class: java.util.HashMap, value: java.util.HashMap$Node[] #9801
                     <- m     - class: java.util.Collections$SynchronizedMap, value: java.util.HashMap #84
                      <- m_regsMap     - class: org.apache.felix.framework.ServiceRegistry, value: java.util.Collections$SynchronizedMap #7
                       <- m_registry (Java frame)     - class: org.apache.felix.framework.FrameworkStartLevelImpl, value: org.apache.felix.framework.ServiceRegistry #1
      

      which shows that CXF servlet prevents from freeing previous instance of org.eclipse.jetty.server.ServerConnector.

      After some debugging, I've found that org.apache.cxf.transport.http.osgi.HttpServiceTrackerCust#removedService() isn't called - why? because org.apache.cxf.transport.http.osgi.HttpServiceTrackerCust#addingService() returns null...

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ffang Freeman Fang
                Reporter:
                gzres Grzegorz Grzybek
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: