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

Bug 289122

Summary: [concurrency] Deadlock in ModelManagerImpl after IOException
Product: [WebTools] WTP Source Editing Reporter: Nitin Dahyabhai <thatnitind>
Component: wst.sseAssignee: wst.sse <wst.sse-inbox>
Status: RESOLVED FIXED QA Contact: Nitin Dahyabhai <thatnitind>
Severity: major    
Priority: P2 CC: cameron.bateman, fziglar, kaloyan, min123, neil.hauge, nsand.dev, raghunathan.srinivasan
Version: 3.2   
Target Milestone: 3.2.4   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 288196    
Bug Blocks:    

Description Nitin Dahyabhai CLA 2009-09-10 13:31:38 EDT
+++ This bug was initially created as a clone of Bug #288196 +++

User-Agent:       Opera/9.64 (Windows NT 6.0; U; en) Presto/2.1.1
Build Identifier: Eclipse 20090619-0625, WST 3.1M 20090827170614

Using StorageModelProvider to connect to an IStorageEditorInput, an IOException
can be thrown for specially formed content. For example:
org.eclipse.wst.sse.core.internal.exceptions.MalformedInputExceptionWithDetail.
When this happens, the exception is swallowed by
StorageModelProvider.loadModel(). Subsequent calls to StorageModelProvider
using the same input element will result in the Eclipse UI thread entering an
infinite wait state.

Reproducible: Always

Steps to Reproduce:
1. Implement IStorageEditorInput
2. Create a (HTML) document which will fail to be loaded. Eg, include UTF
characters into a document not designated for UTF encoding.
3. Call StorageModelProvider.connect(input) to connect
4. Call StorageModelProvider.getDocument(input) to create an infinite wait



We are hoping to adopt usage of the SSE plugins to show HTML / XML / CSS
snippets based on non-file backed data models. If there is an error in the
user's input, an exception may be appropriate, as that can be handled. However,
causing a deadlock in the UI thread is a blocker.

If possible, it would be nice if this could be fixed in the next 3.1.1 release,
or 3.1.0 maintenance build.

I also believe this bug may share the same cause as bug 248676, though I have
not reproduced that bug exactly.
Comment 1 Nick Sandonato CLA 2010-04-28 15:05:25 EDT
Nitin, do you know if Min's fix for Bug 308120 will remove the possibility of this scenario occurring?
Comment 2 Nitin Dahyabhai CLA 2011-01-26 23:45:50 EST
I do not, but I think a related threading fix was made recently?
Comment 3 Nick Sandonato CLA 2011-04-22 11:38:07 EDT
Code was checked in a long time ago.