Gregory Shimansky wrote:
> On Monday 09 October 2006 21:01 Pavel Pervov wrote:
>> Geir, all,
>> I did reserched this failure some time ago. The same failure was observed
>> on gc.Finalizers.
>> Here is what I've found.
>>
>> Now what is happening:
>> 1) FinalizerThread is being run
>> 2) java/lang/Object.notify()V is being compiled
>> 3) java/lang/InternalError is being resolved (and loaded) for
>> java/lang/Object
>> 4) GC happens while creating instance of java/lang/Class for
>> java/lang/InternalError
>> 5) vm_hint_finalize happens
>> 6) java/lang/ref/ReferenceQueue.enqueue is being called
>> 7) java/lang/Object.notify()V is being compiled
>> 8) java/lang/InternalError is being resolved (and loaded) for
>> java/lang/Object
>> 9) ClassCircularityError occurs for java/lang/InternalError
>> 10) VM returns to step (3)
>> 11) Assertion happens in SuccessLoadingClass for java/lang/InternalError
>> as LoadingClass instance for this class was removed on step (9)
>>
>> It can be tried to fix it in class loading, but I can imagine only one
>> generic solution for this problem: do not run Java while compiling.
I believe the real root cause is running java code from vm_hint_finalize().
A possible solution would be:
- rewrite vm_hint_finalize() to just run 'notify' operation, without calling any real java
code
- handle reference queue in the finalizer thread instead of enqueuing it directly from vm_hint_finalize()
thread
---------------------------------------------------------------------
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
|