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.
[Netbeans 200410111800; WinXP; JDK 1.5.0] Deadlock occured everytime I was activating and deactivating modules in Tools->Options->System- >Modules. Deadlock occures after 10-20 clicks on enable checkboxes. IDE freezes completely and has to be killed from task manager. Reproducible on JDK 1.5.0_01-ea-b3. Reproducible on JDS as well, I can deadlock the IDE in JDS faster than in WinXP. Normal kill doesn't seem to work, kill -9 must be used. To reproduce, just try to play with the modules settings, for me it always occured, sometimes earlier, sometimes later. I didn't find any dependence on time/activity, only it seems to happen more often when the request is complex (when it needs to evaluate dependencies). But it happens when clicking on a module without dependencies as well.
Roman, please provide a thread dump of the locked IDE: http://qa.netbeans.org/bugzilla/generating-thread-dumps.html
I attach two thread dumps I got from the console. The dumps are different before the freeze so if it would help I can generate some more.
Created attachment 18254 [details] First thread dump
Created attachment 18255 [details] Second thread dump
Created attachment 18257 [details] Here is the correct thread dump with all info needed.
Looks like a Lookup <-> InstalledFileLocator conflict; both need the other. I think I can make IFL avoid calling Lookup while holding a lock in almost all circumstances.
Have a patch which seems to work - at least, I do not see deadlocks when turning modules on and off.
I guess the patch wasn't applied before yesterday's daily build, was it? I can reproduce the deadlock on last daily build. Maybe this will help - I always reproduce it by opening Java and Web modules and activate/deactivate the modules more or less in random. Maybe I'm not as nice to Netbeans as I could be...
Btw. and off topic: Is not ModuleBean badly written? I see too much request processors occupied by it. One would be enough, is it not?
Of course not, the patch was not applied yet or I would have already closed this. To Yarda - I have a separate patch which reduces the RP usage to one thread at a time. I have been testing disabling and reenabling all modules and have not seen the deadlock with the patch. (I have seen other problems.)
Fix: committed Up-To-Date 1.8 openide/src/org/openide/modules/InstalledFileLocator.java Use one RP: committed Up-To-Date 1.34 core/src/org/netbeans/core/ui/ModuleBean.java Other fixes (besides for issue #50391): committed * Up-To-Date 1.8 core/javahelp/src/org/netbeans/modules/javahelp/Installer.java committed * Up-To-Date 1.9 httpserver/src/org/netbeans/modules/httpserver/HttpServerURLMapper.java committed * Up-To-Date 1.8 java/project/manifest.mf committed * Up-To-Date 1.4 projects/projectui/manifest.mf
Tested on NB 200410141800 on JDS, during 20 minutes of activating and deactivating modules no deadlock occurred.