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 74908 - IDE hungs on Create project under source controled directory
Summary: IDE hungs on Create project under source controled directory
Status: RESOLVED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: vcscore (show other bugs)
Version: 5.x
Hardware: PC Windows XP
: P1 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords:
: 76865 (view as bug list)
Depends on:
Blocks: 75143
  Show dependency tree
 
Reported: 2006-04-12 12:38 UTC by Maksim Khramov
Modified: 2006-06-07 16:54 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE thread dump (35.32 KB, text/plain)
2006-04-12 14:38 UTC, Maksim Khramov
Details
threaddump2.txt (17.99 KB, text/plain)
2006-04-14 14:31 UTC, Peter Pis
Details
The binary patch. Copy into ide7/modules/patches/org-netbeans-modules--vcscore folder. (62.88 KB, application/octet-stream)
2006-04-19 17:15 UTC, Martin Entlicher
Details
The textual diff of the fix. (4.78 KB, patch)
2006-04-19 17:16 UTC, Martin Entlicher
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Maksim Khramov 2006-04-12 12:38:18 UTC
Install VSS profile and all required modules.( I also try PVSC and clearcase
profiles)
Add Versioned Directory using VSS profile
Try to create new java project in this directory. IDE hungs. In target folder I
see ProjectName folder and only nbproject folder in it with "jax-ws.xml,
project.xml and project.xml~" files
Comment 1 Martin Entlicher 2006-04-12 14:02:13 UTC
Can you please attach a thread dump? Please have a look at
http://qa.netbeans.org/bugzilla/generating-thread-dumps.html for details.
Comment 2 Maksim Khramov 2006-04-12 14:38:54 UTC
Created attachment 29806 [details]
IDE thread dump
Comment 3 Peter Pis 2006-04-14 14:30:43 UTC
Reproduced.

Steps:
1. Install VCS generic modules and enable them.
2. Register new versioned directory, checkout sources which contain some projects.
3. Invoke "Versioning" (CTRL + 8) view
4. Expand node - registered directory in "Versioning" view.

IDE hangs up. (threaddump2.txt)
Comment 4 Peter Pis 2006-04-14 14:31:17 UTC
Created attachment 29862 [details]
threaddump2.txt
Comment 5 Peter Pis 2006-04-18 12:18:38 UTC
Q-Build stopper. 
Comment 6 Martin Entlicher 2006-04-19 13:09:55 UTC
NetBeans 5.5 only issue. Can not be reproduced in trunk builds.
The problem is caused by
org.netbeans.modules.websvc.api.jaxws.project.WSUtils.retrieveJaxWsFromResource(WSUtils.java:72)
When the project is being opened, it creates a file nbproject/jax-ws.xml. The
call to jaxWsFo.lock() triggers another query to SharabilityQuery from
VcsFileSystem, which causes the deadlock, because the project opening is already
being done as a result to a previous call to SharabilityQuery.

The fix can be either not to write anything during reading of a project
structure (this might not be acceptable for WEB projects), or change the logic
of VcsFileSystem.lock() so that it does not trigger the SharabilityQuery when
it's not really necessary (in this case it knows that it's a local file).
Comment 7 Martin Entlicher 2006-04-19 13:12:15 UTC
I'm going to change the logic of VcsFileSystem.lock() method...
Comment 8 Martin Entlicher 2006-04-19 14:17:32 UTC
Hmm, createBackupFile() needs to be modified as well...

   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0xa8155920> (a java.util.WeakHashMap)
        at java.lang.Object.wait(Object.java:484)
        at org.netbeans.api.project.ProjectManager$2.run(ProjectManager.java:198)
        - locked <0xa8155920> (a java.util.WeakHashMap)
        at org.openide.util.Mutex.readAccess(Mutex.java:260)
        at
org.netbeans.api.project.ProjectManager.findProject(ProjectManager.java:180)
        at
org.netbeans.modules.projectapi.SimpleFileOwnerQueryImplementation.getOwner(SimpleFileOwnerQueryImplementation.java:68)
        at org.netbeans.api.project.FileOwnerQuery.getOwner(FileOwnerQuery.java:68)
        at
org.netbeans.modules.projectapi.ProjectSharabilityQuery.getSharability(ProjectSharabilityQuery.java:36)
        at
org.netbeans.api.queries.SharabilityQuery.getSharability(SharabilityQuery.java:85)
        at
org.netbeans.modules.vcscore.VcsFileSystem.isImportant(VcsFileSystem.java:989)
        at
org.netbeans.modules.vcscore.VcsFileSystem.createBackupFile(VcsFileSystem.java:3770)
        at
org.netbeans.modules.vcscore.VcsFileSystem.outputStream(VcsFileSystem.java:3800)
Comment 9 Martin Entlicher 2006-04-19 16:01:55 UTC
"Fixed" in trunk. It needs to be ported to release55 branch, otherwise it has no
effect now.

/cvs/vcscore/src/org/netbeans/modules/vcscore/VcsFileSystem.java,v  <-- 
VcsFileSystem.java
new revision: 1.332; previous revision: 1.331

/cvs/vcscore/nbproject/project.properties,v  <--  project.properties
new revision: 1.19; previous revision: 1.18
Comment 10 Martin Entlicher 2006-04-19 17:15:08 UTC
Created attachment 29945 [details]
The binary patch. Copy into ide7/modules/patches/org-netbeans-modules--vcscore folder.
Comment 11 Martin Entlicher 2006-04-19 17:16:41 UTC
Created attachment 29946 [details]
The textual diff of the fix.
Comment 12 Martin Entlicher 2006-04-19 17:18:19 UTC
Peter, please check that the issue is fixed with the attached binary patch. Thanks.
Comment 13 Peter Pis 2006-04-20 09:35:57 UTC
Verified in trunk. (org.netbeans.modules.vcscore/1 [1.16.15.42 42 200604191800])
NetBeans IDE Dev (Build 200604191800)
1.5.0_06; Java HotSpot(TM) Client VM 1.5.0_06-b05
Windows XP version 5.1 running on x86
en_GB (nb); Cp1252
Comment 14 Peter Pis 2006-04-20 10:42:21 UTC
Verified in 5.5 (060418). 

###
Please you will have to do following: remove all "jax-ws.xml" files with 0 size
from all your projects. (location of that file is in <projectname>/"nbproject"
folder) and of course install new version of module.
###
Comment 15 Peter Pis 2006-04-20 16:18:42 UTC
This fix shouldn't impact standard distribution of NB. It was fixed in vcscore
module which belongs to VCS generic modules accessible via Update Center.
Comment 16 Martin Entlicher 2006-04-21 11:20:46 UTC
Thanks for the verification, the fix is merged into release55 branch:

/shared/data/ccvs/repository/vcscore/nbproject/project.properties,v  <-- 
project.properties
new revision: 1.3.12.3.2.1; previous revision: 1.3.12.3

/shared/data/ccvs/repository/vcscore/src/org/netbeans/modules/vcscore/VcsFileSystem.java,v
 <--  VcsFileSystem.java
new revision: 1.329.6.2.2.1; previous revision: 1.329.6.2
Comment 17 Peter Pis 2006-06-07 16:54:52 UTC
*** Issue 76865 has been marked as a duplicate of this issue. ***