Community
Participate
Working Groups
Eclipse hang saving workspace - workbench state on exit
Happens frequently on my windows 7. Have to kill E using Task manager.
Please provide exact version of your Eclipse. Please create thread dump with jstack at the time Eclipse hangs and attach it here.
Created attachment 263587 [details] jstack thread dump of hanging eclipse at close
Version: Mars.2 Release (4.5.2) Build id: 20160218-0600
Looks like Mylyn does some weird things and hangs in ExternalizationManager, see "ModalContext" #1299 prio=6 os_prio=0 tid=0x000000002008d000 nid=0x33c8 in Object.wait() [0x000000001d5ee000] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) at org.eclipse.core.internal.jobs.Semaphore.acquire(Semaphore.java:39) - locked <0x00000000edee7ff0> (a org.eclipse.core.internal.jobs.Semaphore) at org.eclipse.core.internal.jobs.JobManager.join(JobManager.java:909) at org.eclipse.core.internal.jobs.InternalJob.join(InternalJob.java:341) at org.eclipse.core.runtime.jobs.Job.join(Job.java:458) at org.eclipse.mylyn.internal.tasks.core.externalization.ExternalizationManager.saveNow(ExternalizationManager.java:162) at org.eclipse.mylyn.internal.tasks.core.externalization.ExternalizationManager.stop(ExternalizationManager.java:143) at org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin$5.saving(TasksUiPlugin.java:604) at org.eclipse.core.internal.resources.SaveManager.executeLifecycle(SaveManager.java:387) at org.eclipse.core.internal.resources.SaveManager$1.run(SaveManager.java:196) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.resources.SaveManager.broadcastLifecycle(SaveManager.java:199) at org.eclipse.core.internal.resources.SaveManager.save(SaveManager.java:1184) at org.eclipse.core.internal.resources.Workspace.save(Workspace.java:2270) at org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor$4.run(IDEWorkbenchAdvisor.java:453) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)
This is reminiscent of bug 392794 but seems to be different. But it looks like it could be a bug in the jobs framework again - this code should not hang unless the saveJob is running, but it is not in the thread dump: bc. saveJob.schedule(); saveJob.wakeUp(); saveJob.join();
Created attachment 263693 [details] new example of hanging eclipse C:\Java\eclipse-java-mars-R-win32-x86_64\eclipse\configuration>more config.ini #This configuration file was written by: org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxFwConfigFileParser #Wed Aug 17 15:01:39 CEST 2016 org.eclipse.update.reconcile=false eclipse.p2.profile=epp.package.java osgi.instance.area.default=@user.home/workspace osgi.framework=file\:plugins/org.eclipse.osgi_3.10.102.v20160118-1700.jar equinox.use.ds=true eclipse.buildId=4.5.2.M20160212-1500 osgi.bundles=reference\:file\:org.eclipse.equinox.simpleconfigurator_1.1.100.v20150423-1455.jar@1\:start org.eclipse.equinox.simpleconfigurator.configUrl=file\:org.eclipse.equinox.simpleconfigurator/bundles.info eclipse.product=org.eclipse.platform.ide osgi.splashPath=platform\:/base/plugins/org.eclipse.platform osgi.framework.extensions=reference\:file\:org.eclipse.osgi.compatibility.state_1.0.100.v20150402-1551.jar,reference\:file\:org.eclipse.equinox.weaving.hook_1.1.100.v20140821-1915.jar,reference\:file\:org.eclipse.fx.osgi_2.1.0.201508240501.jar osgi.bundles.defaultStartLevel=4 eclipse.application=org.eclipse.ui.ide.workbench eclipse.p2.data.area=@config.dir/../p2/ C:\Java\eclipse-java-mars-R-win32-x86_64\eclipse\configuration>
Created attachment 266841 [details] Eclipse STS 3.8.3 saving workspace freeze I have the same problem on Eclipse STS 3.8.3 (based on Eclipse 4.6.2). The stack is similar to those reported before.
Created attachment 267801 [details] Shutdown hangs, jstack output
I experienced the same issue today for the first time. I run Eclipse neon.3. I see two threads waiting at org.eclipse.core.runtime.jobs.Job.join(Job.java:524) "ModalContext" and "Worker-282"
Created attachment 268393 [details] Configuration details, Oxygen for Committers Reproduced on Eclipse IDE for Eclipse Committers Version: Oxygen Release Milestone 6 (4.7.0 M6) Build id: 20170316-1528 Attached is configuration dump
Created attachment 268572 [details] Jstack dump of Eclipse shutdown hung saving workbench state
Comment on attachment 268572 [details] Jstack dump of Eclipse shutdown hung saving workbench state 1st time posting - hope this is correct and useful, SORRY!
I've experienced this many times before, ussualy every day! I currently haver Neon.3 but I experenced the problem with older releases as well. Hints: I normally have Eclipse open the whole day (even overnight) and have 3-5 huge Java projects in my worskspace. Just now it happened that I was debugging, left the computer for 2 hours. Then cam back and Open Type nor Open Resource stopped working (type something but nothing found). Stopping the application from the Debug view (stop button) didn't stop the project. Thease are the typical symptoms. That's when I needed to restart Eclise. And then the Save Workspace dialog appers and stops in about 1/3 and hangs indefinitely. So I kill Eclipse and strart it again. What's totally annonying that hitting Ctrl+B (build all) starts Clean & build of the last project, which takes some time!
Created attachment 270700 [details] Thread dump Thread dump made from visualvm
Created attachment 273565 [details] Eclipse STS 3.9.1 / Eclipse 4.7.1a saving workspace freeze I observe the same behaviour as in comment #14. It seems to be related to the amount of memory that Eclipse JVM consumes, because I don't observe problem when closing Eclipse after short period of working in it (e.g. one day). Attaching thread dump for Eclipse STS 3.9.1 build on Eclipse 4.7.1a. OpenJDK9 x64 build 9-internal+0-adhoc..openjdk Command line: javaw.exe -Dosgi.requiredJavaVersion=1.8 --add-modules=ALL-SYSTEM -Dosgi.module.lock.timeout=10 -Dorg.eclipse.swt.browser.IEVersion=10001 -Xmx3000m -jar .../org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar -os win32 -ws win32 -arch x86_64 -showsplash -launcher ...\STS.exe -name STS --launcher.library .../org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.550.v20170928-1359\eclipse_1629.dll -startup .../org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar --launcher.overrideVmargs -exitdata 1554_68 -product org.springsource.sts.ide -vm .../bin/javaw.exe -vmargs -Dosgi.requiredJavaVersion=1.8 --add-modules=ALL-SYSTEM -Dosgi.module.lock.timeout=10 -Dorg.eclipse.swt.browser.IEVersion=10001 -Xmx3000m -jar .../org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar javaw memory (private working working set): 3663572K ~ 3.5GB
I'm experiencing this problem as well. Is this on anybody's radar to get fixed?
Mylyn has been restructured, and our issue tracking has moved to GitHub [1]. We are closing ~14K Bugzilla issues to give the new team a fresh start. If you feel that this issue is still relevant, please create a new one on GitHub. [1] https://github.com/orgs/eclipse-mylyn