Community
Participate
Working Groups
JobManager is suspended during workbench startup preventing the use of the jobs framework during early init stage (e.g. you can't rely on Job.join as it will return immediately even if the job is waiting or waiting, ie not finished). It blocks me from using the job framework in https://git.eclipse.org/r/#/c/73007/. This suspension has been introduced in 2004 in commit http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=57be9b9142ddec8b1b1cf2a0f68bf028ddf633b6 for no obvious reason. Does anyone know the reason of the suspension? In case nobody knows why, I will submit a patch removing it shortly.
New Gerrit change created: https://git.eclipse.org/r/93655
Disabling job manager during startup may have positive impact on startup time by reducing resource consumption and class loading during early stages of the startup sequence. In its current form it doesn't achieve this goal since jobs may start running before the job manager is suspended. Suspension of JobManager while jobs are already running is very dangerous since it causes Job.join and JobGroup.join to violate their regular contracts. Complete removal of job manager suspension is quite risky since it has a potential of unmasking many dormant bugs. A safer alternative would be to make sure the the job manager is suspended before the first job is scheduled.
New Gerrit change created: https://git.eclipse.org/r/93662
I tried to suspend the job manager early during startup (https://git.eclipse.org/r/93662) and got: java.lang.ExceptionInInitializerError at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getURIConverter(ResourceSetImpl.java:499) at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:369) at org.eclipse.e4.ui.internal.workbench.ResourceHandler.getResource(ResourceHandler.java:286) at org.eclipse.e4.ui.internal.workbench.ResourceHandler.loadResource(ResourceHandler.java:262) at org.eclipse.e4.ui.internal.workbench.ResourceHandler.loadMostRecentModel(ResourceHandler.java:169) at org.eclipse.e4.ui.internal.workbench.swt.E4Application.loadApplicationModel(E4Application.java:378) at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createE4Workbench(E4Application.java:253) at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:614) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:145) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) at org.eclipse.equinox.launcher.Main.run(Main.java:1499) at org.eclipse.equinox.launcher.Main.main(Main.java:1472) Caused by: java.lang.IllegalStateException: Workspace is closed. at org.eclipse.core.resources.ResourcesPlugin.getWorkspace(ResourcesPlugin.java:447) at org.eclipse.emf.ecore.plugin.EcorePlugin.getWorkspaceRoot(EcorePlugin.java:1131) at org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl.<clinit>(ExtensibleURIConverterImpl.java:393) ... 25 more It looks like the job.join call in ResourcesPlugin.getWorkspace() is unsafe due to the job manager suspension. It looks like the change made in bug 501997 has to be rolled back.
(In reply to Sergey Prigogin from comment #4) This is the same problem as the one described in https://bugs.eclipse.org/bugs/show_bug.cgi?id=507092#c19
Change https://git.eclipse.org/r/93662 works fine after asynchronous workspace initialization (bug 501997) has been rolled back.
(In reply to Sergey Prigogin from comment #2) > Complete removal of job manager suspension is quite risky since it has a > potential of unmasking many dormant bugs. A safer alternative would be to > make sure the the job manager is suspended before the first job is scheduled. +1.
I propose that we merge change https://git.eclipse.org/r/93662 that moves suspension of the job manager earlier in the startup sequence. After that the effect of the suspension on the startup time should be investigated and, if there is no noticeable difference, the suspension can be removed soon after the Oxygen release.
(In reply to Sergey Prigogin from comment #8) > I propose that we merge change https://git.eclipse.org/r/93662 that moves > suspension of the job manager earlier in the startup sequence. Looks good. Thanks Sergey. I'm abandoning mine.
(In reply to Mikaël Barbero from comment #9) > (In reply to Sergey Prigogin from comment #8) > > I propose that we merge change https://git.eclipse.org/r/93662 that moves > > suspension of the job manager earlier in the startup sequence. > > Looks good. Thanks Sergey. I'm abandoning mine. Please don't abandon it yet. It still makes sense to investigate if the suspension is beneficial for the startup time or not.
Gerrit change https://git.eclipse.org/r/93662 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=eaa01c93d9bd48f44b734d1e222871078e641e61
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.