RFR(S): 6952105 TEST_BUG: testcase failure, not very often, com/sun/jdi/SuspendThreadTest.java
David Holmes
david.holmes at oracle.com
Tue Feb 18 11:49:58 PST 2014
On 18/02/2014 11:03 PM, Staffan Larsen wrote:
>
> On 18 feb 2014, at 13:09, David Holmes <david.holmes at oracle.com> wrote:
>
>> Hi Staffan,
>>
>> If you get a spurious wakeup from wait():
>>
>> 151 try {
>> 152 synchronized (bkptSignal) {
>> 153 bkptSignal.wait(5000);
>> 154 }
>> 155 } catch (InterruptedException ee) {
>> 156 }
>> 157 if (prevBkptCount == bkptCount) {
>> 158 failure("failure: test hung");
>>
>> you could report failure. But that is far less likely than the current problem using sleep.
>
> Right. Adding “continue;” inside the catch(InterruptedException) block should guard against that.
No, a spurious wakeup is not an interrupt - the wait() will simply return.
David
>
> /Staffan
>
>>
>> David
>>
>> On 18/02/2014 8:19 PM, Staffan Larsen wrote:
>>> Still looking for Reviewer for this change.
>>>
>>> Thanks,
>>> /Staffan
>>>
>>> On 11 feb 2014, at 15:12, Staffan Larsen <staffan.larsen at oracle.com> wrote:
>>>
>>>> Updated the test to use proper synchronization and notification between threads. Should be more stable and much faster.
>>>>
>>>> bug: https://bugs.openjdk.java.net/browse/JDK-6952105
>>>> webrev: http://cr.openjdk.java.net/~sla/6952105/webrev.00/
>>>>
>>>> Thanks,
>>>> /Staffan
>>>
>
More information about the serviceability-dev
mailing list