harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Weldon Washburn" <weldon...@gmail.com>
Subject Re: Stack Overflow Error support issues
Date Mon, 24 Jul 2006 14:04:08 GMT
On 7/24/06, Mikhail Fursov <mike.fursov@gmail.com> wrote:
> No, I think that VM can do this check but use lower border: e.g. 1/100 of
> initial.
> JIT must do this check more accurate: use knowledge of algorithms it uses.
>
> The requirement to avoid SOE during a compilation can affect any algorithm
> in JIT that uses recursion. Jitrino.OPT has a lot of such algorithms: node,
> insts, opnd based . So I'm not sure that JIT can construct a heuristic or a
> profile to refuse to compile a method in the beginning of the compilation.
> The another option is to check available stack size before any recursion
> based algorithm and limit the algorithm up to N steps in recursion (N is
> recomputed in runtime) . If N steps is not enough algorithm will fail and
> JIT will not not perform the optimization or compilation at all.
> Quite a lot of changes in JIT though. Any other ideas?

I would be hesitant to make a bunch of changes to the jit.  1) it
might cause stability problems.  2) It still does not fix the root
problem.  In specific, it is quite easy in C code to cause gobs of the
stack to be grabbed.  You can even grab so much stack that you leap
over the guard page then mysteriously crash. 3) what is wrong with
setting the guard at 256KB or larger for now?  Since we are not
running lots of threads at this point, we can afford to make each java
stack even 4MB big with 1MB guard pages.  This will allow us to
quickly rule out stack overflow as a cause of JVM crash.  Perhaps the
max stack and guard page size can  be adjustable at command level.

Also, I looked at the source code contained in harmony-945.  I did not
see a regession test or unit test.  Would it be possible to add this?

>
>
>
>
> On 7/24/06, Pavel Afremov <pavel.n.afremov@gmail.com> wrote:
> >
> > Hi
> >
> > On 7/22/06, Mikhail Fursov <mike.fursov@gmail.com> wrote:
> >
> > > I think this must be a JIT heuristics because even a small method can
> > lead
> > > to inlining of whole classlib API :)
> >
> >
> > Are You think this check should be removed from VM and puted into JIT
> > only?
> >
> > BR
> > Pavel Afremov.
> >
> >
>
>
> --
> Mikhail Fursov
>
>


-- 
Weldon Washburn
Intel Middleware Products Division

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Mime
View raw message