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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]