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.
Summary: | Deadlock between FindInFilesAction and SearchScopeMainProject | ||
---|---|---|---|
Product: | utilities | Reporter: | Martin Krauskopf <mkrauskopf> |
Component: | Search | Assignee: | Marian Petras <mpetras> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | mmirilovic |
Priority: | P2 | Keywords: | RANDOM, THREAD |
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
deadlock.txt
suggested patch (removed modifier 'synchronized') binary patch (removed modifier 'synchronized') |
Description
Martin Krauskopf
2007-08-31 14:28:25 UTC
Created attachment 47885 [details]
deadlock.txt
Product Version: NetBeans IDE Dev (Build 070830) Java: 1.6.0_02-ea; Java HotSpot(TM) Client VM 1.6.0_02-ea-b02 System: Linux version 2.6.20-16-generic running on i386; Mariane you are the owner of utilities? Not sure? Yes, I am the owner. According to the reporter, this deadlock has occurred once. According to bug priority guidelines, random, hardly reproducible deadlocks should be qualified as P2 ("happens fairly often") or P3. So I lower priority of this bug to P2. I think I found the cause and solution. Method org.netbeans.modules.search.project.AbstractProjectSearchScope.propertyChange(...) is synchronized but it seems there is no need for the synchronization. It is the only synchronized method among all the methods in the class and its subclasses. So the solution is to remove the 'synchronized' modifier from the method's declaration. Created attachment 47984 [details]
suggested patch (removed modifier 'synchronized')
Created attachment 47986 [details]
binary patch (removed modifier 'synchronized')
I have attached both source code patch and a binary patch. To apply the binary patch, put it to subdirectory 'ide8/modules/patches/org-netbeans-modules-utilities-project' of your NetBeans installation directory. Do not have problem with applying source patches. But do not know why. I was not able to reproduce second time this deadlock in a week. So if I apply a patch and does not get the deadlock it proves nothing. So probably either be sure that it works ;) or just commit? Fixed - committed to the trunk. Modified file: utilities/project/src/org/netbeans/modules/search/project/AbstractProjectSearchScope.java (1.3) Diff: http://utilities.netbeans.org/source/browse/utilities/project/src/org/netbeans/modules/search/project/AbstractProjectSearchScope.java?r1=1.2&r2=1.3&diff_format=u |