I am using jdk 1.4.2.07 and run into the following
error with the VM crashing with a defunct
process:"Fatal: Stack size too small. Use 'java -Xss'
to increase default stack size." on Linux. Does this
imply a JVM bug given that this happens only when the
VM attempts to launce a large number of threads
(Tomcat).
No this is not the bug but the limitation , the default is 8k ....
It looks like in the absence of the Xss VM
parameter, the JVM picks up the stack size based on
the Linux process limits. In my case it was set to
2048k. Why would the VM crash when starting more
than a threshold number of threads? My assumption is
that the VM allocates the stack size to every thread.
As the number of threads launched by the VM were to
increase, there would be a state in which the VM
would not be able to acquire more memory from the
system. I have tried the latest version of the JDK
1.4.2 but it did not help either.
Actually there will be the limit of threads that the process can span , if you cross tha limit the OS will throw the error which eventaully will be thrown by the JVM ....
Read this
http://forum.java.sun.com/thread.jspa?forumID=37&threadID=202978
Thread limit for a process can be changed , you got to change the configuration files , I dont remember the precise files and enteries ....