On 25/02/2018 23:51, Claes Redestad wrote:
Hi,
the JDK-8198418[1] improvements to lambda bootstrapping meant
initialization changed around to allow the possibility of a
bootstrap race, which made it possible to cause a class loading
deadlock when different threads try to initialize classes like
SimpleMethodHandle and SpeciesData at the same time.
Making sure the common ancestor, BoundMethodHandle, is initialized
using the same means before going into the synchronized block in
LambdaForm:createFormsFor seems to be enough to ensure this race
can always be resolved peacefully:
http://cr.openjdk.java.net/~redestad/8198492/jdk.00/
This looks okay to me to fix the current issue. There are several other
bugs that look similar and I expect they will go away once you get this
pushed. It might be useful to move JDK-8198492 to the java.lang.invoke
subcomponent, and maybe change the summary so that it's clearer for
anyone looking at in the future.
-Alan