This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 208108 - Hangs on ProjectManager.findProject
Summary: Hangs on ProjectManager.findProject
Status: RESOLVED DUPLICATE of bug 205658
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 7.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-07 06:59 UTC by rad
Modified: 2012-02-14 18:09 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Thread dump (35.49 KB, application/octet-stream)
2012-02-07 06:59 UTC, rad
Details
ide top part of log (44.47 KB, text/plain)
2012-02-07 07:09 UTC, rad
Details

Note You need to log in before you can comment on or make changes to this bug.
Description rad 2012-02-07 06:59:21 UTC
Created attachment 115497 [details]
Thread dump

Ide hangs while opening many maven projects.
Comment 1 rad 2012-02-07 07:08:19 UTC
> java -version
java version "1.7.0_147-icedtea"
OpenJDK Runtime Environment (IcedTea7 2.0) (SUSE LINUX build 1.7.0_147-icedtea-b147)
OpenJDK Server VM (build 21.0-b17, mixed mode)
Comment 2 rad 2012-02-07 07:09:26 UTC
Created attachment 115498 [details]
ide top part of log
Comment 3 Milos Kleint 2012-02-08 13:11:34 UTC
the problem is that org.netbeans.modules.maven.NbMavenProjectImpl.getOriginalMavenProject() call is synchronized and while constructing the project instance eventually one arrives at NbArtifactFixer which can call to the MavenFileOwnerQueryImpl class which will in some cases attempt to grab project read mutex. This keeps on working happily until someone calls the NbMavenProjectImpl.getOriginalMavenProject method with project write mutex on. as this stack does:

I've cracked my head on thinking about ways to prevent NbArtifactFixer to aquire the project mutex. I can't see a way now.. maybe all calls to  NbMavenProjectImpl.getOriginalMavenProject should be under read mutex, if not already under write mutex..

java.lang.Thread.State: BLOCKED (on object monitor)
	at org.netbeans.modules.maven.NbMavenProjectImpl.getOriginalMavenProject(NbMavenProjectImpl.java:340)
	- waiting to lock <0x6f7b3420> (a org.netbeans.modules.maven.NbMavenProjectImpl)
	at org.netbeans.modules.maven.api.PluginPropertyUtils.getPluginPropertyList(PluginPropertyUtils.java:259)
	at org.netbeans.modules.maven.osgi.SupportedProjectTypes.packaging(SupportedProjectTypes.java:54)
	at org.netbeans.modules.maven.api.NbMavenProject.getPackagingType(NbMavenProject.java:307)
	at org.netbeans.modules.maven.apisupport.NbmIcons.getIcon(NbmIcons.java:61)
	at org.netbeans.modules.maven.NbMavenProjectImpl$Info.getIcon(NbMavenProjectImpl.java:955)
	at org.netbeans.api.project.ProjectUtils$AnnotateIconProxyProjectInformation.updateIcon(ProjectUtils.java:309)
	at org.netbeans.api.project.ProjectUtils$AnnotateIconProxyProjectInformation.annotatorsChanged(ProjectUtils.java:289)
	at org.netbeans.api.project.ProjectUtils$AnnotateIconProxyProjectInformation.<init>(ProjectUtils.java:280)
	at org.netbeans.api.project.ProjectUtils.getInformation(ProjectUtils.java:103)
	at org.netbeans.modules.project.ui.OpenProjectList.saveProjectList(OpenProjectList.java:1245)
	at org.netbeans.modules.project.ui.OpenProjectList.access$2200(OpenProjectList.java:132)
	at org.netbeans.modules.project.ui.OpenProjectList$5.run(OpenProjectList.java:716)
	at org.netbeans.modules.project.ui.OpenProjectList$5.run(OpenProjectList.java:713)
	at org.openide.util.Mutex.writeAccess(Mutex.java:397)
	at org.netbeans.modules.project.ui.OpenProjectList.doOpen(OpenProjectList.java:713)
	at org.netbeans.modules.project.ui.OpenProjectList.access$2100(OpenProjectList.java:132)
	at org.netbeans.modules.project.ui.OpenProjectList$3.run(OpenProjectList.java:582)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1411)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1991)
Comment 4 Jesse Glick 2012-02-14 18:09:21 UTC
This particular case is fixed now by now loading a project from NbArtifactFixer (in most cases).

*** This bug has been marked as a duplicate of bug 205658 ***