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

Bug 166421

Summary: Deadlock in SSE (JSPIndexManager Variety)
Product: [WebTools] WTP Source Editing Reporter: Konstantin Komissarchik <konstantin>
Component: wst.sseAssignee: Nitin Dahyabhai <thatnitind>
Status: RESOLVED FIXED QA Contact: David Williams <david_williams>
Severity: major    
Priority: P2 CC: david_williams
Version: 1.5   
Target Milestone: 1.5.3 M153   
Hardware: PC   
OS: Windows XP   
Whiteboard: hotbug
Bug Depends on:    
Bug Blocks: 126115    
Attachments:
Description Flags
proposed (workspace) patch none

Description Konstantin Komissarchik CLA 2006-11-30 18:01:14 EST
+++ This bug was initially created as a clone of Bug #126115 +++

This bug tracks creating a workaround fix for one specific occurrence of the problem tracked by Bug #126115. The thread dump can be found in Comment #28 of Bug #126115.

The first thread is a job that's
running with a scheduling rule and attempts to do getModelForRead which blocks
because JSPIndexManager is not holding a scheduling rule while calling
getModelForRead and the buffer decides to refresh the underlying file.

The suggest workaround for this problem is to make sure to manually call
refreshLocal before calling getModelForRead. We'd like to see this workaround implemented in the JSPIndexManager in the 1.5.3 time frame. We have seen this problem several times as this point in our automated tests.
Comment 1 Nitin Dahyabhai CLA 2006-12-07 13:55:30 EST
Created attachment 55267 [details]
proposed (workspace) patch

This patch adds a refresh call before the getModelForRead() invocation in the JSPSearchDocument.
Comment 2 Nitin Dahyabhai CLA 2007-01-09 15:24:46 EST
Konstantin, have you confirmed that the attached patch prevents the deadlock?
Comment 3 Konstantin Komissarchik CLA 2007-01-25 12:46:17 EST
Sorry it took so long to get back to you with the test results. I ran the patch half a dozen times through our automated tests and did not see any issues come up. While that in itself is not an indicator as the original problem was intermittent in nature, analysis of the original problem and the patch seems to indicate that the patch does resolve the problem.
Comment 4 Nitin Dahyabhai CLA 2007-01-25 15:47:22 EST
Released with David's review.