Codereview request: 8007710 runtime/7158988/FieldMonitor.java fails with com.sun.jdi.VMDisconnectedException: Connection closed
shanliang
shanliang.jiang at oracle.com
Tue Feb 11 07:31:26 PST 2014
Staffan Larsen wrote:
> Hi Shanliang,
>
> I can’t quite see how the test can fail in this way. When the ClassPrepareEvent happens, the debuggee will be suspended. So when addFieldWatch() is called, the debuggee should not have moved.
>
I am not expert of jdi so I may miss something here. I checked the
failure trace and saw the report exception happen when FieldMonitor
received ClassPrepareEvent and was doing addFieldWatch. FieldMonitor did
call "vm.resume()" before treating events.
I reproduced the bug by add sleep(1000) after vm.resume() but before
calling eventQueue.remove();
Thanks,
Shanliang
> One problem I do see with the test is that it does not wait for a VMStartEvent before setting up requests. I’m not sure if that could cause the failure in the bug report, though.
>
> /Staffan
>
> On 11 feb 2014, at 15:13, shanliang <shanliang.jiang at oracle.com> wrote:
>
>
>> Hi ,
>>
>> The problem could be that FieldMonitor did not have enough time to "addFieldWatch" but the vm to monitor (TestPostFieldModification) was already ended.
>>
>> So we should make sure that TestPostFieldModification exits after FieldMonitor has done necessary. The solution proposed here is that FieldMonitor creates a file after adding field watching, and TestPostFieldModification quits only after finding the file.
>>
>> web:
>> http://icncweb.fr.oracle.com/~shjiang/webrev/8007710/00/
>>
>> bug:
>> https://bugs.openjdk.java.net/browse/JDK-8007710
>>
>> Thanks,
>> Shanliang
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20140211/eca01cf7/attachment-0001.html
More information about the serviceability-dev
mailing list