From owner-freebsd-java@FreeBSD.ORG Wed Apr 20 14:59:18 2005 Return-Path: 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 3ED6716A4CE for ; Wed, 20 Apr 2005 14:59:18 +0000 (GMT) Received: from misty.eyesbeyond.com (glewis.dsl.xmission.com [166.70.56.15]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6F75743D1D for ; Wed, 20 Apr 2005 14:59:17 +0000 (GMT) (envelope-from glewis@eyesbeyond.com) Received: from misty.eyesbeyond.com (localhost.eyesbeyond.com [127.0.0.1]) by misty.eyesbeyond.com (8.13.3/8.13.3) with ESMTP id j3KExF3J078248; Wed, 20 Apr 2005 08:59:16 -0600 (MDT) (envelope-from glewis@eyesbeyond.com) Received: (from glewis@localhost) by misty.eyesbeyond.com (8.13.3/8.13.3/Submit) id j3KExF8Q078247; Wed, 20 Apr 2005 08:59:15 -0600 (MDT) (envelope-from glewis@eyesbeyond.com) X-Authentication-Warning: misty.eyesbeyond.com: glewis set sender to glewis@eyesbeyond.com using -f Date: Wed, 20 Apr 2005 08:59:15 -0600 From: Greg Lewis To: Toby Murray Message-ID: <20050420145915.GC78133@misty.eyesbeyond.com> References: <324cec6d05041712065a3ff926@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <324cec6d05041712065a3ff926@mail.gmail.com> User-Agent: Mutt/1.4.2.1i cc: freebsd-java@freebsd.org Subject: Re: java crashing when load average is high X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Apr 2005 14:59:18 -0000 On Sun, Apr 17, 2005 at 02:06:24PM -0500, Toby Murray wrote: > I am working on getting a new server online. It is a Dell Poweredge > with dual HT Xeons and 1GB of RAM. We are running FreeBSD 5.4-RC1 and > java 1.4.2_08. > > java version "1.4.2_08" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_08-b03) > Java HotSpot(TM) Client VM (build 1.4.2_08-b03, mixed mode) > > I have a java program that reads XML files over an HTTP stream and > inserts data from them into a mysql database. After getting java up > and running everything appeared to be working normally at first and > the program ran fine. But then I tried running it while something > else was compiling and the load average was up around 5 or 6. > Suddenly the behavior of the JVM became extremely erratic. > > Sometimes the whole JVM dumps with a signal 11 and leaves the following in dmsg: > kernel trap 12 with interrupts disabled > Other times the program throws random exceptions. I have seen 5 or 6 > different exceptions being thrown at seemingly random places in the > code while parsing the same data. > > A third behavior is for java to go into what appears to be an infinite > loop somewhere. Usually when my program runs, there is one java > thread and one mysql process that each take up ~70% of one CPU. When > things start looping, 2 java processes start sucking up as much CPU as > they can and mysql drops to nothing. This continues until I pull out > the kill -9. > > So to summarize it all: > java works fine if it is the only thing running > If the box is already under load, java malfunctions in one of 3 ways: > Signal 11, random Exception thrown or it starts looping without > getting anything done. > > Any clues? I see several other threads on the list about signal 11 > problems but I didn't see anything about the problems being related to > load. Let me know if you need more info on something. Sounds like you are running into a race condition or corruption problem. There are several places this could be, the most likely being the Linux emulation layer. You may be able to use the native 1.4 if its compiled on an x86, but I'm not sure how well that works on amd64. If you were particularly brave you could try the native 1.5 which will compile natively on amd64. -- Greg Lewis Email : glewis@eyesbeyond.com Eyes Beyond Web : http://www.eyesbeyond.com Information Technology FreeBSD : glewis@FreeBSD.org