Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 330964 - Deadlock caused by busy state ending
Summary: Deadlock caused by busy state ending
Status: RESOLVED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.sse (show other bugs)
Version: 3.2.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2.3   Edit
Assignee: Nick Sandonato CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-23 14:25 EST by Nick Sandonato CLA
Modified: 2010-11-23 15:37 EST (History)
0 users

See Also:
thatnitind: review+


Attachments
patch (1.52 KB, patch)
2010-11-23 14:25 EST, Nick Sandonato CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Sandonato CLA 2010-11-23 14:25:30 EST
Created attachment 183703 [details]
patch

We've been seeing a deadlock in an adopter produce caused by the StructuredTextEditor's busy state ending. The deadlock is caused when the TimeOutExpired TimerTask attempts to execute the runnable in the UI thread. Once the runnable executes, it attempts to cancel the timer in endBusyStateInternal(). The problem is that if the Timer owns a lock that is also required by Timer#cancel(), we'll get a deadlock since the runnable is being executed in a different thread.
Comment 1 Nick Sandonato CLA 2010-11-23 15:37:34 EST
Changes checked in.