Bug 199566 - SystemViewFilterReferenceAdapter#internalGetChildren() should not be synchronized since it could deadlock
Summary: SystemViewFilterReferenceAdapter#internalGetChildren() should not be synchron...
Status: RESOLVED FIXED
Alias: None
Product: Target Management
Classification: Tools
Component: RSE (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P2 normal (vote)
Target Milestone: 2.0.1   Edit
Assignee: David McKnight CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-10 09:50 EDT by Martin Oberhuber CLA
Modified: 2007-09-11 12:26 EDT (History)
1 user (show)

See Also:
mober.at+eclipse: review+


Attachments
patch to remove synchronized (1.58 KB, patch)
2007-09-11 12:00 EDT, David McKnight CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Oberhuber CLA 2007-08-10 09:50:24 EDT
SystemViewFilterReferenceAdapter#internalGetChildren() is synchronized, but calls out to other methods below it.

This construct could deadlock easily, since it is very similar to the one fixed
with bug #199552 -- see the comments there for information how the deadlock
actually happened.

Please investigate why you think the method must be synchronized, and either
get rid of the synchronized statement or find an alternative way of
synchronization. Take care of bug #149188 comment 4, it shows the original reason why this was made synchronized; but it looks like the synchronization is no longer necessary.
Comment 1 Martin Oberhuber CLA 2007-08-10 09:52:32 EDT
For similar issues, see also bug 199565 and bug 199568.
Comment 2 Martin Oberhuber CLA 2007-08-10 10:16:50 EDT
See bug #199573 comment 1 for an example how to fix issues with synchronized.
Comment 3 David McKnight CLA 2007-09-11 12:00:36 EDT
Created attachment 78072 [details]
patch to remove synchronized

Here is the patch to remove the synchronized on internalGetChildren
Comment 4 Martin Oberhuber CLA 2007-09-11 12:02:45 EDT
Patch is good.
When testing, we'll need to watch out for duplicate children under filters!
Comment 5 Kevin Doyle CLA 2007-09-11 12:09:54 EDT
Even before this change you could get duplicate children under filters.  Bug #192884 is open for this.  Will see if I can duplicate it again on Thursday.
Comment 6 David McKnight CLA 2007-09-11 12:26:56 EDT
I've committed the patch for this to cvs.