[9] RFR of 8080115: (fs) Crash in libgio when calling Files.probeContentType(path) from parallel threads

Alan Bateman Alan.Bateman at oracle.com
Wed Aug 19 08:57:02 UTC 2015


On 07/08/2015 02:08, Brian Burkhalter wrote:
> Please review at your convenience.
>
> Issue:https://bugs.openjdk.java.net/browse/JDK-8080115
> Patch:http://cr.openjdk.java.net/~bpb/8080115/webrev.00/ 
> <http://cr.openjdk.java.net/%7Ebpb/8080115/webrev.00/>
>
> Summary:
>
> Make GnomeFileTypeDetector.probeGio() synchronized and add the 
> regression test previously proposed for 
> https://bugs.openjdk.java.net/browse/JDK-8133010. This latter issue 
> will be resolved as a duplicate of the present one. The usual jdk_nio 
> tests passed on all Linux and Solaris variants tested.
>
If GIO is not thread safe then there is still potential for problems if 
AWT or JNI code were to call into this library. I don't know we can do 
much about that.

Would it be worth adding a command to probeGio to explain why it is 
synchronized? I could imagine this this locking causing contention in 
some extreme cases and it might not be obvious to the reader why it is 
synchronized.

-Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20150819/44ce7a10/attachment.html>


More information about the nio-dev mailing list