RFR : JDK-8141591 - javax/management/remote/mandatory/threads/ExecutorTest.java fails intermittently
Harsha Wardhana B
harsha.wardhana.b at oracle.com
Fri Nov 11 16:02:24 UTC 2016
Hello,
Please review the fix for
issue : https://bugs.openjdk.java.net/browse/JDK-8141591
webrev : http://cr.openjdk.java.net/~hb/8141591/webrev.00/
Fix details:
> The root-cause for the issue is that NotifFetcher thread was suspended
> at L562 after which main thread ran to completion shutting down both
> client and server and stopping the executor. Fixing as
>
> synchronized (ClientNotifForwarder.this) {
> if (state == STARTED) {
> executor.execute(new NotifFetcher());
> }
> }
>
> will not solve the problem since NotifFetcher can get suspended after
> checking state==STARTED and still hit the same problem.
>
> One way to solve would be to catch RejectedExecutionException and then
> fallback on linearExecutor. This will take care of necessary cleanup
> if client/server are shutdown or keeps the system running if executor
> is abrupty shutdown by the client without stopping the client/server.
The comments section of the issue also has discussion about various ways
of fixing the issue and merits/demerits of different approaches. It also
helps in getting a perspective on issue and the fix.
Thanks
Harsha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20161111/85875a84/attachment.html>
More information about the serviceability-dev
mailing list