View Full Version : [ubuntu] x11nvc eclipse fails to start

March 6th, 2010, 12:23 AM
Running Ubuntu Desktop 9.10 64-bit and Eclipse 3.5.2.

The specific problem I have is if I start Eclipse while sitting at the console (no x11vnc) it starts up fine. However if I start / restart through x11vnc, eclipse fails with a out of heap space error. Tweaking memory settings in eclipse.ini has no effect.

I have gone back and forth a couple of times on this now and this behaviour of eclipse failing to start while x11vnc is running seems to be consistent.

March 6th, 2010, 05:13 AM
Could you paste in the full eclipse stacktrace?

March 8th, 2010, 04:56 PM
Here is what is in my workspace/.medadata/.log file:
!SESSION 2010-03-05 12:34:52.086 -----------------------------------------------
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments: -product org.eclipse.epp.package.php.product
Command-line arguments: -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.php.product

!ENTRY com.adobe.ide.coldfusion.core 4 0 2010-03-05 12:34:56.429
!MESSAGE Problem loading version node from dictionaryconfig.xml

!ENTRY com.adobe.ide.coldfusion.core 4 0 2010-03-05 12:34:56.498
!MESSAGE Problem loading version node from dictionaryconfig.xml

!ENTRY org.eclipse.osgi 4 0 2010-03-05 12:34:58.647
!MESSAGE Application error
java.lang.OutOfMemoryError: Java heap space
at org.eclipse.ui.part.ResourceTransfer.nativeToJava( ResourceTransfer.java:162)
at org.eclipse.swt.dnd.Clipboard.getContents(Clipboar d.java:309)
at org.eclipse.swt.dnd.Clipboard.getContents(Clipboar d.java:241)
at org.eclipse.ui.views.navigator.PasteAction$1.run(P asteAction.java:194)
at org.eclipse.swt.widgets.Synchronizer.syncExec(Sync hronizer.java:179)
at org.eclipse.ui.internal.UISynchronizer.syncExec(UI Synchronizer.java:150)
at org.eclipse.swt.widgets.Display.syncExec(Display.j ava:4113)
at org.eclipse.ui.views.navigator.PasteAction.updateS election(PasteAction.java:189)
at org.eclipse.ui.actions.BaseSelectionListenerAction .selectionChanged(BaseSelectionListenerAction.java :124)
at org.eclipse.ui.views.navigator.RefactorActionGroup .updateActionBars(RefactorActionGroup.java:155)
at org.eclipse.ui.views.navigator.MainActionGroup.upd ateActionBars(MainActionGroup.java:319)
at org.eclipse.ui.views.navigator.ResourceNavigator.u pdateActionBars(ResourceNavigator.java:1412)
at org.eclipse.ui.views.navigator.ResourceNavigator.c reatePartControl(ResourceNavigator.java:327)
at org.eclipse.ui.internal.ViewReference.createPartHe lper(ViewReference.java:367)
at org.eclipse.ui.internal.ViewReference.createPart(V iewReference.java:226)
at org.eclipse.ui.internal.WorkbenchPartReference.get Part(WorkbenchPartReference.java:595)
at org.eclipse.ui.internal.PartPane.setVisible(PartPa ne.java:313)
at org.eclipse.ui.internal.ViewPane.setVisible(ViewPa ne.java:529)
at org.eclipse.ui.internal.presentations.PresentableP art.setVisible(PresentablePart.java:180)
at org.eclipse.ui.internal.presentations.util.Present ablePartFolder.select(PresentablePartFolder.java:2 70)
at org.eclipse.ui.internal.presentations.util.LeftToR ightTabOrder.select(LeftToRightTabOrder.java:65)
at org.eclipse.ui.internal.presentations.util.TabbedS tackPresentation.selectPart(TabbedStackPresentatio n.java:473)
at org.eclipse.ui.internal.PartStack.refreshPresentat ionSelection(PartStack.java:1256)
at org.eclipse.ui.internal.PartStack.createControl(Pa rtStack.java:668)
at org.eclipse.ui.internal.PartStack.createControl(Pa rtStack.java:576)
at org.eclipse.ui.internal.PartSashContainer.createCo ntrol(PartSashContainer.java:568)
at org.eclipse.ui.internal.PerspectiveHelper.activate (PerspectiveHelper.java:272)
at org.eclipse.ui.internal.Perspective.onActivate(Per spective.java:982)
at org.eclipse.ui.internal.WorkbenchPage.onActivate(W orkbenchPage.java:2626)
at org.eclipse.ui.internal.WorkbenchWindow$27.run(Wor kbenchWindow.java:2965)
at org.eclipse.swt.custom.BusyIndicator.showWhile(Bus yIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchWindow.setActiveP age(WorkbenchWindow.java:2946)

March 8th, 2010, 06:35 PM
How much memory does, say, top or ps report x11vnc and eclipse are using just before this failure?

March 8th, 2010, 07:27 PM
x11vnc is using 31MB.
I actually got it to restart this last time around after getting more heap errors while doing x11vnc remoting and now it is showing immediately after starting
RES: 791m, SHR: 37m, VIRT: 2717m.
This is after I bumped up MaxPermSize to 1024m, Xms to 512m, and Xmx to 1024m in an attempt to get around this problem. It seems in this state with all of this extra memory allocated, it finally starts granted there are no updates being applied or any other dialogues coming up while remoting. (A dialogue box came up while remoting earlier today and caused another heap error.) However when not remoting, non of this seems to be an issue.

March 8th, 2010, 08:18 PM
So does eclipse use about 791MB of RES memory even when x11vnc is not running?

What is the total amount of RAM and swap on the machine?

March 8th, 2010, 08:39 PM
This is with x11vnc going.

This machine has 12 GBs of RAM and an additional 12 GBs of swap. That should be enough, right?

March 8th, 2010, 08:50 PM
This is with x11vnc going.

And how much does eclipse use with x11vnc not going?

March 8th, 2010, 09:02 PM
I got it restarted without x11vnc and here are the stats for Eclipse:
RES: 788m, SHR: 35m, VIRT: 2771m.

March 8th, 2010, 09:38 PM
Not exactly sure what to try next.

See if this makes a difference, add this to the x11vnc cmdline:

Also, post your full x11vnc cmdline here.

March 8th, 2010, 10:13 PM
Now that you are looking into the problem, it wants to play nice either way with or without -xdamage. I guess this problem is more transient than I originally thought. Next time around if it happens with the noxdamage parameter I will make sure to restart x11vnc to see if this only happens after extended runs. (All of the times I can remember this happening it happened after the x11vnc session had be going for over an hour and all of my tests here are within a minute or two of instantiating x11vnc.)

Well here is my current config file:
display :0

March 8th, 2010, 10:29 PM
Another thing to watch is the memory usage of the X server.

March 9th, 2010, 05:43 PM
With the noxdamage option I left it on overnight and eclipse restarted successfully the this morning.

March 11th, 2010, 08:34 PM
So for two days I left x11vnc open with the noxdamage option off and the problem cropped up again today. Unfortunately I first thought to restart x11vnc before I thought to get a memory reading in order to make sure it was x11vnc that was somehow interfering. I do know the system never went into swap and it is running 64-bit Ubuntu 9.10 desktop. However after the incident there is 2 GBs of unused memory (neither cache nor applications) so it is possible that something running either running in 32-bit mode or memory limited may have used up its entire memory space.

Would you like me to first see if this can be reproduced with noxdamage turned on or repeat the test with noxdamage disabled?

March 12th, 2010, 03:04 AM
Maybe write a script that dumps 'ps wwaux' output to a logfile every 30 seconds (maybe add the output of the 'date' and 'free' commands as well.) Then run it in the mode that you feel has the best chance to reproduce the problem.

I noticed a problem some time ago with strange screen savers that they could induce a huge amount of DAMAGE rectangles on x11vnc's event queue. This could get it to +250MB of memory usage (perhaps more the longer the screen saver runs.) I am wondering if you are seeing something like this.