RFR: 6815126 intermittent SimulResumerTest.java failure

shanliang shanliang.jiang at oracle.com
Thu Mar 27 17:18:16 UTC 2014


Jaroslav Bachorik wrote:
> On 27.3.2014 15:49, shanliang wrote:
>> Hi,
>>
>> The call
>>     thr.frames(0, frames.size() - 1);
>> suffers a synchronization issue, the size may be changed after
>> frames.size() returns.
>
> Any idea why there is a synchronization issue? The code seems to be 
> intended to run only when a breakpoint is hit and the target thread is 
> suspended.
Here is the info from JDK-6751643 to which this test was developed to test:
------
This bug can only occur if a debugger has multiple threads and calls any 
of the following methods in one thread while simultaneously resuming the 
same debuggee thread in a different debugger thread. Debuggers shouldn't 
do this because it is a race condition and the result returned by these 
methods will vary depending upon just where in the processing of these 
methods the resume takes effect. EG, the frameCount() method could 
return 6 in a case where the debuggee has already been resumed and there 
are no frames.
------

If I do not misunderstand, the check was possibly called before, during 
or after resuming.

Shanliang
>
> -JB-
>
>>
>> webrev:
>> http://cr.openjdk.java.net/~sjiang/JDK-6815126/00/
>>
>> bug:
>> https://bugs.openjdk.java.net/browse/JDK-6815126
>>
>> Shanliang
>



More information about the serviceability-dev mailing list