jmx-dev RFR 8141591: javax/management/remote/mandatory/threads/ExecutorTest.java fails intermittently

Shanliang JIANG shanliang.jiang at oracle.com
Fri Nov 13 07:05:48 UTC 2015


Hi Jaroslav,

The issue is that after a JMX client is terminated, its ClientNotifForwarder continues deliver a job to a user specific Executor, I think a better fix to not allow this happen. 

I am not sure that it is a good solution to check RejectedExecutionException, here is the Java doc:
	"Exception thrown by an Executor <file:///Users/sjiang/projects/jdk/workspace/fix/javadoc9/java/util/concurrent/Executor.html> when a task cannot be accepted for execution."

it means that  the exception is possibly thrown in other cases too, like too many tasks if it is shared. So ignore simply this exception in case of not “shouldStop()” seems incorrect.

And Executor is an interface and a user could provide any implementation class, so possible a user would throw any another RuntimeException or even an Error in this case.

Shanliang
> On 12 Nov 2015, at 13:13, Jaroslav Bachorik <jaroslav.bachorik at oracle.com> wrote:
> 
> Please, review the following test change
> 
> Issue : https://bugs.openjdk.java.net/browse/JDK-8141591
> Webrev: http://cr.openjdk.java.net/~jbachorik/8141591/webrev.00
> 
> In rare circumstances, when an external executor is provided, the ClientNotifForwarder$NotifFetcher.doRun() method might fail because of RejectedExecutionException caused by the executor being externally shut down.
> 
> The patch adds a guard against this possibility. If the executor has been shut down the fetcher will also properly stop.
> 
> Thanks,
> 
> -JB-

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20151113/e6557ece/attachment.html>


More information about the serviceability-dev mailing list