harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geir Magnusson Jr." <g...@pobox.com>
Subject Re: [DRLVM] Thread Manager jvmti related issues fixes (was: Re: [jira] Commented: (HARMONY-1421))
Date Wed, 20 Sep 2006 23:13:15 GMT
patch applied, JIRA closed

geir

On Sep 20, 2006, at 1:17 PM, Ivan Volosyuk wrote:

> Artem, your fix works for me.
> Digging in the implementation I have got your idea. I like the fix :)
> --
> Ivan
>
> On 9/20/06, Ivan Volosyuk <ivan.volosyuk@gmail.com> wrote:
>> I have traced down problem to implementation of thin locks.
>> Here is what I get, look at the stack:
>>   hythread_suspend_other()
>>   unreserve_lock()
>>   hythread_thin_monitor_try_enter()
>>   <helper>
>>
>> All this code is executed suspend disabled mode and is not a safe  
>> point.
>> Suppose two threads want to unreserve lock of each other. We can have
>> a deadlock.
>> I have just made a function:
>>     hythread_try_suspend_other()
>> which can be used safely from suspend disabled section and will
>> prevent deadlock.
>> ** Now all tests pass for me.**
>>
>> I'm going now to check your patch if it also fixes the  
>> synchronization issue.
>> --
>> Ivan
>>
>> On 9/20/06, Artem Aliev <artem.aliev@gmail.com> wrote:
>> > Ivan,
>> >
>> > We do a lot for this cyclic suspend problem,
>> > I hope we does it right. I think the problem is in typo that was  
>> done
>> > in last patch.
>> > Fix attached. Could you please verify it.
>> > I will also attach it to the HARMONY-1421
>> >
>> > ------------------------------------
>> > we already try to has global lock for suspend_other().
>> > Here is a deadlock scenario:
>> >
>> >  
>> thread1:                                                              
>>    thread2
>> >
>> > assert(hythread_is_suspend_enabled());
>> > global_lock();
>> > supend(thread2);
>> > global_unlock();
>> > ...
>> >
>> > assert(hythread_is_suspend_enabled());
>> >                                                                
>> global_lock();
>> >                                                                
>> supend(thread1);
>> >                                                                
>> global_unlock();
>> >                                                             ....
>> > safe_point() // stop here                        safe_point() //  
>> stop
>> > here
>> > ------------------------------------------------------------
>> >
>> > Thanks
>> > Artem
>
> -- 
> Ivan
> 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
>


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