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 114378 - Deadlock between FindInFilesAction and SearchScopeMainProject
Summary: Deadlock between FindInFilesAction and SearchScopeMainProject
Status: RESOLVED FIXED
Alias: None
Product: utilities
Classification: Unclassified
Component: Search (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Marian Petras
URL:
Keywords: RANDOM, THREAD
Depends on:
Blocks:
 
Reported: 2007-08-31 14:28 UTC by Martin Krauskopf
Modified: 2007-09-05 16:01 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
deadlock.txt (30.39 KB, text/plain)
2007-08-31 14:29 UTC, Martin Krauskopf
Details
suggested patch (removed modifier 'synchronized') (734 bytes, patch)
2007-09-03 14:42 UTC, Marian Petras
Details | Diff
binary patch (removed modifier 'synchronized') (3.99 KB, application/octet-stream)
2007-09-03 14:48 UTC, Marian Petras
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Krauskopf 2007-08-31 14:28:25 UTC
Random. See attachment.
Comment 1 Martin Krauskopf 2007-08-31 14:29:21 UTC
Created attachment 47885 [details]
deadlock.txt
Comment 2 Martin Krauskopf 2007-08-31 14:31:09 UTC
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;
Comment 3 Martin Krauskopf 2007-08-31 14:34:26 UTC
Mariane you are the owner of utilities? Not sure?
Comment 4 Marian Petras 2007-08-31 14:42:36 UTC
Yes, I am the owner.
Comment 5 Marian Petras 2007-09-03 11:31:25 UTC
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.
Comment 6 Marian Petras 2007-09-03 14:41:55 UTC
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.
Comment 7 Marian Petras 2007-09-03 14:42:58 UTC
Created attachment 47984 [details]
suggested patch (removed modifier 'synchronized')
Comment 8 Marian Petras 2007-09-03 14:48:47 UTC
Created attachment 47986 [details]
binary patch (removed modifier 'synchronized')
Comment 9 Marian Petras 2007-09-03 14:50:31 UTC
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.
Comment 10 Martin Krauskopf 2007-09-03 14:57:13 UTC
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?
Comment 11 Marian Petras 2007-09-05 16:01:24 UTC
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