harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oliver Deakin <oliver.dea...@googlemail.com>
Subject Re: [jira] Closed: (HARMONY-927) DRLVM's DestroyVM needs to be more robust
Date Thu, 27 Jul 2006 14:55:04 GMT
Sorry for the delay - once again swamped with backlog...
Comments inline:

Pavel Pervov wrote:
> On 7/20/06, Oliver Deakin <oliver.deakin@googlemail.com> wrote:
>>
>> I agree Pavel - it should be fixed in the launcher. But, as I said in
>> [1], we should
>> give some consideration to the fact that the RI and IBM vms exit
>> gracefully
>> under the same circumstances, and that perhaps we should also try to
>> fix this in the drlvm to match their behaviour.
>
> Not sure how do you know about RI... :)

The JNI invocation API is standard across jvms, so it requires no internal
knowledge for me to write a generic launcher app that causes an exception
to be thrown and then calls DestroyJavaVM.

> This is a sort of compatibility with user code though rather than 
> following
> some spec.

I don't see it as compatability, but more user friendliness. If this small
change makes the VM appear more robust to the user, then all the better!

>
> I started to think of ways simply calling ExceptionClear wouldnt result
>> in a clean exit from drlvm. An OutOfMemoryError followed by 
>> DestroyJavaVM
>> would probably still result in a failure in VMStart, so just calling
>> ExceptionClear might not be enough to guarantee clean exit
>
> It is then the problem of VMStart to be able to work in strict memory (or
> even out-of-memory) conditions. :) Let's not mix things.

ok, perhaps this is a different issue - I was really just commenting 
that the fix
submitted with this JIRA will not entirely get rid of shutdown failures
triggered by launching code in VMStart after an exception.

>
>
>> Thinking about this makes me wonder how drlvm will exit cleanly when
>> there is an
>> OutOfMemoryError when running it from the drlvm launcher. If the heap
>> is full, surely trying to run shutdown code in VMStart is dangerous
>> anyway?
>
> VMStart.shutdown() will most probably throw OutOfMemoryError itself. 
> But I'm
> not sure how it may be dangerous.

I do not know a great deal about what happens during VMStart.shutdown(),
but the following question came into my mind while thinking about this
issue:
If VMStart.shutdown() throws an OOM itself, then doesn't that imply that
some of the shutdown sequence will not be completed, meaning that whatever
should have been cleaned up or freed during the rest of the shutdown isn't
getting done?

Perhaps I'm giving to much importance to the VMStart.shutdown() method and
it doesn't matter if it is exited prematurely - but I thought it was 
worthwhile asking
this question.

Regards,
Oliver

>
> WBR,
>    Pavel Pervov.
> Intel Middleware Products Division.
>

-- 
Oliver Deakin
IBM United Kingdom Limited


---------------------------------------------------------------------
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