axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject [jira] Commented: (AXIS-1270) huge memory leak in axis
Date Sat, 27 Mar 2004 11:42:58 GMT
The following comment has been added to this issue:

     Author: Davanum Srinivas
    Created: Sat, 27 Mar 2004 3:42 AM
       Body:
Fredo,

the IP address is non-responsive. So i'll need the WSDL (and example SOAP request/response)
to be able to recreate the problem. (you can send it to me privately if you want to - dims@yahoo.com)

thanks,
dims
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/secure/ViewIssue.jspa?key=AXIS-1270&page=comments#action_27839

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/secure/ViewIssue.jspa?key=AXIS-1270

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: AXIS-1270
    Summary: huge memory leak in axis
       Type: Bug

     Status: Unassigned
   Priority: Critical

    Project: Axis
   Versions:
             current (nightly)

   Assignee: 
   Reporter: Fredo Corleone

    Created: Fri, 26 Mar 2004 1:51 PM
    Updated: Sat, 27 Mar 2004 3:42 AM
Environment: Solaris 8, java 1.4.1, 1.4.2


Description:
I'm running a simple java program to request stuff from a server and practically request produces
a signifcant (~32K) memory leak on Solaris. Both top and ps show that the size of the process
is monotonically increasing. OptimizeIt indicate that Strings and char[]s are bieng leaked,
but it can't provide info about where they were allocated or reference graphs.
The requests and responses are very small, less than 500 bytes apiece. 
We have code generated from wsdl using wsdl2java, are using commons-httpclient and https.
What follows is a cut&paste if the source code since I don't see a way to attach files
on this page. I can provide my wsdl and further info if necessary.
----------my.java-------------------
package com.foo.my;

import java.util.*;
import java.io.*;
import java.net.*;

import mil.army.us.peoc3t.PASS.*;
import mil.army.us.peoc3t.PASS.ports.*;
import mil.army.us.peoc3t.PASS.wsdl.*;

import org.apache.axis.*;
import org.apache.axis.client.Stub;

public class my
{
    public int topicrefreshtime=30000;
    my()
    {
    }
    public static void main(String[] args)
    {
        my m = new my();
        if(args[0] != null)
            m.topicrefreshtime = Integer.parseInt(args[0])*1000;
        m.go();
    }
    private void go()
    {
        try
        {
            System.setProperty("javax.net.ssl.trustStore",
                //"c:\\h\\pcisdk\\data\\truststore");
                "/h/PCI/data/truststore");
        }
        catch (Exception ex)
        {
            System.out.println("Exception setting javax.net.ssl.trustStore=");
                ex.printStackTrace();
        }
        try
        {
            System.setProperty("javax.net.ssl.trustStorePassword", "mitre1");
        }
        catch (Exception ex)
        {
            System.out.println(
                "Exception setting javax.net.ssl.trustStorePassword");
                    ex.printStackTrace();
        }
        AxisProperties.setProperty(
            EngineConfigurationFactory.SYSTEM_PROPERTY_NAME,
            "com.foo.my.PASSEngineConfigurationFactory");

        PASSPortType m_passService = null;
        try
        {
            m_passService = new PASServiceLocator().getPASService(
                new URL("https://134.80.99.231:7778/PASS"));
            Stub stub = (Stub) m_passService;
            stub._setProperty("javax.xml.rpc.security.auth.username",
                "ajd1");
            stub._setProperty("javax.xml.rpc.security.auth.password",
                "pass1");
        }
        catch (Exception e)
        {
            System.out.println("bind failed: " + e.toString());
        }

        _sync syncReq = new _sync();
        syncReq.setCompression(false);
        syncReq.setRequester_id("ajd1");
        syncReq.setTopic("topics");
        while (true)
        {
            try
        {
            System.setProperty("javax.net.ssl.trustStorePassword", "mitre1");
        }
        catch (Exception ex)
        {
            System.out.println(
                "Exception setting javax.net.ssl.trustStorePassword");
                    ex.printStackTrace();
        }
        AxisProperties.setProperty(
            EngineConfigurationFactory.SYSTEM_PROPERTY_NAME,
            "com.foo.my.PASSEngineConfigurationFactory");

        PASSPortType m_passService = null;
        try
        {
            m_passService = new PASServiceLocator().getPASService(
                new URL("https://134.80.99.231:7778/PASS"));
            Stub stub = (Stub) m_passService;
            stub._setProperty("javax.xml.rpc.security.auth.username",
                "ajd1");
            stub._setProperty("javax.xml.rpc.security.auth.password",
                "pass1");
        }
        catch (Exception e)
        {
            System.out.println("bind failed: " + e.toString());
        }

        _sync syncReq = new _sync();
        syncReq.setCompression(false);
        syncReq.setRequester_id("ajd1");
        syncReq.setTopic("topics");
        while (true)
        {
            try
            {
                // Request stuff from the server
                _sync_response sr = m_passService.sync(syncReq);
                System.out.println("Ntopics: " + sr.getCreate_topic().length);
                sr = null;
            }
            catch(Pass_fault e)
            {
                System.out.println("sync for topics fault: " + faultString(e));
                System.out.println(e.getStatus());
            }
            catch(Exception e)
            {
                System.out.println("sync for topics failed: " + e.toString());
                e.printStackTrace();
            }

            try
            {
                System.out.println("sleeping:"+topicrefreshtime);
                Thread.currentThread().sleep(topicrefreshtime);
            }
            catch(InterruptedException e)
            {
            }
        }
    }
    private final static String faultString(Pass_fault fault)
    {
        return("\ndetails-> " +  fault.getError_details() + "\n" +
            statusString(fault.getStatus()));
    }

    private final static String statusString(Status status)
    {
        return("status code-> " + status.getStatus_code() + " status phrase-> "
            + status.getStatus_phrase());
    }
}


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


Mime
View raw message