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.
NB 041209, jdk1.5.0_01, turboCache On Steps: 1. Register new versioned directory and create in it a project. 2. Switch to "Files" view and invoke e.g."VSS | Add All" (check Add all recursively, push "Ok" button) Refresh and other commands are running, they have to be stopped manualy. See attached figure. In case of PVCS situation is similar.
Created attachment 19252 [details] output of runtime tab
From debugging it looks like race condition in CommandExecutorSupport. It simply forgets to call Refresh Recursively and refresh maps merging. Can you Refresh Recursively under Runtime?
Well, my previous comment is linked to my attempt to reproduce. I got into missing refresh command trouble. It's FIXED now, I have commented out performance optimalizations in CES that merges refreshes. CommandExecutorSupport.java new revision: 1.64.2.9 With the fix I cannot reproduce original problem. BTW: You cannot trust Runtime tab icons entirerly. They sometimes do not show real state try to compare to exit status property.
Some commands in Runtime tab fail because there is make an attempt to add files and folders to the repository more than once. This happens after PVCS | Add All action. === ADD_FILES_IN_DIR: (Error output) Warning: D:\SunWork\test\testPVCS\work\TestApp2\build.xml: Could not add the file because a versioned file already exists. Warning: D:\SunWork\test\testPVCS\work\TestApp2\manifest.mf: Could not add the file because a versioned file already exists. === ADD_IN_FOLDER_CMD: 10:28:50 Dec.14.04 [Error] A Project named "TestApp2" already exists in ProjectRoot named "Project Database". Please enter a unique name for the Project.
Verified.
VSS Add All doesn't work correctly. Neither all folders nor files are added.
Also "PVCS Add All" doesn't work correctly. Commands like "ADD_FILES_IN_DIR", "ADD_IN_FOLDER_CMD", ... have to be stopped from Runtime tab. In Previsious turbo Cache build it works fine, but now it doesn't. Regression. P1.
Starting to search what is wrong...
The problem is, that when the folder with sub-files is not yet expanded in Explorer (status info is not yet defined), its content is not added. If the folder is fully expanded, all files are successively added. I've looked at the recent changes, but did not find the cause yet...
Peter can you support Martin's observation? Then I predict simple fix: replacing getCachedMeta() call by getMeta(). And let offline mode takes care of the rest.
At PVCS profile I see: <property name="preCommands"> <value>$[? CACHED_ISLOCAL] [CREATE_PROJECT] []</value> </property> CACHED_ISLOCAL is bug, because it relies on cached status. The variable is not mandatory. FIX: I'll change at UserCommandSupport to set this variable even if status is not yet cached (it makes sence here). It's a kind of predicted fix.
Created attachment 19364 [details] thread dump
Almost all threads wait on CommandTask.waitFinished(CommandTask.java:212) => missing notification. Looking at the line there are another errors: - "if" instead of "while" - missing synchronization on "notifyLock" (eliminates missing notif.) but fixing them raises regresion. The infrastructure relies on these bugs :-(.
These are not bugs in fact, "while" is not necessary, because once the task finishes, it should not be run again. (Well it seems to be possible to run the task again by explicit call to CommandTask.run(). This should not be permitted IMO - I'll fix it.) Synchronization on "notifyLock" looks O.K. to me. This bug is caused by the fact that ADD_IN_FOLDER_CMD command executes ADD_INSIDE_FOLDER_CMD as a post command, but the customization process is done synchronously with the execution of ADD_IN_FOLDER_CMD command. The customization process needs to run DUMP_FILES_FOR_ADD_IN_FOLDER command because of FILE_EMPTY_OUTPUT_OF_DUMP_FILES_FOR_ADD_IN_FOLDER0 construction used in it's execution string. The DUMP_FILES_FOR_ADD_IN_FOLDER command uses RecursiveFolderCommand to retrieve the desired list of files, but it needs to consult the status cache on repository level. This invokes Refresh command. But the LIST_PROJECT command, that is executed by Refresh can not be run in parallel with ADD_IN_FOLDER_CMD command. Therefore the commands remain waiting for each other. The solution is to perform the customization of post-commands asynchronously.
The CommandTask can not be run more then once: /cvs/vcscore/src/org/netbeans/api/vcs/commands/CommandTask.java,v <-- CommandTask.java new revision: 1.6.44.2; previous revision: 1.6.44.1 The customization process of post-commands is done asynchronously: /cvs/vcscore/src/org/netbeans/modules/vcscore/commands/CommandExecutorSupport.java,v <-- CommandExecutorSupport.java new revision: 1.64.2.11; previous revision: 1.64.2.10 The bug is therefore fixed on turbo branch.