Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 94208 invoked from network); 31 May 2004 14:16:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 31 May 2004 14:16:40 -0000 Received: (qmail 45191 invoked by uid 500); 31 May 2004 14:16:37 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 45116 invoked by uid 500); 31 May 2004 14:16:36 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 45101 invoked by uid 99); 31 May 2004 14:16:36 -0000 Received: from [216.71.84.236] (HELO kiku.7777.net) (216.71.84.236) by apache.org (qpsmtpd/0.27.1) with ESMTP; Mon, 31 May 2004 07:16:36 -0700 Received: from ias ([210.216.114.99]) by kiku.7777.net (8.11.6/8.11.6) with ESMTP id i4VEFav10198; Mon, 31 May 2004 23:15:37 +0900 Message-Id: <200405311415.i4VEFav10198@kiku.7777.net> From: "Ias" To: , Subject: RE: Patch: Memory leak in DeserializationContextImpl.parce() fixed Date: Mon, 31 May 2004 23:15:34 +0900 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Thread-Index: AcRHFLQe1UKCqcdNSeye2TAOBZ71ggAAlAcg In-Reply-To: <19e0530f04053106445aa7348d@mail.gmail.com> X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N > Ias, > > can we please add a switch to switch it on? as it may work in > some environments? In my opinion, any SAX-compliant parser such as Xerces and Crimson should work as the description said, so setting NullLexicalHandler all the time seems good in terms of both scalable performance and proper usage. Regards, Ias > > thanks, > dims > > On Mon, 31 May 2004 16:20:54 +0900, Ias wrote: > > > > > Hello Axis Developers, > > > > > > We use Axis 1.1 in one of our products and as a result of > a number > > > of performance tests we identified a memory leak in > > > org.apache.axis.encoding.DeserializationContextImpl.parse() > > > method. The way the code was attempting to remove the > reference to > > > "this" from the instance of SAXParser is just plain > wrong. Looking > > > into Xerces code for the > > > SAXParcerImpl.setProperty() method null is not an > acceptable value. > > > > FYI, according to > > > http://www.saxproject.org/apidoc/org/xml/sax/package-summary.html#pack > > age_de > > scription > > > > lexical-handler > > > > Used to see some syntax events that are essential in some > applications: > > comments, CDATA delimiters, selected general entity inclusions, and > > the start and end of the DTD (and declaration of document element > > name). The Object must implement org.xml.sax.ext.LexicalHandler. > > > > Therefore, null value is unacceptable for the property in > the sense above. > > > > Thanks, > > > > Ias > > > > > > > > > I added a NullLexicalHandler inner class that can be used > to remove > > > the reference and allow memory to be released. > > > Although it is not significant under light load conditions the > > > complexity of the messages and the load can cause the pool of > > > SAXParser instances maintained by XMLUtils to grow significantly. > > > The amount of memory that is held by each instance of > > > DeserializationContextImpl can be significant as the message size > > > grows. Examining the system with Jprobe helped us identify the > > > source of the problem and make this change which corrected the > > > problem for our application using Axis 1.1 Final. > > > > > > The attached unified diff is against the latest CVS for Axis 1.2. > > > The exact same code would work in 1.1 as well, the diff > is trivial > > > to apply. > > > > > > I do not have CVS accees but I used the ViewCVS facility > to download > > > version 1.81 of this file and make the changes. > > > Would anyone of the commiters care to verify this fix and apply? > > > > > > Regards, > > > Alex Volanis > > > > > > > > > > >