Bug 4911 - Add to workspace stalled
Summary: Add to workspace stalled
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Team (show other bugs)
Version: 2.0   Edit
Hardware: PC other
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Jean-Michel Lemieux CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 4959 5335 (view as bug list)
Depends on:
Blocks:
 
Reported: 2001-10-11 16:34 EDT by Knut Radloff CLA
Modified: 2002-04-09 09:15 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Knut Radloff CLA 2001-10-11 16:34:26 EDT
In my workspace I have a version of org.eclipse.swt loaded from our local 
repository. I went to the repository view and added org.eclipse.swt from the 
stream on dev.eclipse.org. After processing a little under 1/4 the operation 
stalled at org.eclipse.swt.widgets.Tree.java (34k of 53k).
Clicking cancel has no effect. The text in the progress dialog flickers 
occasionally. It looks like it keeps getting updated with the same old 
Tree.java progress (or lack thereof).
Comment 1 Kevin McGuire CLA 2001-10-11 16:54:55 EDT
We had a newsgroup posting from Marcio Marchini that was similar.
Comment 2 Knut Radloff CLA 2001-10-11 17:19:20 EDT
On a subsequent retry (I killed Eclipse and restarted) I got the error 
message "Cannot close connection". I've seen that earlier today when trying to 
synchronize to the new dev.eclipse.org. In both cases I got it fairly early on, 
i.e. way before the synchronize was done.
Comment 3 Knut Radloff CLA 2001-10-16 15:54:23 EDT
I keep getting the "Error cannot close connection" when I try to synchronize 
with the entire org.eclipse.swt. When I syncronize with each folder 
individually or only a few folders at a time it works.
Comment 4 Lynne Kues CLA 2001-10-16 16:04:41 EDT
This may be related.  I started with a new workspace and had Automatic Build 
on.  I then "Added to Workspace" the org.eclipse.swt project.  I got to a point 
where I was hung.  Processing was occurring (100% of the CPU being utilized) 
but progress was not being made.  The "adding XXX bytes of YYY bytes" dialog 
was updating (I could see it flash), but no progress was being made (i.e., the 
XXX bytes was not increasing).  The first time I got stuck I waited about 20 
minutes and then killed Eclipse.  The second time, I waited less (about 5 
minutes).  I was able to load by turning automatic build off.
Comment 5 Knut Radloff CLA 2001-10-16 17:46:52 EDT
Uploaded the offending workspace to 
walleye:/va2000/incoming/forMichaelV/4911.zip

This workspace also shows (I think) the "Cannot close connection" error when 
synchronizing org.eclipse.swt. If not, I can send another workspace where I 
definitely do see that problem.
Comment 6 Michael Valenta CLA 2001-10-17 16:55:27 EDT
*** Bug 4959 has been marked as a duplicate of this bug. ***
Comment 7 Jean-Michel Lemieux CLA 2001-10-24 00:16:04 EDT
I reproduced the stalled "Add to Workspace" at home over VPN. The culprit was 
the ServerPacket::fill() method. And I think this explains why this is hard to 
reproduce in the office. It was easy to reproduce, basically happening all the 
time :)

When totalBytesRead was zero (e.g. the entire packet was read during the last 
fill or the entire buffer was filled) then this works fine because 
totalBytesRead is always 0. However, when the client read faster than the bytes 
where read from the line, then totalBytesRead increased and the while loop was 
being skipped when there are actual bytes still left to be read. This was 
causing the infinite loop.

I have refactored the fill method to always read bytes if they are available. I 
can now sync and add to workspace SWT, UI plugins. I tried several times and it 
seems to work now. Why this was not happening before is a mystery and worries 
me somewhat. I am not 100% confident in this fix without further testing and at 
least a code review (another pair of eyes) on the Client/ServerPacket classes 
in the SSH plugin.


Comment 8 Michael Valenta CLA 2001-10-29 12:09:21 EST
*** Bug 5335 has been marked as a duplicate of this bug. ***
Comment 9 Jean-Michel Lemieux CLA 2001-11-06 13:06:48 EST
Fixed in v207