8022594: Potential deadlock in <clinit> of sun.nio.ch.Util/IOUtil

Jeremy Manson jeremymanson at google.com
Tue Sep 3 15:00:17 PDT 2013


I note that the bug for this suggests that it might have been a one-off on
our side.  As it turns out, we can reproduce this relatively easily, but a)
flakily, and b) not in a way that we can share externally.

Jeremy


On Mon, Aug 26, 2013 at 1:54 AM, Alan Bateman <Alan.Bateman at oracle.com>wrote:

>
> Jeremy Manson recently reported a sighting of a deadlock at startup in the
> static initializers that are involved in loading libnio/equivalent [1].
>
> Digging through the JDK 1.4/1.5 era history then it seems there were other
> issues that lead to the current implementation. Looking at now and since
> sun.nio.ch.Util doesn't have any native methods then the simplest thing to
> do (but not the only solution) is to move the loading of the native
> libraries to IOUtil. That eliminates the need for the additional locking.
>
> The webrev with the changes is here:
>
> http://cr.openjdk.java.net/~**alanb/8022594/webrev/<http://cr.openjdk.java.net/~alanb/8022594/webrev/>
>
> The patch does not include a test as this is a deadlock at startup that
> just isn't easy to reproduce (at least not on the systems that I tried).
>
> -Alan
>
> [1] http://mail.openjdk.java.net/**pipermail/core-libs-dev/2013-**
> August/019630.html<http://mail.openjdk.java.net/pipermail/core-libs-dev/2013-August/019630.html>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20130903/4660f0e1/attachment.html 


More information about the nio-dev mailing list