Date: Tue, 08 Dec 1998 13:50:21 -0800 From: Mahadevan Iyer <iyer@internetdevices.com> To: Nate Williams <nate@mt.sri.com> 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 Message-ID: <366D9F1D.29759389@internetdevices.com> References: <36381ADB.DCCDAB3D@internetdevices.com> <199811091741.KAA04801@mt.sri.com> <36472A9A.A1661625@internetdevices.com> <199811091759.KAA04986@mt.sri.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?366D9F1D.29759389>