Bug 37292 - [CVS Core] Unable to synchronize - Cannot close connection
Summary: [CVS Core] Unable to synchronize - Cannot close connection
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Team (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P2 normal (vote)
Target Milestone: 3.0 M2   Edit
Assignee: Michael Valenta CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 37615 37620 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-05-06 14:50 EDT by Darin Wright CLA
Modified: 2003-06-18 13:57 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Wright CLA 2003-05-06 14:50:25 EDT
In I20030506, when synch'ing, I often get an error dialog with the 
message "Unable to synchronize: Cannot close connection". When I revert to 
I20030429 I do not get the error. However, it does not happen every time in 
I20030506. Not sure how to reproduce consistently.
Comment 1 Michael Valenta CLA 2003-05-06 15:12:50 EDT
I've seen other instances of this as well. Must be related to the fix for bug 
37204.
Comment 2 Michael Valenta CLA 2003-05-06 16:43:32 EDT
The cause of this has been identified. I will be releasing a fix soon and will 
request it be included in the next rebuild (I assume there will be a rebuild 
given that there are test case failures).
Comment 3 Dani Megert CLA 2003-05-08 04:53:33 EDT
there was a rebuild (I20030507) but I still see the same problem.
Comment 4 Dani Megert CLA 2003-05-08 05:24:12 EDT
Can you tell what the side-effects of this error are? Do I have to switch back
to I20030429?
Comment 5 Michael Valenta CLA 2003-05-08 08:49:52 EDT
Can you give a description of when this happens for you? Also, what conection 
method are you using?

Since the error occurs when the connection is being closed, the only side 
effect is that anything that happens after tht point will not occur (no sync 
view or no error dialog if the operation failed).
Comment 6 Dani Megert CLA 2003-05-08 09:07:43 EDT
Happened when using "Synchronize CVS Projects". I did not see any strange thing
going on in the UI. Repeating it did not write to the log anymore.

I use extssh to connect to dev.eclipse.org
Comment 7 Michael Valenta CLA 2003-05-08 09:17:47 EDT
I have updated the Connection.close() method to log any IOExceptions instead of 
throwing them. The rationale is that the close is issued either because the 
operation succeeded succesfully or was cut short by another exception. In the 
first case, the operation can continue and the close failure will be in the log 
to indicate that a problem did occur. Hopefully there will be enough in the 
traceback to narrow down the problem. In the second case, the original 
exception, which is now currently lost, will be shown to the user and the close 
exception will be logged.

Leaving open to consider for 2.1.1
Comment 8 Michael Valenta CLA 2003-05-08 09:35:23 EDT
Not to be included in 2.1.1.
Comment 9 Dani Megert CLA 2003-05-08 09:43:05 EDT
Not sure whether I understood: what does the close failure tell me if I see it
in the log i.e. what would my (re)action be? Will there be no data loss?
Comment 10 Michael Valenta CLA 2003-05-08 10:25:51 EDT
Yes, if you see a close failure in the log and no other error indication, then 
you can assume that there was no data loss.
Comment 11 Michael Valenta CLA 2003-05-08 10:51:20 EDT
Daniel, does this happen often for you on I20030507?
Comment 12 Dani Megert CLA 2003-05-08 11:00:48 EDT
It never happened until today using I20030507 and it only happened in the very
beginning i.e. uponn my first synchronization. I supose I got one log entry per
repository connection.
Comment 13 Michael Valenta CLA 2003-05-15 08:54:16 EDT
*** Bug 37620 has been marked as a duplicate of this bug. ***
Comment 14 Michael Valenta CLA 2003-05-15 08:54:34 EDT
*** Bug 37615 has been marked as a duplicate of this bug. ***
Comment 15 Dani Megert CLA 2003-05-21 10:52:08 EDT
Using I20030520 I still get the .log below. This never happened with older 2.1
builds. I started my dev workspace, clicked "Synchronize CVS Projects" button,
compared some of the files and then did a "Update from Repository".

Do I have to live with these messages now and ignore them? Anything I can do to
get rid of them or should this PR be reopened?

!SESSION Mai 21, 2003 16:37:42.856 ---------------------------------------------
java.version=1.4.1_02
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_CH
Command-line arguments: -update -showlocation -data
c:\eclipse\workspaces\BuildMeister_2_2\plugins -install
file:C:/eclipse/drops/I20030520/
!ENTRY org.eclipse.team.cvs.core 4 -6 Mai 21, 2003 16:37:42.856
!MESSAGE Cannot close connection
!ENTRY org.eclipse.team.cvs.core 4 -6 Mai 21, 2003 16:37:45.871
!MESSAGE Cannot close connection
!ENTRY org.eclipse.team.cvs.core 4 -6 Mai 21, 2003 16:37:54.543
!MESSAGE Cannot close connection
!ENTRY org.eclipse.team.cvs.core 4 -6 Mai 21, 2003 16:38:06.410
!MESSAGE Cannot close connection
!ENTRY org.eclipse.team.cvs.core 4 -6 Mai 21, 2003 16:38:29.103
!MESSAGE Cannot close connection
!ENTRY org.eclipse.team.cvs.core 4 -6 Mai 21, 2003 16:39:03.212
!MESSAGE Cannot close connection
Comment 16 Michael Valenta CLA 2003-05-21 11:15:33 EDT
No, these messages should not be occuring when operations succeed.
Comment 17 Michael Valenta CLA 2003-06-18 12:14:32 EDT
I believe this problem is caused by how we are are closing the socket streams. 
In some cases, Java throws an exception because the socket is already closed. 
Since we are requesting a close, I don't think we care that an exception was 
thrown. Therefore, I have modified the code to ignore the exception unless 
debugging mode is on.