Community
Participate
Working Groups
org.eclipse.core.internal.resources.ResourceException()[567]: java.io.EOFException at java.io.DataInputStream.readUTF(DataInputStream.java(Compiled Code)) at java.io.DataInputStream.readUTF(DataInputStream.java(Compiled Code)) at org.eclipse.core.internal.dtree.DataTreeReader.readNode(DataTreeReader.java(Compiled Code)) at org.eclipse.core.internal.dtree.DataTreeReader.readTree(DataTreeReader.java:121) at org.eclipse.core.internal.watson.ElementTreeReaderImpl_1.readDelta(ElementTreeReaderImpl_1.java:39) at org.eclipse.core.internal.watson.ElementTreeReader.readDelta(ElementTreeReader.java:87) at org.eclipse.core.internal.watson.ElementTreeReaderImpl_1.readDeltaChain(ElementTreeReaderImpl_1.java:75) at org.eclipse.core.internal.watson.ElementTreeReader.readDeltaChain(ElementTreeReader.java:97) at org.eclipse.core.internal.resources.WorkspaceTreeReader.readTrees(WorkspaceTreeReader.java:210) at org.eclipse.core.internal.resources.WorkspaceTreeReader.readTree(WorkspaceTreeReader.java:149) at org.eclipse.core.internal.resources.SaveManager.restoreTree(SaveManager.java:703) at org.eclipse.core.internal.resources.SaveManager.restore(SaveManager.java:487) at org.eclipse.core.internal.resources.SaveManager.startup(SaveManager.java:988) at org.eclipse.core.internal.resources.Workspace.startup(Workspace.java:1311) at org.eclipse.core.internal.resources.Workspace.open(Workspace.java:1122) at org.eclipse.core.resources.ResourcesPlugin.startup(ResourcesPlugin.java:141) at org.eclipse.core.internal.plugins.PluginDescriptor$1.run(PluginDescriptor.java:647) at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:758) at org.eclipse.core.internal.plugins.PluginDescriptor.internalDoPluginActivation(PluginDescriptor.java:659) at org.eclipse.core.internal.plugins.PluginDescriptor.doPluginActivation(PluginDescriptor.java:204) at org.eclipse.core.internal.plugins.PluginClassLoader.activatePlugin(PluginClassLoader.java:52) at org.eclipse.core.internal.plugins.PluginClassLoader.findClassParentsSelf(PluginClassLoader.java:128) at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass(DelegatingURLClassLoader.java:624) at org.eclipse.core.internal.boot.DelegatingURLClassLoader.access$0(DelegatingURLClassLoader.java:618) at org.eclipse.core.internal.boot.DelegatingURLClassLoader$DelegateLoader.loadClass(DelegatingURLClassLoader.java:60) at org.eclipse.core.internal.boot.DelegatingURLClassLoader.findClassPrerequisites(DelegatingURLClassLoader.java:359) at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass(DelegatingURLClassLoader.java:632) at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass(DelegatingURLClassLoader.java:604) at java.lang.ClassLoader.loadClass(ClassLoader.java:257) at java.lang.Class.newInstance0(Native Method) at java.lang.Class.newInstance(Class.java:254) at org.eclipse.core.internal.plugins.PluginDescriptor.createExecutableExtension(PluginDescriptor.java:156) at org.eclipse.core.internal.plugins.PluginDescriptor.createExecutableExtension(PluginDescriptor.java:185) at org.eclipse.core.internal.plugins.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:97) at org.eclipse.core.internal.runtime.InternalPlatform.loaderGetRunnable(InternalPlatform.java:423) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.internal.boot.InternalBootLoader.getRunnable(InternalBootLoader.java:468) at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:811) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:285) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:433) at org.eclipse.core.launcher.Main.main(Main.java:306) 4 org.eclipse.core.resources 567 Problems reading workspace tree. java.io.EOFException at java.io.DataInputStream.readUTF(DataInputStream.java(Compiled Code)) at java.io.DataInputStream.readUTF(DataInputStream.java(Compiled Code)) at org.eclipse.core.internal.dtree.DataTreeReader.readNode(DataTreeReader.java(Compiled Code)) at org.eclipse.core.internal.dtree.DataTreeReader.readTree(DataTreeReader.java:121) at org.eclipse.core.internal.watson.ElementTreeReaderImpl_1.readDelta(ElementTreeReaderImpl_1.java:39) at org.eclipse.core.internal.watson.ElementTreeReader.readDelta(ElementTreeReader.java:87) at org.eclipse.core.internal.watson.ElementTreeReaderImpl_1.readDeltaChain(ElementTreeReaderImpl_1.java:75) at org.eclipse.core.internal.watson.ElementTreeReader.readDeltaChain(ElementTreeReader.java:97) at org.eclipse.core.internal.resources.WorkspaceTreeReader.readTrees(WorkspaceTreeReader.java:210) at org.eclipse.core.internal.resources.WorkspaceTreeReader.readTree(WorkspaceTreeReader.java:149) at org.eclipse.core.internal.resources.SaveManager.restoreTree(SaveManager.java:703) at org.eclipse.core.internal.resources.SaveManager.restore(SaveManager.java:487) at org.eclipse.core.internal.resources.SaveManager.startup(SaveManager.java:988) at org.eclipse.core.internal.resources.Workspace.startup(Workspace.java:1311) at org.eclipse.core.internal.resources.Workspace.open(Workspace.java:1122) at org.eclipse.core.resources.ResourcesPlugin.startup(ResourcesPlugin.java:141) at org.eclipse.core.internal.plugins.PluginDescriptor$1.run(PluginDescriptor.java:647) at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:758) at org.eclipse.core.internal.plugins.PluginDescriptor.internalDoPluginActivation(PluginDescriptor.java:659) at org.eclipse.core.internal.plugins.PluginDescriptor.doPluginActivation(PluginDescriptor.java:204) at org.eclipse.core.internal.plugins.PluginClassLoader.activatePlugin(PluginClassLoader.java:52) at org.eclipse.core.internal.plugins.PluginClassLoader.findClassParentsSelf(PluginClassLoader.java:128) at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass(DelegatingURLClassLoader.java:624) at org.eclipse.core.internal.boot.DelegatingURLClassLoader.access$0(DelegatingURLClassLoader.java:618) at org.eclipse.core.internal.boot.DelegatingURLClassLoader$DelegateLoader.loadClass(DelegatingURLClassLoader.java:60) at org.eclipse.core.internal.boot.DelegatingURLClassLoader.findClassPrerequisites(DelegatingURLClassLoader.java:359) at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass(DelegatingURLClassLoader.java:632) at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass(DelegatingURLClassLoader.java:604) at java.lang.ClassLoader.loadClass(ClassLoader.java:257) at java.lang.Class.newInstance0(Native Method) at java.lang.Class.newInstance(Class.java:254) at org.eclipse.core.internal.plugins.PluginDescriptor.createExecutableExtension(PluginDescriptor.java:156) at org.eclipse.core.internal.plugins.PluginDescriptor.createExecutableExtension(PluginDescriptor.java:185) at org.eclipse.core.internal.plugins.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:97) at org.eclipse.core.internal.runtime.InternalPlatform.loaderGetRunnable(InternalPlatform.java:423) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.internal.boot.InternalBootLoader.getRunnable(InternalBootLoader.java:468) at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:811) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:285) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:433) at org.eclipse.core.launcher.Main.main(Main.java:306) Log: Fri Sep 21 13:33:06 EDT 2001 4 org.eclipse.core.runtime 2 Plugin org.eclipse.ui was unable to instantiate class org.eclipse.ui.internal.Workbench. org.eclipse.core.internal.boot.DelegatingLoaderException: org.eclipse.core.runtime.CoreException: Problems encountered starting up plug-in: org.eclipse.core.resources. at org.eclipse.core.internal.plugins.PluginDescriptor.internalDoPluginActivation(PluginDescriptor.java:661) at org.eclipse.core.internal.plugins.PluginDescriptor.doPluginActivation(PluginDescriptor.java:204) at org.eclipse.core.internal.plugins.PluginClassLoader.activatePlugin(PluginClassLoader.java:52) at org.eclipse.core.internal.plugins.PluginClassLoader.findClassParentsSelf(PluginClassLoader.java:128) at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass(DelegatingURLClassLoader.java:624) at org.eclipse.core.internal.boot.DelegatingURLClassLoader.access$0(DelegatingURLClassLoader.java:618) at org.eclipse.core.internal.boot.DelegatingURLClassLoader$DelegateLoader.loadClass(DelegatingURLClassLoader.java:60) at org.eclipse.core.internal.boot.DelegatingURLClassLoader.findClassPrerequisites(DelegatingURLClassLoader.java:359) at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass(DelegatingURLClassLoader.java:632) at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass(DelegatingURLClassLoader.java:604) at java.lang.ClassLoader.loadClass(ClassLoader.java:257) at java.lang.Class.newInstance0(Native Method) at java.lang.Class.newInstance(Class.java:254) at org.eclipse.core.internal.plugins.PluginDescriptor.createExecutableExtension(PluginDescriptor.java:156) at org.eclipse.core.internal.plugins.PluginDescriptor.createExecutableExtension(PluginDescriptor.java:185) at org.eclipse.core.internal.plugins.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:97) at org.eclipse.core.internal.runtime.InternalPlatform.loaderGetRunnable(InternalPlatform.java:423) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.internal.boot.InternalBootLoader.getRunnable(InternalBootLoader.java:468) at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:811) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:285) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:433) at org.eclipse.core.launcher.Main.main(Main.java:306) NOTES: OT (21/09/2001 2:06:51 PM) workspace.zip is available on Q:\viper\problem_reports\1GKEZ5V JohnA (9/24/2001 10:38:14 AM) The core .tree file has been corrupted. If an OutOfMemoryError occurred as the workbench was being saved, the file on disk will be corrupt. His tree file is 123.tree, but the safetable file says tree=124. So if it failed while trying to write tree 124, shouldn't it revert to trying to load the old 123.tree instead? RTP (10/1/01 9:55:41 AM) Sounds like a good solution for this case. Should look at how much we can trust in this numbering sequence.
PRODUCT VERSION: 135
Was this work done by the recent work involving better failure case when starting the workspace with bogus files? John, please investigate.
No, I did not fix the corrupt tree file case. The reasoning is partly that if the .tree file is corrupt, you're dead. We could create a new tree, but the user would be left with an empty workspace... perhaps this is better than not starting at all. Ideally we could use the safetable to grab the previously saved tree, if available (ie., always leave around current tree plus previous tree). But then, what happens if the safetable is corrupt?
*** Bug 14123 has been marked as a duplicate of this bug. ***
Investigate options for robust startup for bogus safe-table file and tree.
*** Bug 18008 has been marked as a duplicate of this bug. ***
*** Bug 23932 has been marked as a duplicate of this bug. ***
*** Bug 27774 has been marked as a duplicate of this bug. ***
*** Bug 28826 has been marked as a duplicate of this bug. ***
*** Bug 29431 has been marked as a duplicate of this bug. ***
There is a thread on the newsgroup about this, and it seems pretty clear from this bug report that this is not easy to solve at its root. Perhaps as a workaround, core.resources could provide a "Recover Projects" facility that would read an old workspace's .projects directory and rebuild those projects in the new workspace. They would still lose other metadata, but most people can probably live with resetting preferences. This is an alternative to "File-->Import-->Existing Project" many times. Obviously a better solution would be for each plugin to have the ability to recover what metadata it can from another workspace, but that is well beyond the scope of this bug. -Andrew
What about saving a checksup of key files (MD5 could do) to detect that they are not what they are supposed to be? and if this is indeed the case, just recover whatever possible?
We actually have started a tool which does what you describe above. You point it at a corrupt workspace and it tries to rebuild it the best it can. Reviewing this code and releasing this tool is on the "to-do" list...
The 'new' point in my comment (or maybe not new), is a way to detect a corrupted workspace automatically. for this, you need support from the core (to keep a the checksum every time it saves).
I think there are a few things that might be done to make this less traumatic for the user if he happens to stumble upon an OOM error (which seem to be the most common cause of workspace corruptions, based on the bug reports listed above). 1) Making shutdown as tight as possible, not requiring persisting of so much critical data. I don't know the internals, but perhaps more of the info can be persisted "as you go" instead of waiting for workbench shutdown. Possibly in the background. The goal should be to get shutdown as small as possible, so VM failure at that point is not so tragic. 2) A fallback to "last known good" configuration (as has been discussed in this and other bugs) could be implemented in Eclipse startup. The process to recover a workspace that has bad .tree and/or .snap files is pretty simple to fix without losing a lot of data, but it should be built in as much as possible. 3) In lieu of the above, a little more helpful logging pointing to the exact file(s) that are corrupt is needed, as well as some prominent documentation about how to recover from a corrupt workspace. It should not be so difficult for users to learn what to do to get back to work.
*** Bug 34321 has been marked as a duplicate of this bug. ***
Increasing priority so this bug doesn't get lost. (like it already seems to have for 2.1) For RC3 investigate any short-term fixes to help the user when encountering this problem. Find more definate solution for 2.2.
The problem is that the master table is saved in the finally block of SaveManager.save(); So this looks like what is happening: - start saving workspace tree (1.tree is ok and on disk, we are saving 2.tree) - get an exception saving 2.tree so this file is now only half there - run the finally block - removes 1.tree - writes master table which has reference to 2.tree So on startup we read the master table, it tells us to read 2.tree and then we blow up. Ouch. We need to refactor the code so if we have a failure when saving, we do not delete any files. We should ensure that all the old files are there so we can at least try to use them to bring the platform up. Unfortuanatly too risky to make changes in this area for 2.1.
*** Bug 35201 has been marked as a duplicate of this bug. ***
>Increasing priority so this bug doesn't get lost. (like it already seems to >have for 2.1) hmm, bugs of this severity should not simply get lost
*** Bug 36626 has been marked as a duplicate of this bug. ***
Fixed. Cleanup code has been moved out of the finally block. This means cleanup of unused files will not happen on abormal save termination, so the valid tree file will not be deleted. Also moved the code to commit the master table immediately after writing the tree, otherwise an error between those operations would result in a master table pointing to the wrong tree. Here is the revised timeline from DJ's comment: - start saving workspace tree (1.tree is ok and on disk, we are saving 2.tree) - get an exception saving 2.tree so this file is now only half there - abort the save immediately Now, the master table still has a reference to 1.tree, and we have 1.tree and 2.tree on disk. On next startup, 1.tree will be read, and on next shutdown, 2.tree will be overwritten with the next valid save state.
*** Bug 33138 has been marked as a duplicate of this bug. ***
*** Bug 39131 has been marked as a duplicate of this bug. ***
*** Bug 40516 has been marked as a duplicate of this bug. ***
*** Bug 42954 has been marked as a duplicate of this bug. ***
*** Bug 45216 has been marked as a duplicate of this bug. ***