Bug 199561

Summary: [efs][dstore] Eclipse hangs when creating a file on dstore-backed remote project, or dbl clicking / moving empty file
Product: [Tools] Target Management Reporter: Martin Oberhuber <mober.at+eclipse>
Component: RSEAssignee: Martin Oberhuber <mober.at+eclipse>
Status: RESOLVED FIXED QA Contact: Martin Oberhuber <mober.at+eclipse>
Severity: critical    
Priority: P1 Flags: mober.at+eclipse: review? (dmcknigh)
mober.at+eclipse: review? (xuanchen)
Version: 2.0   
Target Milestone: 2.0.1   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 187690    
Attachments:
Description Flags
Simple patch fixing the issue none

Description Martin Oberhuber CLA 2007-08-10 09:19:23 EDT
In RSE Perspective, Connect to Linux-dstore host.
Select a folder, right-click > Create Remote Project.
Switch to Resource perspective.
Select the remote project, right-click > New > Folder.
  Name "aaa bbb", OK.

All of Eclipse hangs.
Comment 1 Martin Oberhuber CLA 2007-08-10 09:23:26 EDT
Created attachment 75839 [details]
Simple patch fixing the issue

The problem is, that the DStoreInputStream waits until > 0 bytes are received, which never happens in case of zero-length-file.

Attached patch is a quick hack to fix the issue. I think that it must be improved in order to also handle error situations: the waitForTempFile() loop must exit in case any error is returned from the dstore side, such as host disconnect.
Comment 2 Martin Oberhuber CLA 2007-08-10 09:25:00 EDT
Committed the patch to fix the original issue:

[199561][efs][dstore] Eclipse hangs when manipulating empty file
   DStoreInputStream.java  1.2

Dave and Xuan please review and improve the fix in order to deal with other error situations, as described in comment #1.