harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ivan Volosyuk" <ivan.volos...@gmail.com>
Subject Re: [DRLVM] Thread Manager jvmti related issues fixes (was: Re: [jira] Commented: (HARMONY-1421))
Date Wed, 20 Sep 2006 16:53:46 GMT
I have traced down problem to implementation of thin locks.
Here is what I get, look at the stack:

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

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

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

View raw message