[OpenJDK 2D-Dev] [10] RFR: JDK-8188083- NPE in java.awt.image.FilteredImageSource.startProduction
Jayathirth D V
jayathirth.d.v at oracle.com
Thu Oct 26 06:11:49 UTC 2017
Hi Prahalad,
Changes are fine.
Thanks,
Jay
-----Original Message-----
From: Prahalad Kumar Narayanan
Sent: Thursday, October 26, 2017 9:37 AM
To: 2d-dev
Subject: [OpenJDK 2D-Dev] [10] RFR: JDK-8188083- NPE in java.awt.image.FilteredImageSource.startProduction
Hello Everyone
Good day to you.
Kindly review a fix for the bug
Bug ID: JDK-8188083
Description: Null Pointer Exception in java.awt.image.FilteredImageSource.startProduction
Root Cause
. FilteredImageSource implements ImageProducer interface
. All the methods of FilteredImageSource operate on a common data -HashTable, but only a few are synchronized methods.
. Thus, when synchronized & un-synchronized methods access / modify the hash table in a multi-threaded scenario, it renders the class vulnerable to this exception.
Exception occurrence
. The submitter has mentioned that there is no test-case to reproduce to this issue.
. Luckily I was able to observe this issue with a "crude" test code
. The test triggered 7k threads in an ExecutorService randomly adding/ removing/ invoking startProduction on FilteredImageSource object.
. I didn't feel it robust enough to be added as a part of regression tests. I tried optimizing the test but in vain.
. Hence the test code isn't added to the webrev.
Details on the Fix:
. The concerned methods have been "synchronized" in the fix.
. No new regression failures were observed with this change.
Kindly review the change and provide your feedback.
In addition, kindly suggest whether this requires CSR as it adds "synchronized" to method signature.
Review Link: http://cr.openjdk.java.net/~pnarayanan/8188083/webrev.00/
Thank you for your time in review
Have a good day
Prahalad N.
More information about the 2d-dev
mailing list