> What does this error denote ? Have any one faced this .
Hi,
Thanks for all your replies.
I also know the fact that Heap Size and Stack Size are different. But
the problem here is , the same application works fine in Windows and
another Linux box irrespective of the Heap Size. If this a recursion
problem or has crossed the limit of allowed stack size , than should
not this occur in all the machines ?? Am i sounding absurd .
Is there any thing like maximum stack size allowed for an application
in Linux. If so , how we shall change it ?? Will Stack size be
affected by any other factors ??
Regards
JK
Roedy Green - 17 Feb 2006 07:44 GMT
On 16 Feb 2006 21:49:50 -0800, "karthikeyan.jambulingam@gmail.com"
<karthikeyan.jambulingam@gmail.com> wrote, quoted or indirectly quoted
someone who said :
> If this a recursion
>problem or has crossed the limit of allowed stack size , than should
>not this occur in all the machines ??
Different JVMs could implement the stack differently. Some may
allocate a fixed block. Some may allocate several chunks. Some may be
have like arraylists growing as needed but maintaining a contiguous
chunk.
there are all kinds of possible internal differences that would make a
program behave differently in the same amount of physical or virtual
RAM.
For a start, RISC code to do the exact same thing tends to be more
bulky than CISC code.
It is like trying to grab a balloon full of water. JVMs are permitted
to adapt and squirm.
One implementation may fill its ram with versioned highly optimised
code, another disk cache, another ...

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
tom fredriksen - 17 Feb 2006 11:41 GMT
> Hi,
>
[quoted text clipped - 5 lines]
> problem or has crossed the limit of allowed stack size , than should
> not this occur in all the machines ?? Am i sounding absurd .
This is all normal. F.ex. different linux distributions have different
settings for system resources, e.g files open, max shared memory, max
threads/processes, temporary space etc. Red Hat should be tuned for
enterprise use, so the fact that you experience this on red hat is a bit
surprising. But in any case you need to try and figure out what limit on
the system is hitting the roof, and then reconfigure that limit.
So when using a heap size of 300MB your are within the systems limits,
but when setting it to 600MB the limit is reached. Posible solution
could be the size of swap space or the /tmp partition. Try asking a
linux group for further hints and tools.
/tom
Nigel Wade - 17 Feb 2006 12:24 GMT
> Hi,
>
[quoted text clipped - 5 lines]
> problem or has crossed the limit of allowed stack size , than should
> not this occur in all the machines ?? Am i sounding absurd .
Maybe yes, and maybe no. You may be flying very close to the wind on the other
Linux box, and just by chance (or some other local factor) you remain just
below the stack size limit.
> Is there any thing like maximum stack size allowed for an application
> in Linux. If so , how we shall change it ?? Will Stack size be
> affected by any other factors ??
On Linux the command 'ulimit -s' will tell you your per-process stack size
limit. But I believe this is different from the Java stack limit as Java
handles its own stack internally rather than on the process stack (is this
right?). Of course it's possible that a process stack overflow is caught by
Java and reported as above.
Have a look on both Linux systems to see what the stack size limit is. If there
is a difference see if you can get the limit increased on the box where it
fails.

Signature
Nigel Wade, System Administrator, Space Plasma Physics Group,
University of Leicester, Leicester, LE1 7RH, UK
E-mail : nmw@ion.le.ac.uk
Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555
Green - 17 Feb 2006 15:05 GMT
You may be running into a problem with the default stack size for
threads. With the 1.2 system, the default is 128k, but for HotSpot on
Sparc it is 512K and HotSpot on Solaris Intel its 256k (with Linux
Intel and Windows it is whatever the default stack size is when
creating a thread in the OS).
Reduce your stack size by running with the -Xss option.
For example: java -server -Xss64k
64k is the least amount of stack space allowed per thread.