From owner-freebsd-java@FreeBSD.ORG Thu Jul 6 15:18:13 2006 Return-Path: X-Original-To: freebsd-java@freebsd.org Delivered-To: freebsd-java@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 351A716A4DA for ; Thu, 6 Jul 2006 15:18:13 +0000 (UTC) (envelope-from martijn@detrics.com) Received: from smtp16.wxs.nl (smtp16.wxs.nl [195.121.247.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9FE0F43D45 for ; Thu, 6 Jul 2006 15:18:12 +0000 (GMT) (envelope-from martijn@detrics.com) Received: from [10.0.0.150] (ip503d6288.speed.planet.nl [80.61.98.136]) by smtp16.wxs.nl (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTP id <0J1Z007CKMIAOZ@smtp16.wxs.nl> for freebsd-java@freebsd.org; Thu, 06 Jul 2006 17:18:10 +0200 (CEST) Date: Thu, 06 Jul 2006 17:18:10 +0200 From: Martijn Veening In-reply-to: <200607061102.20270.kurt@intricatesoftware.com> To: Kurt Miller Message-id: <1152199090.15297.9.camel@detri015.speed.planet.nl> Organization: Detrics MIME-version: 1.0 X-Mailer: Ximian Evolution 1.4.6 References: <1152082235.30307.19.camel@detri015.speed.planet.nl> <200607060914.23131.kurt@intricatesoftware.com> <1152192444.13981.8.camel@detri015.speed.planet.nl> <200607061102.20270.kurt@intricatesoftware.com> Content-Type: text/plain Content-Transfer-Encoding: 7BIT X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-java@freebsd.org Subject: Re: Apache Tomcat crash on 6.1 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: martijn@detrics.com List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2006 15:18:13 -0000 Hi Kurt, Well, as expected, it just crashed indeed. The catalina log just says: java in malloc(): error: out of memory Furthermore, no hs_err_pidXXXX.log files created by the way. I saw the java-process reach the 1 Gb limit in top, and then dissapear. Glad you diagnose it as memory-leak. I use the lambdaprobe monitor application on tomcat, which uses quite some resources (www.lambdaprobe.org). I now undeployed it, hoping the leak is caused by this monitoring-app instead of our webapp. If problem continues, I check other ports. Thanx sofar, Martijn Veening www.detrics.com On Thu, 2006-07-06 at 17:02, Kurt Miller wrote: > Hi Martijn, > > On Thursday 06 July 2006 9:27 am, Martijn Veening wrote: > > Hi Kurt, thanx, > > see below, for remarks: > > > > On Thu, 2006-07-06 at 15:14, Kurt Miller wrote: > > > > > Hi Martijn, > > > > > > On Wednesday 05 July 2006 5:28 pm, Martijn Veening wrote: > > > > Hi Kurt, thnx for suggestions, > > > > > > > > Indeed it seems that java process memory increases, although the reading > > > > is different from the tomcat manager reading. The size started at 450M > > > > (res 100M) and after 6 hours increased to 600M (res 160M). I can imagine > > > > that if that continues another 10 hours, the 1 Gb limit is reached > > > > causing crash. > > > > Tomcat however read lower memory-usage, but that will be memory within > > > > the JVM-reserved memory, which differs from the process-memory in > > > > FreeBSD (I presume). > > > > > > Right, tomcat reported memory usage doesn't account for > > > memory the jvm uses in addition to the java object heap. > > > > > > Hmmm, looking over the original bug report I don't see > > > -Xmx or -Xms arguments being used. Also, it could take > > > some time for the java process memory utilization to > > > stabilize. Even after it stabilizes there is some > > > fluctuation when full GC's occur. > > > > > > For the sake of minimizing some of these issues, try > > > running tomcat with -Xmx250m -Xms250m so that all of > > > the java heap is allocated upfront and then look for > > > increasing java process memory usage after things > > > stabilize. > > > > >From the beginning it runs with Xms200m and Xmx256m opts (added in > > catalina.sh script). > > It now runs for 16 hours and has added up to SIZE=891m and RES=581m > > (says 'top'). > > It increases slowaly, but continually. > > It does sound like you've found a leak. Now the hard part > is isolating it. It would be helpful to know if you see the > same behavior with the port version of the jdk. This would > reveal if the leak is new or not. > > If you could try to isolate the leak to simple test program > that would be helpful. The last time I hunted down a leak in > the jdk I had a test program to work with. The process is > tedious - track each malloc and match it up with a free. > Attempting to do that on tomcat with a full blown web app > would be impossible. > > Regards, > -Kurt > _______________________________________________ > freebsd-java@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-java > To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.org" >