From owner-freebsd-java Tue Dec 8 13:58:22 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA16928 for freebsd-java-outgoing; Tue, 8 Dec 1998 13:58:22 -0800 (PST) (envelope-from owner-freebsd-java@FreeBSD.ORG) Received: from internetdevices.com (idi-fk-gw.abhiweb.com [205.138.236.250]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id NAA16905; Tue, 8 Dec 1998 13:58:01 -0800 (PST) (envelope-from iyer@internetdevices.com) Received: from internetdevices.com (localhost [127.0.0.1]) by internetdevices.com (8.8.7/8.8.7) with ESMTP id NAA14263; Tue, 8 Dec 1998 13:52:50 -0800 (PST) Message-ID: <366D9F1D.29759389@internetdevices.com> Date: Tue, 08 Dec 1998 13:50:21 -0800 From: Mahadevan Iyer Organization: Internet Devices X-Mailer: Mozilla 4.05 [en] (Win95; U) MIME-Version: 1.0 To: Nate Williams CC: java-port@FreeBSD.ORG, freebsd-java@FreeBSD.ORG, saurabh@internetdevices.com, namit@internetdevices.com, iyer@internetdevices.com Subject: Possible Bug in JVM Garbage Collection of Threads References: <36381ADB.DCCDAB3D@internetdevices.com> <199811091741.KAA04801@mt.sri.com> <36472A9A.A1661625@internetdevices.com> <199811091759.KAA04986@mt.sri.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hello Nate, here is another one. This one is pretty critical and any help will be deeply appreciated FreeBSD JVM version : 1.1.7 This code causes the Resident memory size of the java process to continously grow You can see this if you run "top" on freeBSD It will eventually given an OutOfMemoryError If you throw in the socket code, it will give a "recursive malloc()" error To trigger this error there has to be a client that continuously tries to connect to the server This problem seems to be an result of the previous problem, however this causes our server to die. I ran this using a SUN JVM on Solaris without any problems -----------------------------------------TSock.java ---------------------------------- import java.net.*; import java.io.*; public class TSock { public static void main(String[] args) throws Exception { /* Required to trigger recursive malloc error after OutOfMemory condition ServerSocket server = new ServerSocket(9090); */ while(true) { Thread t = new Thread(); t.start(); t.stop(); System.gc(); System.runFinalization(); /* Triggers recursive malloc error after OutOfMemory condition Need to have a client that tries to continously connect to it try { Socket s = server.accept(); s.close(); } catch(Exception e) { } */ } } } ---------------------------------------------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message