Created attachment 103299[details]
Thread dump
Occurred to me today in 101124-3c968d669482. Tried to open a project which was unloadable (missing parent POMs I think); IDE stuck in Opening Project dialog and had to be killed.

The problem here is that two threads are synchronizing on NbMavenProjectImpl, one thread at the end of opening the project in LazyLookup.beforeLookup() and the other thread (after reloading the project) in call to getOriginalMavenProject() through the MavenProjectPropsImpl getter method. They both are also synchronizing on MavenProjectPropsImpl.
The methods of MavenProjectPropsImpl probably need to stay synchronized.
What could help would be a modification of getOriginalMavenProject() method which would wait on synchronization only if project == null, i.e. change like this:
- public @NonNull synchronized MavenProject getOriginalMavenProject() {
+ public @NonNull MavenProject getOriginalMavenProject() {
if (project == null) {
+ synchronized (this) {
+ if (project == null) {
project = loadOriginalMavenProject(true);
}
+ }
+ }
return project;
}
Jesse, can you review and comment?

The suggested patch is double-checked locking, which is generally frowned upon.
Better would probably be to have MavenProjectPropsImpl synchronize on the associated NbMavenProjectImpl rather than itself.