Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 312552 - Revert scanner config / PDOMManager locking to 11-May
Summary: Revert scanner config / PDOMManager locking to 11-May
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-core (show other bugs)
Version: 7.0   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 7.0   Edit
Assignee: James Blackburn CLA
QA Contact: Doug Schaefer CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-12 05:10 EDT by James Blackburn CLA
Modified: 2010-07-28 15:26 EDT (History)
1 user (show)

See Also:


Attachments
patch 1 (4.20 KB, patch)
2010-05-12 05:10 EDT, James Blackburn CLA
jamesblackburn+eclipse: iplog-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James Blackburn CLA 2010-05-12 05:10:29 EDT
Created attachment 168103 [details]
patch 1

Proposed patch attached.

PDOMManager: reverted
CfgDiscoveredPathManager: Use an ILock rather than a scheduling rule / java mutex for locking.

ILocks are deadlock safe (though under deadlock conditions a lock would be released).

To debug ILock deadlocks enable the following debug option:
org.eclipse.core.jobs/jobs/errorondeadlock=true
Comment 1 James Blackburn CLA 2010-05-12 05:10:56 EDT
Chris you ok with this?
Comment 2 James Blackburn CLA 2010-05-12 05:28:45 EDT
I've committed my proposed fix to CfgDiscoveredPathManager. 
I realise the time-zones are against you :), but I'm faily confident that if this code can still deadlock in 7.0, this change will stop it locking up the IDE.

Do attach backtraces of any deadlock conditions though!
Comment 3 CDT Genie CLA 2010-07-28 15:26:50 EDT
*** cdt cvs genie on behalf of jblackburn ***
Bug 312552 Use ILock rather than scheduling rule for mutual exclusion. Scheduling rules require knowing in advance all scheduling rules clients require.

[*] CfgDiscoveredPathManager.java 1.17 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/internal/core/scannerconfig/CfgDiscoveredPathManager.java?root=Tools_Project&r1=1.16&r2=1.17