Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Re-pursuing problem with Eclipse on Ubuntu VM "losing" all imported projects
Re-pursuing problem with Eclipse on Ubuntu VM "losing" all imported projects [message #1729877] Tue, 19 April 2016 21:23 Go to next message
David M. Karr is currently offline David M. KarrFriend
Messages: 800
Registered: July 2009
Senior Member
For quite a while now, I've been hampered with a very annoying problem in my development environment.

My laptop is CentOS7.2. I primarily work on an Eclipse plugin codebase. I have the code checked out in a git repo, and my Eclipse workspace references the projects defined there. In order to step through the code safely without locking up the machine (the app sometimes renders menus), I run an Ubuntu VM that also runs Eclipse, and I just import all of the projects (not copy) residing in the git repo on the main box. I use a "shared folder" so I can access the host's files from the VM.

From that Eclipse instance on the VM, I run an "Eclipse Application" launch config, with the "debug" VM parameters. I connect to that instance from the Eclpse instance on the main CentOS box.

This generally works fine.

However, I've found that it's risky to bring down the Eclipse instance on the VM (not the "test instance", but the one that I imported the projects into), because quite often when I restart that Eclipse instance, the window comes up and shows zero projects. If when I last had it open I was viewing files from those projects, the editor views just show errors, saying the files don't exist anymore. Many times I've checked at that moment to see if the path to the shared folder is invalid, but it never is. I can clearly see all the project files in that path.

At this point, what I do is simply switch to a new workspace, reimport all of the projects, set my target platform, recreate the run configuration, and do other little cleanup steps that I have to do every time I recreate the workspace, which I've done numerous times now.

Also note that this first started happening with my Ubuntu 14.04 VM, running VirtualBox 4. I am now seeing the same symptom with a different Ubuntu 15.10 VM, and VirtualBox 5. I generally use Mars.2, but I tried the latest Neon release at one point, and saw the same problem.

I would guess that I could avoid this problem if I chose the "copy into workspace" option, but I'd rather this just worked. If I copy the projects, I'll have to figure out a "sync" process to keep the imported projects up to date. I'm not sure of the best way to do that.

Also note that besides this problem with Eclipse, these VMs work perfectly fine. I use them to reach the internet, I run other remote VMs from them, all fine.
Re: Re-pursuing problem with Eclipse on Ubuntu VM "losing" all imported projects [message #1729966 is a reply to message #1729877] Wed, 20 April 2016 15:21 Go to previous messageGo to next message
Eclipse UserFriend
I import projects across shared folders in VMWare Fusion fairly often and have never seen the issues you're describing.

There are three things that I think you can do from here:

First, try a different VM tool and see if you can reproduce the problems there. That will at least pinpoint whether the problem is somehow related to VirtualBox or something else.

Second, try mounting your source folders via NFS or SAMBA and see if the shared folder implementation is to blame.

Third, take a snapshot before you launch Eclipse. If the workspace is corrupt then you can go back and launch Eclipse under the remote debugging and dig in to why the projects are somehow being evicted. And you should have a reproducible test case.

Brian.
Re: Re-pursuing problem with Eclipse on Ubuntu VM "losing" all imported projects [message #1729974 is a reply to message #1729966] Wed, 20 April 2016 15:53 Go to previous messageGo to next message
David M. Karr is currently offline David M. KarrFriend
Messages: 800
Registered: July 2009
Senior Member
Could you be more specific about "take a snapshot"?
Re: Re-pursuing problem with Eclipse on Ubuntu VM "losing" all imported projects [message #1729980 is a reply to message #1729974] Wed, 20 April 2016 16:13 Go to previous messageGo to next message
Eclipse UserFriend
A snapshot is a save point of the VM's running state that can be restored to. It includes the local disk state too, though not externally-mounted drives.
Re: Re-pursuing problem with Eclipse on Ubuntu VM "losing" all imported projects [message #1729986 is a reply to message #1729980] Wed, 20 April 2016 16:29 Go to previous messageGo to next message
David M. Karr is currently offline David M. KarrFriend
Messages: 800
Registered: July 2009
Senior Member
Ok, I understand VM snapshots now.

One thing that is not clear is "when" this corruption is happening. You'd think it would be happening at startup time, but it could be happening at shutdown time. If it's the latter, then if the snapshot is taken before I start Eclipse, and I run a remote debugger on Eclipse startup, all I'll see is that Eclipse doesn't find any projects.

The main problem that I have, however, is that even if the corruption does happen at startup, and I step through startup in the debugger, I have no idea what I should be looking for. I've tried doing recursive diffs of saved workspaces that appeared to be corrupted with new workspaces that appeared to not be corrupted. I found differences, but I have no idea what differences are relevant.

I could use some guidance on what I should be setting breakpoints in, and what data structures I should be examining. I'll also need to figure out how to get the real source for some of what I'll be stepping through.
Re: Re-pursuing problem with Eclipse on Ubuntu VM "losing" all imported projects [message #1729990 is a reply to message #1729986] Wed, 20 April 2016 16:53 Go to previous message
Eclipse UserFriend
I'm not an expert on Core Resources, so I'd start at ResourcesPlugin.start(), which is called when the bundle is activated. This method begins the process of opening the workspace and verifying and possibly rebuilding the metadata. It quickly calls into Workspace.open() that does most of the lifting.

You'll also want to enable most of the tracing options for org.eclipse.core.resources (see the Tracing tab of the debug launcher) including the /restore*, /save*, and /refresh options.

You should document your findings on your bug report rather than opening up new messages here on the forum.

Brian.
Previous Topic:Conflicting handlers and Stackoverflow
Next Topic:com.rational.clearcase.ActionSet ?
Goto Forum:
  


Current Time: Tue Mar 19 06:35:27 GMT 2024

Powered by FUDForum. Page generated in 0.02541 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top