I've got following deadlock when I executed the
nbbuild/build.xml with ant tryme and then opened
the Windows/Mount component.
Created attachment 16254 [details]
Looks to be a bug in the javadoc module. Downgrading priority since it
is not known to occur except in the presence of this (experimental)
module, but it could occur in other situations.
Explanation of bug: JavadocRegistry registers a callback
(JR.pathsAdded) which can be (and is) called from within the scope of
ProjectManager.mutex()'s write lock. (Don't be fooled by the stack
trace - though inside readAccess here, the Runnable is called via
postWriteRequest.) This callback then attempts to acquire a new lock,
which is cannot guarantee is uncontended or will be released in a
bounded amount of time because it does not search for other new locks;
in particular, the new lock (JavadocRegistry itself) is also used by
JR.getDocRoots, which calls arbitrary foreign code
(JavadocForBinaryQuery) which can certainly acquire its own locks.
Therefore the callback is in error.
It should be already fixed with issue #46561, #46876
*** This issue has been marked as a duplicate of 46561 ***