Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 328863

Summary: .snap file of a second workspace grows up to 44 GB
Product: [Eclipse Project] Platform Reporter: info
Component: ResourcesAssignee: Platform-Resources-Inbox <platform-resources-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: remy.suen, sptaszkiewicz, yevshif
Version: 3.6   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description info CLA 2010-10-27 13:20:31 EDT
Build Identifier: 20100617-1415

On a Linux PC I launched a second Eclipse IDE from Gnome desktop and I was able to create a new workspace 'workspace_1' at home which was mapped to a NFS server disk. I created a few C++ projects from existing sources - same as in my main workspace - and also made some corrections on these projects (I deleted one project an recreated it using another root path). Then I worked a few hours switching between the two instances of the IDE where the second only was used for lookup purposes. I didn't close the IDE's over night and next day (maybe 20 hours after creating the new workspace) an administrator told me that the .snap file in workspace_1/.metadata/.plugins/org.eclipse.core.resources
has grown up to 44 GB. He had to delete the file because the disk was full because of that.

Reproducible: Didn't try

Steps to Reproduce:
1. Launch Eclipse IDE a second time and create a second workspace folder
2. Try to create existing projects from sources - same as in the first workspace
3. Delete projects and create them again using a different root folder
4. Let both IDE's open for a time and watch .snap file of the second workspace
Comment 1 Doug Schaefer CLA 2010-10-27 14:13:39 EDT
What's a .snap file? It's not something the CDT produces. The plugin name under the metadata should give you a hint of where this really belongs.
Comment 2 info CLA 2010-10-27 14:50:15 EDT
Thank you for the quick response.

Does the path 

    workspace_1/.metadata/.plugins/org.eclipse.core.resources/.snap

tell to which plugin the .snap file belongs?
Comment 3 info CLA 2010-10-27 15:05:06 EDT
I googled for .snap file and found 

"*.snap files represent the changes in workspace state of the IDE during the runtime. This is mostly for eclipse crash recovery plan. When a crash happens these files are used to recover the state fo eclipse workspace."

at 

http://stackoverflow.com/questions/2026502/what-are-snap-files-in-eclipse
Comment 4 Doug Schaefer CLA 2010-10-27 15:53:26 EDT
It would be somewhere in the Eclipse Platform. org.eclipse.core.resources is the plug-in name.
Comment 5 Szymon Ptaszkiewicz CLA 2011-08-22 07:57:42 EDT
What do you mean by "I created a few C++ projects from existing sources"? Did you attach the same projects from the same location to another workspace or you copied the contents of the projects to the new workspace?

44GB in 20 hours means that your .snap was growing with average speed 640 KB/s. I tried to prepare a test to check if it is possible but I could not get even half of that speed. Since .snap is usually much smaller than 1 MB in total, there must have been some very extensive job running over night that was performing workspace operations. Do you know what it could be (build, download, repository synchronization, etc)? What was your CPU and network usage during that night?
Comment 6 info CLA 2011-08-22 08:54:54 EDT
Thanks for your response.

It was the same source trees than in other workspace. One tree was on a server and checked out from another server. A second tree with the whole framework probably has 10,000 files or more. It was copied to a local disk for performance reasons. I wanted to have two Eclipse open on two screens both operating on the same sources but one was used read-only. 

The CPU was a two-years old Intel Dual Core - probably 3.0 GHz - running with a Redhat linux. I don't know about network traffic but I created the second workspace in the afternoon and next day shortly before noon I was informed that my PC had produced a 44 GB logfile on a common network drive - shared by about 20 people - what made the drive full (and produced serious performance issues for the whole crew). The file was already deleted, so I could not look into but I got a report of the directory listing where I could verify the huge size of the file. In the night no one was working and the performance problems already were reported from colleagues which worked at 8 a.m. So I assume that the disk nearly was full already in the morning. I myself came at 10 and had problems to access the server but not to access my local disk. Also I didn't remind of CPU issues though that could be hidden by the two cores of the CPU.

No, I don't know the reasons for the 44 GB but as I had two Eclipse programs open both trying to analyze huge project trees, I assume those automatical activities were the only one what happens in the night on the computer. I didn't start a compile job or other things. The only reason why I didn't close the Eclipse programs was the poor performance on program start which could last up to 10 minutes. 

After that I never tried (dared) to start a second instance of Eclipse again. The case seriously damaged my reputation as a professional and I had no motivation to run a risk again.
Comment 7 Szymon Ptaszkiewicz CLA 2014-07-17 10:36:08 EDT
We were never able to reproduce this problem. Please reopen if you can reproduce the problem with Luna.