[12] RFR 8129310: java/net/Socket/asyncClose/AsyncClose.java fails intermittently

Chris Yin xu.y.yin at oracle.com
Fri Nov 16 02:39:37 UTC 2018

Hi, Daniel

Thanks a lot for your reviewing and comments, revision webrev as below.



> On 15 Nov 2018, at 6:06 PM, Daniel Fuchs <daniel.fuchs at oracle.com> wrote:
> Hi chris,
> There's no reason to make `passed` and `closed` volatile since
> they are private and only accessed from withing synchronized
> methods.
> On the other hand, reason could now be final.
> Otherwise I guess it looks good. I haven't looked at the tests that
> use AsyncClose so I trust that you have verified that your changes
> work as you expect.
> best regards,
> -- daniel
> On 15/11/2018 09:12, Chris Yin wrote:
>> Please review below minor change for java/net/Socket/asyncClose/AsyncClose.java fails intermittently issue, thanks
>> From previous failure log, seems lack of enough info to find out root cause, this change is to enhance a little to base test class AsyncCloseTest with guessing, even it may not completely address the issue, additional log info should still helpful for future debugging.
>> 1. add volatile to 'boolean passed' and 'boolean closed' to avoid any visibility issue since they were write/read in different threads
>> 2. failure reason info may be overwritten if failed() been called multiple times, change it to record all failure messages.
>> bug: https://bugs.openjdk.java.net/browse/JDK-8129310
>> webrev: http://cr.openjdk.java.net/~xyin/8129310/webrev.00/
>> Regards,
>> Chris

More information about the net-dev mailing list