RFR: 8175010: ImageReader is not thread-safe
claes.redestad at oracle.com
Thu Feb 16 08:47:32 UTC 2017
On 2017-02-16 09:17, Peter Levart wrote:
>> I think your observations about potential issues in JRTFS is correct,
>> but there was nothing to suggest JRTFS code was involved in JDK-8174817
>> (as it's not code that's used by the BuiltinClassLoader).
> The only remaining ImageReader.close() invocation is now in
> jdk.internal.jrtfs.SystemImage anonymous inner class delegated from
> SystemImage.close(), which is only called from JrtFileSystem.close() or
> .finalize(). So you think JRTFS is not the source of the problem? What
> if JRTFS is accessing the same image as JavaRuntimeURLConnection in the
> same VM. Different instances of ImageReader would be used for them, but
> they would share the same underlying SharedImageReader. Currently I
> don't see a problem in SharedImageReader code, but I haven't studied it
> carefully yet. Maybe there is something to be found there...
Nothing is impossible, there was simply no breadcrumbs to suggest this
was happening. One thing I think we should do to rule this out is to
make sure that the SharedImageReader representing the system image
simply can't be closed, which would really be an error.
More information about the jigsaw-dev