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

Bug 341849

Summary: Deadlock shutting down UI thread
Product: [RT] RAP Reporter: Gareth Bowen <gareth.bowen>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3    
Version: 1.3   
Target Milestone: 1.5 M4   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Heap dump of the deadlock
none
Patch ruediger.herrmann: iplog+

Description Gareth Bowen CLA 2011-04-04 17:49:37 EDT
Build Identifier: 1.3.2.20110216-1023

Occasionally when running a deadlock occurs requiring a full restart (full heap dump attached). This seems to be due to the UI thread trying to shutdown while holding a lock. The shutdown then blocks on the Device.deviceLock.

I think this was caused by applying the fix in bug 316676 which moved the try catch block inside the synchronized block. I believe this can be fixed without regressing on the original bug by putting the outer try catch block outside the synchronized block but leaving the inner try catch block inside the synchronized block. This would mean the stateInfo attribute is still set in a synchronized way but the lock would be released before the shutdown of the thread.

Reproducible: Sometimes
Comment 1 Gareth Bowen CLA 2011-04-04 17:50:58 EDT
Created attachment 192508 [details]
Heap dump of the deadlock
Comment 2 Gareth Bowen CLA 2011-04-04 19:08:17 EDT
Created attachment 192510 [details]
Patch
Comment 3 Rüdiger Herrmann CLA 2011-11-14 15:54:48 EST
This looks like a dup or at least related to bug 320182
Comment 4 Rüdiger Herrmann CLA 2011-11-14 15:59:18 EST
(In reply to comment #3)
> This looks like a dup or at least related to bug 320182
Wrong bug, please disregard comment #3
Comment 5 Rüdiger Herrmann CLA 2011-11-14 16:27:20 EST
Applied patch to CVS HEAD.