Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 330964

Summary: Deadlock caused by busy state ending
Product: [WebTools] WTP Source Editing Reporter: Nick Sandonato <nsand.dev>
Component: wst.sseAssignee: Nick Sandonato <nsand.dev>
Status: RESOLVED FIXED QA Contact: Nitin Dahyabhai <thatnitind>
Severity: normal    
Priority: P3 Flags: thatnitind: review+
Version: 3.2.2   
Target Milestone: 3.2.3   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
patch none

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.