Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 369696 - Fix deadlock caused by overuse of sync lock
Summary: Fix deadlock caused by overuse of sync lock
Status: CLOSED FIXED
Alias: None
Product: PTP
Classification: Tools
Component: RDT.sync (show other bugs)
Version: 5.0.4   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: John Eblen CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-25 11:25 EST by John Eblen CLA
Modified: 2012-09-21 11:48 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Eblen CLA 2012-01-25 11:25:40 EST
The static sync lock in org.eclipse.ptp.rdt.sync.git.core.GitServiceProvider serializes synchronization calls. It is also being used in a non-static way to serialize changes to instance variables. This dual use increases the chances of deadlock.

Specifically, in the new file filtering code (Bug 369284), deadlock occurs whenever a new configuration is created. One thread is sync'ing while another thread is creating the new configuration. Both threads need access to the sync lock and to the BuildConfigurationManager data structures. (The new code filters remote binary files, and so needs additional information to access the remote files.)

This can be fixed by adding a non-static lock for updating instance variables and only using the sync lock for synchronization.
Comment 1 John Eblen CLA 2012-01-25 11:26:19 EST
Fix submitted to master and ptp_5_0