glassfish
  1. glassfish
  2. GLASSFISH-18768

Memory leak with WS + CDI (empty beans.xml)

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.1.1, 3.1.2
    • Fix Version/s: 4.0
    • Component/s: cdi
    • Labels:
      None
    • Environment:

      Description

      A simple JAX-WS service with no implementation or injection + empty beans.xml in WEB-INF create a memory leak
      if you call the WebService in a loop.

      Without the empty beans.xml, no memory leak.

        Activity

        Hide
        kabhal added a comment -

        I used the project attached in GLASSFISH-16030 to reproduce the leak.

        Show
        kabhal added a comment - I used the project attached in GLASSFISH-16030 to reproduce the leak.
        Hide
        frank_w added a comment -

        Workaround that worked for me was to annotate the Class with @Stateless
        Additionally I used /WEB-INF/glassfish-ejb-jar.xml to configure the URL to the webservice and make https call possible

        <?xml version="1.0" encoding="UTF-8"?>
        <!DOCTYPE glassfish-ejb-jar PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 EJB 3.1//EN" "http://glassfish.org/dtds/glassfish-ejb-jar_3_1-1.dtd">
        <glassfish-ejb-jar>
        <enterprise-beans>
        <ejb>
        <ejb-name>EJBName</ejb-name>
        <webservice-endpoint>
        <port-component-name>EJBName</port-component-name>
        <endpoint-address-uri>/<appliction-context>/ServiceName</endpoint-address-uri>
        <transport-guarantee>CONFIDENTIAL</transport-guarantee>
        </webservice-endpoint>
        </ejb>
        </enterprise-beans>
        </glassfish-ejb-jar>

        Show
        frank_w added a comment - Workaround that worked for me was to annotate the Class with @Stateless Additionally I used /WEB-INF/glassfish-ejb-jar.xml to configure the URL to the webservice and make https call possible <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE glassfish-ejb-jar PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 EJB 3.1//EN" "http://glassfish.org/dtds/glassfish-ejb-jar_3_1-1.dtd"> <glassfish-ejb-jar> <enterprise-beans> <ejb> <ejb-name>EJBName</ejb-name> <webservice-endpoint> <port-component-name>EJBName</port-component-name> <endpoint-address-uri>/<appliction-context>/ServiceName</endpoint-address-uri> <transport-guarantee>CONFIDENTIAL</transport-guarantee> </webservice-endpoint> </ejb> </enterprise-beans> </glassfish-ejb-jar>
        Hide
        shreedhar_ganapathy added a comment -

        Is the memory leak root cause identified?

        Any ETA on the fix?

        Show
        shreedhar_ganapathy added a comment - Is the memory leak root cause identified? Any ETA on the fix?
        Hide
        mtaube added a comment -

        Deploying the application from GLASSFISH-16030 to the latest build of glassfish and running the following loop several times:

        #!/bin/bash
        for i in

        {1..10000}

        do
        curl http://localhost:8080/boot-gateway/Boot_v1 > /dev/null
        done

        I do not see any evidence of a memory leak while connected to the process with JProfiler.

        Can you confirm the reproduction steps?

        Show
        mtaube added a comment - Deploying the application from GLASSFISH-16030 to the latest build of glassfish and running the following loop several times: #!/bin/bash for i in {1..10000} do curl http://localhost:8080/boot-gateway/Boot_v1 > /dev/null done I do not see any evidence of a memory leak while connected to the process with JProfiler. Can you confirm the reproduction steps?
        Hide
        mtaube added a comment -

        Also with the following test driver I cannot see any memory leaks in JProfiler:

        import com.example.boot_gateway.boot_v1.*;

        public class Test {

        public static void testBoot() throws Exception

        { BootV1 bootV1 = new BootV1(); ObjectFactory of = new ObjectFactory(); RequestType rt = of.createRequestType(); assert "approved".equals(bootV1.getTnsBootServicePortType().process(rt).getResponseDescription()); }

        public static void main(String args[]) {
        try {
        for (int i = 0; i < 10000; i++)

        { testBoot(); }

        } catch (Exception ex)

        { ex.printStackTrace(); }

        }
        }

        Show
        mtaube added a comment - Also with the following test driver I cannot see any memory leaks in JProfiler: import com.example.boot_gateway.boot_v1.*; public class Test { public static void testBoot() throws Exception { BootV1 bootV1 = new BootV1(); ObjectFactory of = new ObjectFactory(); RequestType rt = of.createRequestType(); assert "approved".equals(bootV1.getTnsBootServicePortType().process(rt).getResponseDescription()); } public static void main(String args[]) { try { for (int i = 0; i < 10000; i++) { testBoot(); } } catch (Exception ex) { ex.printStackTrace(); } } }

          People

          • Assignee:
            mtaube
            Reporter:
            kabhal
          • Votes:
            6 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: