Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 198282 - Update manager hangs when site is unavailable
Summary: Update manager hangs when site is unavailable
Status: RESOLVED DUPLICATE of bug 18598
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Update (deprecated - use Eclipse>Equinox>p2) (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Platform-Update-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-30 12:24 EDT by Jacob Weber CLA
Modified: 2008-04-14 13:26 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 Jacob Weber CLA 2007-07-30 12:24:31 EDT
I selected Help > Software Updates > Find and Install, and chose Search for Updates. It automatically chose mirror sites, but one of them must have been down, because it hung on "Checking [United States] ibiblio (http) ...". It should probably stop after a few seconds and try a different site. Anyway, I clicked Cancel, and the Cancel button became disabled, but the Update Manager progress dialog didn't disappear -- there seemed to be no way to remove it. Finally, once I clicked "Run in Background", it stopped and I got the alert that there are no updates available.
Comment 1 KP CLA 2008-01-18 05:07:08 EST
Indeed, very user unfriendly. It may take half an hour, before one actually has to conclude the entire update checking fails. (Because even after the first update mirrors have been found, you don't have the option to continue at least with those updates, but the entire update just quits -- that is, if cancelling works).

Note, I've seen some similar bug report around here...
Comment 2 KP CLA 2008-01-18 05:10:09 EST
see also bug 165311 
Comment 3 KP CLA 2008-01-18 05:21:31 EST
seems a frequent issue, see also bug 166810 , bug 147803 ,...
Comment 4 Dejan Glozic CLA 2008-01-18 10:09:40 EST
Networking support in java.net does not give us sufficient control over timeouts to be able to cancel such a connection. With a stalled server, java.net will timeout after a relatively short period of time (can be controlled by java.properties) and we return to business. However, when a server opens a connection and never comes back (as it sometimes happens in faulty DNS servers), Java timeout does not work. There is no command to force a connection termination (one can only do it at the socket level, not at the java.net package level).

I hope our friends at the Equinox provisioning (P2) will have more sophisticated networking code that will provide for reliable termination of unresponsive connections.
Comment 5 KP CLA 2008-01-21 06:44:42 EST
see also the suggestion from bug 145235 : the entire update should not fail, but it should rather skip the failed servers/mirrors/plugins/... and continue with the servers that are found, and offer the user the updates that could be found...
Comment 6 Leo Lipelis CLA 2008-02-13 20:16:25 EST
First, it is terrible how you have to wait for such a long time to Cancel an update that's not going well.

Second, it is not acceptable to say "Java does not provide a way to cancel network connections."  A solution must be found no matter what.  I suggest that the a network thread with a "Cancel" flag be swept under the rug, so to speak.  Let it hang there, but make it so that the user can open new connections in its place.  If the originally canceled connection comes back to life, simply disregard any input from it and kill it.  Just because Java doesn't allow you to kill a connection at socket level doesn't mean it cannot be managed intelligently such that from the user's point of view there is no problem.

The problem is not that sockets cannot be killed, the problem is that Eclipse insists on completely cleaning up a connection before opening another one of the same type.  Ideally you should be able to control the socket, I agree.  However the world is not idea and a solution needs to be provided anyway.
Comment 7 Leo Lipelis CLA 2008-02-13 20:18:34 EST
As a work around you can also start all network connection from a separate instance of JRE and then kill the entire JRE if the connection refuses to die (the same way problems with ant builds have been handled in the past).
Comment 8 John Arthorne CLA 2008-04-14 13:26:10 EDT

*** This bug has been marked as a duplicate of bug 18598 ***