Community
Participate
Working Groups
We have proxy which allows direct access to Eclipse.org servers only. Accessing to other servers requires password-protected proxy usage. 1) So, I download Eclipse SDK 3.4M6, then unpack it and specify update sites for Mylyn and Subversive projects. Now, when I see available features for these projects, I remember that I will install also one external project (M2Eclipse) in order to check our integrations. I press "Cancel" button, then I go to Window->Preferences->General->Network Connections and specify our proxy server for http and ssl, but without username and password. After that I go back to update manager window, select "Available Features", then press button "Manage sites..."->"Add...", enter following URL: http://m2eclipse.sonatype.org/update/ and after pressing "Ok" button Eclipse IDE is freezed (and Explorer also). 2) After that I kill and restart Eclipse IDE, then I try to disable proxy settings in Eclipse preferences but update manager ignores this fact and tries to use proxy while checking for updates. If you think that severity should not be critical please change it to another one.
Can you follow the steps on this page to capture a stack dump when it is frozen: http://wiki.eclipse.org/How_to_report_a_deadlock
Created attachment 94367 [details] Update Manager freeze
Version: 3.4.0 Build id: I20080330-1350 But in this case (for attached thread dump) only Eclipse IDE is freezed, Windows Explorer still alive.
Thanks Alexander for the report. I think I know what's going on here...although not sure of the fix yet as need to consult with the UI people. But see below for analysis. From looking at the thread dump and the source, the UI thread is blocked here: "main" prio=6 tid=0x008e6000 nid=0x15dc in Object.wait() [0x0012e000..0x0012fc48] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x029cccf8> (a [Ljava.lang.Object;) at java.lang.Object.wait(Object.java:485) at org.eclipse.equinox.internal.p2.metadata.repository.ECFMetadataTransport.checkFile(ECFMetadataTransport.java:113) - locked <0x029cccf8> (a [Ljava.lang.Object;) at org.eclipse.equinox.internal.p2.metadata.repository.ECFMetadataTransport.getLastModified(ECFMetadataTransport.java:70) at org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.SimpleMetadataRepositoryFactory.getLocalFile(SimpleMetadataRepositoryFactory.java:66) at org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.SimpleMetadataRepositoryFactory.validateAndLoad(SimpleMetadataRepositoryFactory.java:127) at org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.SimpleMetadataRepositoryFactory.validate(SimpleMetadataRepositoryFactory.java:104) at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.validateRepositoryLocation(MetadataRepositoryManager.java:623) at org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningUtil.validateMetadataRepositoryLocation(ProvisioningUtil.java:68) at org.eclipse.equinox.internal.provisional.p2.ui.dialogs.DefaultMetadataURLValidator.validateRepositoryURL(DefaultMetadataURLValidator.java:59) at org.eclipse.equinox.internal.p2.ui.sdk.externalFiles.MetadataGeneratingURLValidator.validateRepositoryURL(MetadataGeneratingURLValidator.java:35) at org.eclipse.equinox.internal.provisional.p2.ui.dialogs.AddRepositoryDialog$4.run(AddRepositoryDialog.java:197) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67) at org.eclipse.equinox.internal.provisional.p2.ui.dialogs.AddRepositoryDialog.validateRepositoryURL(AddRepositoryDialog.java:195) at org.eclipse.equinox.internal.provisional.p2.ui.dialogs.AddRepositoryDialog.addRepository(AddRepositoryDialog.java:169) at org.eclipse.equinox.internal.provisional.p2.ui.dialogs.AddRepositoryDialog.okPressed(AddRepositoryDialog.java:146) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:472) at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:83) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1002) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3773) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3372) at org.eclipse.jface.window.Window.runEventLoop(Window.java:825) at org.eclipse.jface.window.Window.open(Window.java:801) at org.eclipse.equinox.internal.p2.ui.sdk.RepositoryManipulationDialog$3.runWithEvent(RepositoryManipulationDialog.java:196) at org.eclipse.equinox.internal.p2.ui.sdk.RepositoryManipulationDialog.verticalButtonPressed(RepositoryManipulationDialog.java:153) at org.eclipse.equinox.internal.p2.ui.sdk.RepositoryManipulationDialog$2.handleEvent(RepositoryManipulationDialog.java:134) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:83) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1002) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3773) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3372) at org.eclipse.jface.window.Window.runEventLoop(Window.java:825) at org.eclipse.jface.window.Window.open(Window.java:801) at org.eclipse.equinox.internal.p2.ui.sdk.UpdateAndInstallDialog$5.manipulateRepositories(UpdateAndInstallDialog.java:139) at org.eclipse.equinox.internal.provisional.p2.ui.dialogs.UpdateAndInstallGroup$2.runWithEvent(UpdateAndInstallGroup.java:160) at org.eclipse.equinox.internal.provisional.p2.ui.dialogs.UpdateAndInstallGroup.verticalButtonPressed(UpdateAndInstallGroup.java:316) at org.eclipse.equinox.internal.provisional.p2.ui.dialogs.UpdateAndInstallGroup$6.handleEvent(UpdateAndInstallGroup.java:300) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:83) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1002) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3773) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3372) at org.eclipse.jface.window.Window.runEventLoop(Window.java:825) at org.eclipse.jface.window.Window.open(Window.java:801) at org.eclipse.equinox.internal.p2.ui.sdk.UpdateHandler.openDialog(UpdateHandler.java:55) at org.eclipse.equinox.internal.p2.ui.sdk.UpdateHandler.execute(UpdateHandler.java:46) at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:273) at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476) at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508) at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169) at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:247) at org.eclipse.ui.menus.CommandContributionItem.handleWidgetSelection(CommandContributionItem.java:612) at org.eclipse.ui.menus.CommandContributionItem.access$10(CommandContributionItem.java:598) at org.eclipse.ui.menus.CommandContributionItem$4.handleEvent(CommandContributionItem.java:588) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:83) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1002) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3773) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3372) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2375) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2339) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2205) at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:478) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:473) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:362) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:175) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504) at org.eclipse.equinox.launcher.Main.run(Main.java:1236) The source for this wait is: synchronized (result) { while (!done[0].booleanValue()) { boolean logged = false; try { result.wait(); <-- line 113 } catch (InterruptedException e) { if (!logged) LogHelper.log(new Status(IStatus.WARNING, Activator.ID, "Unexpected interrupt while waiting on ECF browse", e)); //$NON-NLS-1$ } } } This is waiting for notification by the job/thread that does the file transfer browse request and sets the result and done array values. But that thread/job is waiting here: "Worker-2" prio=6 tid=0x24167c00 nid=0xda8 in Object.wait() [0x27fef000..0x27fefd94] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) at org.eclipse.ui.internal.Semaphore.acquire(Semaphore.java:43) - locked <0x029dc790> (a org.eclipse.ui.internal.Semaphore) at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:154) at org.eclipse.swt.widgets.Display.syncExec(Display.java:4196) at org.eclipse.ui.internal.net.auth.UserValidationDialog.getAuthentication(UserValidationDialog.java:55) at org.eclipse.ui.internal.net.auth.NetAuthenticator.getPasswordAuthentication(NetAuthenticator.java:41) at java.net.Authenticator.requestPasswordAuthentication(Unknown Source) - locked <0x047bcce0> (a org.eclipse.ui.internal.net.auth.NetAuthenticator) at sun.net.www.protocol.http.HttpURLConnection$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at sun.net.www.protocol.http.HttpURLConnection.privilegedRequestPasswordAuthentication(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getHttpProxyAuthentication(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.resetProxyAuthentication(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) - locked <0x029cf730> (a sun.net.www.protocol.http.HttpURLConnection) at org.eclipse.ecf.provider.filetransfer.browse.URLFileSystemBrowser.runRequest(URLFileSystemBrowser.java:66) at org.eclipse.ecf.provider.filetransfer.browse.AbstractFileSystemBrowser$DirectoryJob.run(AbstractFileSystemBrowser.java:47) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) This is the job that actually runs the http request, and as part of initiating this request the sun HttpURLConnection code tries to open the password authenticator: java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) at org.eclipse.ui.internal.Semaphore.acquire(Semaphore.java:43) - locked <0x029dc790> (a org.eclipse.ui.internal.Semaphore) at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:154) at org.eclipse.swt.widgets.Display.syncExec(Display.java:4196) at org.eclipse.ui.internal.net.auth.UserValidationDialog.getAuthentication(UserValidationDialog.java:55) at ... I believe what's going on here is that the UI thread (0x008e6000) is waiting for notification from the file transfer browse thread (0x24167c00) (the source above), and the file transfer browser thread is trying to show the proxy authentication UI and cannot because this has to be done synchronously by the UI thread (Display.syncExec). I'm not sure of the appropriate fix here...and need to consult with the authors of the p2 ECFTransport code and the UI experts. But in general we need to make sure that the UI thread does not wait for notification from the ECF file transfer jobs...since on occasion (like HttpURLConnection) the job needs to access UI code for authentication.
I'll take this one. It's pretty trivial to change the add operation to occur in the background, and that is what I will do...we had it synchronous for UI validation purposes but I can separate the validation from the actual add.
(In reply to comment #5) > I'll take this one. It's pretty trivial to change the add operation to occur > in the background, and that is what I will do...we had it synchronous for UI > validation purposes but I can separate the validation from the actual add. > OK. I think I'm also going to change the implementation of the sendBrowseRequest to make this situation less likely...by having the code that could show any UI (e.g. authentication upon connect) be done by the sendBrowseRequest caller thread. This change will be transparent to clients that are 'well behaved' :).
Thanks, Scott (and I meant to thank you tracking this down). Alexander, I'm reducing severity to major. There is an (albeit cumbersome) workaround. You can enable the old update manager using the following technique: Preferences>General>Keys add a key binding for these commands: Find and Install Updates Manage Configuration use those bindings to invoke the old UI. Sorry we have to resort to this, I'll be attaching a patched plug-in for you to try on top of M6.
Alexander, if it's not too much trouble, could you please try the attached patched bundle and see if this resolves the problem?
Created attachment 94409 [details] patched ui jar patched org.eclipse.equinox.p2.ui jar replace the plugin in your plugins directory with this one
I've released the change to HEAD (runs all repo operations in a background job, the URL validation is still synchronous). This is a good change anyway. However keeping this bug open until we hear back that this actually solved Alexander's problem.
I tried attached *.jar, but I have the same problem with the same threads locked at same places. What actions I performed: 1) I renamed original *.jar to *.jar.old 2) I copied downloaded *.jar into the plug-ins folder 3) I started test case described at the top of this report. So, I think the problem is not solved. Otherwise please point me where I wrong. P.S. Is it not possible to run update-site check after closing the addition dialog and then reopen dialog with reasonable message if site is not accessible (in order to remove network interaction from button-press listener)?
Created attachment 94512 [details] New freeze trace
>P.S. >Is it not possible to run update-site check after closing the addition dialog >and then reopen dialog with reasonable message if site is not accessible (in >order to remove network interaction from button-press listener)? This is what we originally did, and we had complaints about the user experience. So the attempt was to provide better feedback rather than fail later. See bug #204184. However it's clear now that this is what we need to do.
(In reply to comment #13) For clarity: ECF's filetransfer API is asynchronous...meaning that the IFileTransferListener handleEvent methods can/are called by arbitrary threads. Because of this bug, I have considered changing the sendBrowseRequest so that the IFileTransferListener handleEvent methods are called synchronously (i.e. during sendBrowseRequest implementation) and so would all be on the same thread (in the case of this bug, on the UI thread). This would eliminate this bug and any others where the UI was waiting for the handleEvent method...which cannot be done because the thread doing the callbacks is trying to present a UI (in this case, the username/password dialog for proxy login). But I don't want to apply such a change because it violates the spirit of the filetransfer API...i.e. by making the sendBrowseRequest/handleEvent synchronous, which is not the specified behavior of the API. other providers (e.g. bittorrent, etc) written to this spec (and possibly calling UI code in their own thread) could also deadlock with a UI that depended upon the synchronous calling. So I would prefer that we work out some patterns for keeping the filetransfer API asynchronous, making sure that the UI can't/doesn't deadlock under these conditions, and providing the best user experience possible for the relevant use cases. Susan, I'll help with that if desired.
I agree that the UI should deal with this. It's pretty trivial, I just have been bogged down in other work. The validation code is already set up with a flag dictating whether repositories should be contacted or not, I just need to reset it to *not* do any repository contact during synchronous validation (so that it's only parsing URL's and such) and then do the real work asynchronously. Basically it means back out of the fix for bug #204184. My intention is to get this in for this week's integration build.
fixed in HEAD >20080407. Validation no longer contacts repositories. This means an invalid repo URL could be accepted by the UI and later when there is an attempt to work with it, an error would be reported. Alexander, can you please verify this in tomorrow's I-build?
Hello Susan, I checked the build with ID I20080408-1636 and get the following trace when trying to access Update Manager. Could you please specify which build I should try? java.lang.NullPointerException at org.eclipse.equinox.internal.p2.ui.sdk.UpdateAndInstallDialog.createAvailableIUsPage(UpdateAndInstallDialog.java:278) at org.eclipse.equinox.internal.p2.ui.sdk.UpdateAndInstallDialog.createTabFolder(UpdateAndInstallDialog.java:190) at org.eclipse.equinox.internal.p2.ui.sdk.UpdateAndInstallDialog.createDialogArea(UpdateAndInstallDialog.java:123) at org.eclipse.jface.dialogs.Dialog.createContents(Dialog.java:760) at org.eclipse.jface.window.Window.create(Window.java:431) at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089) at org.eclipse.jface.window.Window.open(Window.java:790) at org.eclipse.equinox.internal.p2.ui.sdk.UpdateHandler.openDialog(UpdateHandler.java:55) at org.eclipse.equinox.internal.p2.ui.sdk.UpdateHandler.execute(UpdateHandler.java:46) at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:273) at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476) at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508) at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169) at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:247) at org.eclipse.ui.menus.CommandContributionItem.handleWidgetSelection(CommandContributionItem.java:612) at org.eclipse.ui.menus.CommandContributionItem.access$10(CommandContributionItem.java:598) at org.eclipse.ui.menus.CommandContributionItem$4.handleEvent(CommandContributionItem.java:588) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:83) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1002) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3773) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3372) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2351) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2315) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2181) at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:477) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:472) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:112) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:375) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:175) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504) at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
There will be an integration rebuild this morning at 8:00am east coast time to deal with the problem you are seeing. That would be the build to try. Sorry for the delay...
Hello Susan, In Version: 3.4.0 Build id: I20080410-1022 the problem disappeared. Thank you for fixing it.
Thanks for checking, Alexander.
*** Bug 228217 has been marked as a duplicate of this bug. ***