[Advanced-java] Wierd Behavior at time of creating a thread -
Kashikar, Makarand
makarand.kashikar at etrade.com
Sat Mar 22 00:55:56 2003
Hi all,
I need to know if anyone of you has experienced this kind of behavior
Solaris Info :
Release: 5.7
Kernel architecture: sun4u
Application architecture: sparc
Hardware provider: Sun_Microsystems
Domain:
Kernel version: SunOS 5.7 Generic 106541-19
JDK info :
java version "1.3.1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-b24)
Java HotSpot(TM) Client VM (build 1.3.1-b24, mixed mode)
When my java server starts - in the main thread i do this -
System.out.println("Creating the my Thread");
lt = new MyThread (); // and the MyThread extends from java.lang.Thread
// MyThread in simplest form looks like this -
public class MyThread extends Thread
{
public MyThread()
{
super("My thread");
System.out.println("Super returned");
}
}
Like once in 20 times (this is also random)
sometimes the program just hangs at the statement "lt = new MyThread ();"
so what I see in log file is "Creating the my Thread" and then I never see
"Super returned".
Basically looks like the thread constructor doesnt return -
Has anyone experienced this kind of situation -
There is a bug for this which is close to this situation -
http://developer.java.sun.com/developer/bugParade/bugs/4545731.html
I am going to try this -XX:+UseBoundThreads option -
but any other help would be greatly appreciated -
Makarand Kashikar